/* =====================================================================
   一建备考 · 在线工作台
   风格参照「笔记同款个人工作台」：蓝白配色、18px 圆角卡片、242px 侧栏
   ===================================================================== */

:root {
  --blue: #287fd0;
  --blue-deep: #1c63a8;
  --blue-soft: #e8f3fc;
  --deep: #102341;
  --deep-2: #19345a;
  --bg: #e9f3fb;
  --bg-2: #f4f9fe;
  --card: #ffffff;
  --soft: #eff7fd;
  --green: #23986b;
  --green-soft: #e6f5ee;
  --danger: #bd3445;
  --danger-soft: #fbeaec;
  --amber: #c07a12;
  --amber-soft: #fdf3e2;
  --violet: #6f5bd6;
  --muted: #7b8088;
  --muted-2: #9aa2ad;
  --text: #1b2733;
  --line: #e2eaf2;
  --line-2: #eef3f8;
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 242px;
  --shadow: 0 2px 6px rgba(34, 76, 122, .04), 0 14px 34px rgba(34, 76, 122, .06);
  --shadow-sm: 0 1px 3px rgba(34, 76, 122, .05), 0 6px 18px rgba(34, 76, 122, .05);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 8% -8%, #cfe6fa 0%, transparent 60%),
    radial-gradient(760px 500px at 100% 0%, #e2f0fd 0%, transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 46%, #f7fbff 100%);
  background-attachment: fixed;
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; color: var(--deep); }
p { margin: 0; }
a { color: var(--blue); text-decoration: none; }
button { font-family: inherit; }
::selection { background: #cfe7fb; }
:focus-visible { outline: 3px solid rgba(40, 127, 208, .35); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 0; background: #fff; padding: 10px 16px; z-index: 400; }
.skip:focus { left: 12px; top: 12px; }

/* ---------- 布局 ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}
body.locked .gated { display: none !important; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 16px 16px;
  background: rgba(255, 255, 255, .86);
  border-right: 1px solid rgba(210, 226, 241, .8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 60;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 20px; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 13px;
  background: linear-gradient(150deg, #358fe0, #1b5c9e);
  color: #fff; font-size: 21px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(28, 99, 168, .28);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 17px; letter-spacing: .4px; color: var(--deep); }
.brand-text span { font-size: 11.5px; color: var(--muted); letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding: 2px; margin: 0 -2px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #45525f; font-size: 14px; font-weight: 500;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: var(--soft); color: var(--blue-deep); }
.nav-item.active { background: linear-gradient(90deg, #e7f2fc, #f2f9ff); color: var(--blue-deep); font-weight: 700; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px; background: var(--blue);
}
.nav-ico { width: 22px; text-align: center; font-size: 16px; filter: saturate(.95); }
.nav-label { flex: 1; }
.nav-badge { font-size: 11px; font-weight: 700; color: var(--blue); background: #e2f1fd; border-radius: 999px; padding: 1px 7px; }
.nav-badge:empty { display: none; }

.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px;
  background: linear-gradient(150deg, #d9ecfb, #b9dcf6);
  color: #1c63a8; font-weight: 800; font-size: 15px;
  display: grid; place-items: center;
}
.side-user strong { display: block; font-size: 13px; color: var(--deep); }
.side-user small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lock-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  transition: all .18s ease;
}
.lock-btn:hover { color: var(--danger); border-color: #f4c9cf; background: #fdf4f5; }

.main { min-width: 0; display: flex; flex-direction: column; padding: 0 30px; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 2px 14px;
  background: linear-gradient(180deg, rgba(238, 247, 254, .96) 0%, rgba(238, 247, 254, .82) 70%, rgba(238, 247, 254, 0) 100%);
  backdrop-filter: blur(10px);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 24px; letter-spacing: .2px; }
.topbar-title p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: #46525f;
  font-size: 15px; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(30, 70, 110, .04);
  transition: all .16s ease;
}
.icon-btn:hover { border-color: #c9ddf0; color: var(--blue); transform: translateY(-1px); }
.menu-btn { display: none; }

.countdown-chip {
  display: flex; align-items: baseline; gap: 5px;
  background: linear-gradient(135deg, #143157, #1d4a7c);
  color: #fff; padding: 7px 14px; border-radius: 12px;
  box-shadow: 0 8px 18px rgba(16, 35, 65, .18);
}
.countdown-chip .cd-label { font-size: 11px; opacity: .72; }
.countdown-chip strong { font-size: 19px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.countdown-chip .cd-unit { font-size: 11px; opacity: .72; }
.sync-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  background: #fff; border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap;
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #c7ced6; }
.sync-chip.saved .sync-dot { background: var(--green); }
.sync-chip.saving .sync-dot { background: var(--amber); animation: pulse 1s infinite; }
.sync-chip.error .sync-dot { background: var(--danger); }
.sync-chip.offline .sync-dot { background: var(--muted-2); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.view { flex: 1; padding: 6px 2px 34px; outline: none; }
.foot {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 4px 22px;
  font-size: 12px; color: var(--muted);
  border-top: 1px solid rgba(212, 228, 242, .8);
}
.foot .sep { opacity: .5; }
.foot .grow { flex: 1; }
.foot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(35, 152, 107, .12); }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.link-btn:hover { color: var(--blue); }

.scrim { position: fixed; inset: 0; background: rgba(16, 35, 65, .34); z-index: 50; }

/* ---------- 通用卡片与排版 ---------- */
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c2-1 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.grid.c1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; color: var(--deep); }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hr { height: 1px; background: var(--line-2); border: 0; margin: 14px 0; }

.card {
  background: var(--card);
  border: 1px solid rgba(224, 235, 245, .95);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  min-width: 0;
}
.card.pad0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card-head .ico { font-size: 17px; }
.card-head .grow { flex: 1; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: -8px; margin-bottom: 12px; }
.card-note { font-size: 12px; color: var(--muted); }

.section-title { display: flex; align-items: center; gap: 10px; margin: 24px 2px 12px; }
.section-title h2 { font-size: 17px; }
.section-title .line { flex: 1; height: 1px; background: var(--line); }
.section-title .tag { font-size: 11px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 24px 26px;
  background: linear-gradient(120deg, #102341 0%, #17395f 52%, #235f96 100%);
  color: #fff;
  box-shadow: 0 16px 38px rgba(16, 35, 65, .22);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 320px; height: 320px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(105, 184, 245, .35), transparent 65%); }
.hero::after { width: 240px; height: 240px; right: 130px; bottom: -180px; background: radial-gradient(circle, rgba(69, 214, 170, .18), transparent 65%); }
.hero-body { position: relative; z-index: 1; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.hero-main { flex: 1; min-width: 260px; }
.hero-kicker { font-size: 12px; letter-spacing: 2px; color: #9fc8ec; text-transform: uppercase; margin-bottom: 8px; }
.hero h2 { font-size: 26px; color: #fff; letter-spacing: .3px; }
.hero h2 em { font-style: normal; color: #7ec8ff; }
.hero p { color: #c3d9ec; font-size: 13px; margin-top: 8px; max-width: 640px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-tag { font-size: 12px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #dcebf8; }
.hero-tag.hot { background: rgba(255, 196, 92, .14); border-color: rgba(255, 196, 92, .35); color: #ffd98e; }
.hero-side { display: flex; gap: 18px; align-items: center; }
.hero-metric { text-align: center; min-width: 84px; }
.hero-metric strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.hero-metric span { font-size: 11.5px; color: #a9c7e0; }
.hero-divider { width: 1px; height: 44px; background: rgba(255, 255, 255, .14); }
.hero-sessions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.session-chip { font-size: 11.5px; padding: 3px 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); color: #cfe3f5; }
.session-chip b { color: #fff; font-weight: 600; }

/* ---------- 进度条 / 圆环 ---------- */
.bar { height: 7px; border-radius: 999px; background: #edf3f9; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4aa3e8, #287fd0); transition: width .5s ease; }
.bar.green > i { background: linear-gradient(90deg, #40b985, #23986b); }
.bar.amber > i { background: linear-gradient(90deg, #e5a94a, #c07a12); }
.bar.thin { height: 5px; }

.ring { --p: 0; --size: 92px; --thick: 9px; width: var(--size); height: var(--size); border-radius: 50%; position: relative;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #e9f1f8 0); display: grid; place-items: center; }
.ring::after { content: ""; position: absolute; inset: var(--thick); border-radius: 50%; background: #fff; }
.ring > b { position: relative; z-index: 1; font-size: 19px; color: var(--deep); font-variant-numeric: tabular-nums; }
.ring > b small { font-size: 11px; color: var(--muted); font-weight: 500; }
.ring.green { background: conic-gradient(var(--green) calc(var(--p) * 1%), #e9f1f8 0); }
.ring.amber { background: conic-gradient(var(--amber) calc(var(--p) * 1%), #e9f1f8 0); }

.subject-line { display: flex; align-items: center; gap: 10px; }
.subject-line .name { width: 58px; font-size: 12.5px; color: #3c4a58; white-space: nowrap; }
.subject-line .bar { flex: 1; }
.subject-line .pct { width: 44px; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 按钮 / 标签 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 11px; border: 1px solid transparent;
  background: linear-gradient(135deg, #3a95e2, #2477c4);
  color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 14px rgba(36, 119, 196, .22);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(36, 119, 196, .28); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.ghost { background: #fff; color: #3d4a58; border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: #c9ddf0; color: var(--blue); box-shadow: 0 3px 10px rgba(34, 76, 122, .06); }
.btn.soft { background: var(--blue-soft); color: var(--blue-deep); border-color: #d5e9fa; box-shadow: none; }
.btn.soft:hover { background: #dceefb; }
.btn.danger { background: linear-gradient(135deg, #d05161, #bd3445); box-shadow: 0 6px 14px rgba(189, 52, 69, .2); }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn.xs { padding: 3px 9px; font-size: 11.5px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.plain { background: none; border: 0; box-shadow: none; color: var(--blue); padding: 4px 6px; }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: #eef4fa; color: #4b6076; white-space: nowrap; }
.tag.blue { background: #e4f2fd; color: #1f6fb5; }
.tag.green { background: var(--green-soft); color: #1c7d58; }
.tag.amber { background: var(--amber-soft); color: #9a6210; }
.tag.red { background: var(--danger-soft); color: #a52d3c; }
.tag.violet { background: #eeecfb; color: #5b49bd; }
.tag.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tag.click { cursor: pointer; }
.tag.click:hover { filter: brightness(.97); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; color: #40505f; cursor: pointer; }
.chip.active { background: var(--blue-soft); border-color: #cfe6fa; color: var(--blue-deep); font-weight: 600; }
.chip:hover { border-color: #c9ddf0; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; color: #4a5a6a; font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--muted); }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fbfdff; color: var(--text);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus { border-color: #a9d0f0; background: #fff; box-shadow: 0 0 0 3px rgba(40, 127, 208, .1); }
textarea { resize: vertical; min-height: 84px; line-height: 1.65; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #7b8a99 50%), linear-gradient(135deg, #7b8a99 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #43515f; cursor: pointer; }
.checkline input { width: 15px; height: 15px; accent-color: var(--blue); }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px dashed var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.list-item .main-txt { flex: 1; min-width: 0; }
.list-item .t { font-size: 13.5px; color: #26333f; }
.list-item .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.empty .big { font-size: 30px; margin-bottom: 8px; }
.empty p { font-size: 13px; }

/* ---------- 今日任务 ---------- */
.task { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); }
.task:last-child { border-bottom: 0; }
.task-check {
  width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px;
  border-radius: 7px; border: 1.5px solid #c9d6e2; background: #fff;
  cursor: pointer; display: grid; place-items: center;
  color: transparent; font-size: 13px; font-weight: 800;
  transition: all .18s ease;
}
.task-check:hover { border-color: var(--blue); background: var(--blue-soft); }
.task.done .task-check { background: var(--green); border-color: var(--green); color: #fff; }
.task.done .task-title { text-decoration: line-through; color: var(--muted-2); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 14px; color: #26333f; line-height: 1.55; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.task-meta .refs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.task-time { display: flex; align-items: center; gap: 4px; }
.task-actions { display: flex; align-items: center; gap: 6px; }
.task-timer { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--blue-deep); background: var(--blue-soft); padding: 2px 8px; border-radius: 7px; }

/* 讲级行：每条任务的每一讲单独一行，点前导勾选圈即完成该讲；选学讲次淡化、勾选圈虚线 */
.task.opt { opacity: .92; }
.task.opt .task-title { color: #556270; }
.task.opt .task-check { border-style: dashed; }
.task.opt.done .task-check { border-style: solid; }
.task.opt .task-time { color: #9a6210; }

.timer-strip {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: 14px;
  background: linear-gradient(120deg, #eaf5fe, #f6fbff);
  border: 1px solid #d9ecfb;
}
.timer-strip .clock { font-size: 26px; font-weight: 800; color: var(--blue-deep); font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.timer-strip .what { flex: 1; min-width: 0; font-size: 12px; color: #4b6076; }
.timer-strip .what b { display: block; font-size: 13px; color: var(--deep); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 周历 ---------- */
.week-row { display: grid; grid-template-columns: 64px 150px 96px 1fr 86px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.week-row:hover { background: var(--soft); border-color: #e2eff9; }
.week-row.current { background: linear-gradient(90deg, #e8f4fe, #f7fcff); border-color: #cfe7fa; box-shadow: inset 3px 0 0 var(--blue); }
.week-row.done { opacity: .8; }
.week-no { font-weight: 800; color: var(--deep); font-size: 14px; }
.week-no small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; }
.week-dates { font-size: 12px; color: #46525f; font-variant-numeric: tabular-nums; }
.week-phase { font-size: 11px; }
.week-bar { display: flex; align-items: center; gap: 8px; }
.week-bar .bar { flex: 1; }
.week-bar .n { font-size: 11px; color: var(--muted); width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.week-sub { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.week-sub .tag { font-size: 10.5px; padding: 1px 6px; }
.week-head { display: grid; grid-template-columns: 64px 150px 96px 1fr 86px; gap: 12px; padding: 0 12px 8px; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

.phase-legend { display: flex; gap: 8px; flex-wrap: wrap; }
.phase-card { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); flex: 1; min-width: 150px; }
.phase-card .ph { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--deep); }
.phase-card .dot { width: 8px; height: 8px; border-radius: 3px; }
.phase-card .pd { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* ---------- 课程进度 ---------- */
.lect-head { display: flex; align-items: center; gap: 10px; position: sticky; top: 64px; z-index: 5; background: #fff; padding: 10px 0; }
.lect-chapter { margin: 6px 0 2px; }
.lect-chapter h4 { font-size: 12.5px; color: #4b6076; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 8px 0 6px; }
.lect-chapter h4 .line { flex: 1; height: 1px; background: var(--line-2); }
.lect-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.lect-row:hover { background: var(--soft); }
.lect-row.done { background: #f7fcf9; }
.lect-row.done .lect-t { color: var(--muted); }
.lect-check { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; border: 1.5px solid #c9d6e2; background: #fff; cursor: pointer; display: grid; place-items: center; color: transparent; font-size: 11px; font-weight: 800; }
.lect-row.done .lect-check { background: var(--green); border-color: var(--green); color: #fff; }
.lect-t { flex: 1; font-size: 13px; color: #2b3844; min-width: 0; }
.lect-min { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; width: 58px; text-align: right; }
.lect-row .tag { font-size: 10.5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfdff; }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--line-2); color: #33404d; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tr:hover td { background: #fafdff; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .strong { color: var(--deep); }

.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.score.pass { color: var(--green); }
.score.fail { color: var(--danger); }
.score .sp { font-size: 11px; font-weight: 500; color: var(--muted); }

/* ---------- 统计卡 ---------- */
.stat { padding: 16px 18px; }
.stat .label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: 30px; font-weight: 800; color: var(--deep); letter-spacing: .3px; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat .delta { font-size: 11.5px; margin-top: 6px; color: var(--muted); }
.stat .delta.up { color: var(--green); }
.stat .delta.down { color: var(--danger); }
.stat .ico-bg { float: right; width: 34px; height: 34px; border-radius: 11px; background: var(--blue-soft); display: grid; place-items: center; font-size: 16px; }

.chart-card canvas { width: 100%; display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 0; }

.heat { overflow-x: auto; padding: 4px 2px 8px; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, 13px); gap: 3px; width: max-content; }
.heat-cell { width: 13px; height: 13px; border-radius: 3px; background: #edf3f8; }
.heat-cell.l1 { background: #cfe7fa; }
.heat-cell.l2 { background: #8fc4ee; }
.heat-cell.l3 { background: #4d9ad9; }
.heat-cell.l4 { background: #1c63a8; }
.heat-cell.today { outline: 2px solid #c07a12; outline-offset: 1px; }
.heat-months { display: flex; gap: 0; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.heat-legend .heat-cell { width: 11px; height: 11px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12px; min-width: 130px; }
.donut-legend .li { display: flex; align-items: center; gap: 8px; }
.donut-legend .dot { width: 9px; height: 9px; border-radius: 3px; }
.donut-legend .n { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 成绩 ---------- */
.exam-big { display: flex; align-items: baseline; gap: 6px; }
.exam-big strong { font-size: 34px; font-weight: 800; color: var(--deep); font-variant-numeric: tabular-nums; }
.exam-big span { color: var(--muted); font-size: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; color: #2b3844; }

/* ---------- 笔记 / 错题卡 ---------- */
.note-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 9px; }
.note-card.pinned { border-color: #f1ddb5; background: linear-gradient(180deg, #fffdf7, #fff); }
.note-top { display: flex; align-items: flex-start; gap: 8px; }
.note-top h4 { font-size: 14.5px; flex: 1; color: var(--deep); }
.note-body { font-size: 12.5px; color: #4d5a67; line-height: 1.7; max-height: 5.1em; overflow: hidden; white-space: pre-wrap; }
.note-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.note-foot .grow { flex: 1; }
.mistake-card { border-left: 3px solid #e7b7be; }
.mistake-card.mastered { border-left-color: var(--green); opacity: .82; }
.mistake-q { font-size: 13.5px; color: #2b3844; white-space: pre-wrap; }
.mistake-a { font-size: 12.5px; color: #55626f; background: #f7fbfe; border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; }
.mistake-a b { color: var(--blue-deep); }

/* ---------- 空状态 / 提示条 ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 13px; font-size: 13px; }
.banner.info { background: #eaf5fe; border: 1px solid #d3eafc; color: #1f5c8c; }
.banner.warn { background: #fdf6e9; border: 1px solid #f2e2c2; color: #8a5b12; }
.banner.good { background: #eaf7f1; border: 1px solid #cfeadd; color: #1c6f4f; }
.banner .ico { font-size: 16px; }
.banner .grow { flex: 1; }
.banner b { font-weight: 700; }

.kbd { font-family: ui-monospace, Consolas, monospace; font-size: 11px; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: #5c6875; }

/* ---------- 弹窗 ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 32px));
  border: 0; border-radius: 18px; padding: 0;
  box-shadow: 0 30px 80px rgba(16, 35, 65, .28);
  color: var(--text);
  background: #fff;
}
dialog.modal::backdrop { background: rgba(16, 35, 65, .42); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line-2); }
.modal-head h2 { font-size: 16.5px; flex: 1; }
.modal-body { padding: 18px 20px 20px; max-height: min(70vh, 680px); overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.modal-body .danger-zone { border: 1px solid #f3cfd4; background: #fdf7f8; border-radius: 12px; padding: 12px 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 18px);
  background: #102341; color: #fff; font-size: 13px;
  padding: 11px 18px; border-radius: 12px;
  box-shadow: 0 14px 34px rgba(16, 35, 65, .3);
  opacity: 0; pointer-events: none; transition: all .22s ease; z-index: 300;
  max-width: min(520px, calc(100vw - 32px));
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.good { background: #1c7d58; }
.toast.bad { background: #a52d3c; }

/* ---------- 访问门 ---------- */
.gate { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(700px 420px at 20% 0%, #cfe6fa, transparent 60%), rgba(233, 243, 251, .9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.gate[hidden] { display: none; }
.gate-box { width: 100%; max-width: 372px; padding: 34px 28px 26px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 70px rgba(16, 35, 65, .16); text-align: center; animation: gate-in .32s ease; }
@keyframes gate-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.gate-avatar { width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: linear-gradient(150deg, #358fe0, #1b5c9e); box-shadow: 0 12px 26px rgba(28, 99, 168, .3); }
.gate-title { font-size: 24px; font-weight: 800; color: var(--deep); letter-spacing: .5px; }
.gate-sub { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }
.gate-tip { margin: 20px 0 14px; font-size: 13px; color: #5a6774; }
#gate-pwd { width: 100%; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; color: var(--text); font-size: 15px; text-align: center; letter-spacing: 1px; outline: none; }
#gate-pwd:focus { border-color: #a9d0f0; box-shadow: 0 0 0 3px rgba(40, 127, 208, .12); background: #fff; }
.gate-btn { width: 100%; margin-top: 12px; padding: 13px; border: none; border-radius: 12px; background: linear-gradient(135deg, #3a95e2, #2477c4); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(36, 119, 196, .28); transition: transform .18s ease, box-shadow .18s ease; }
.gate-btn:hover { transform: translateY(-2px); }
.gate-btn:disabled { opacity: .65; cursor: wait; transform: none; }
.gate-msg { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: var(--danger); }
.gate-hint { margin: 6px 0 0; font-size: 11.5px; color: var(--muted-2); }

/* ---------- 搜索面板 ---------- */
.search-panel { position: fixed; inset: 0; z-index: 250; background: rgba(16, 35, 65, .4); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 20px 20px; }
.search-panel[hidden] { display: none; }
.search-box { width: min(620px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(16, 35, 65, .3); overflow: hidden; }
.search-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.search-input input { border: 0; background: none; font-size: 15px; padding: 0; box-shadow: none; }
.search-input input:focus { box-shadow: none; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 6px 8px 10px; }
.sr-group { font-size: 11px; color: var(--muted); padding: 10px 10px 4px; letter-spacing: .5px; }
.sr-item { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.sr-item:hover, .sr-item.sel { background: var(--soft); }
.sr-item .t { flex: 1; font-size: 13px; min-width: 0; }
.sr-item .s { font-size: 11px; color: var(--muted); }
.search-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1300px) {
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 0 22px; }
}
@media (max-width: 1080px) {
  :root { --sidebar: 214px; }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c2-1, .grid.c1-2 { grid-template-columns: 1fr; }
  .hero-side { gap: 12px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; transform: translateX(-104%); transition: transform .24s ease; box-shadow: 0 20px 60px rgba(16, 35, 65, .24); }
  .app.nav-open .sidebar { transform: none; }
  .main { padding: 0 16px; }
  .menu-btn { display: grid; }
  .topbar { padding-top: 14px; }
  .topbar-title h1 { font-size: 20px; }
  .countdown-chip { padding: 6px 10px; }
  .sync-chip { display: none; }
  .grid.c2, .grid.c3 { grid-template-columns: 1fr; }
  .week-head { display: none; }
  .week-row { grid-template-columns: 52px 1fr 70px; grid-row-gap: 6px; padding: 10px; }
  .week-row .week-phase { display: none; }
  .week-row .week-bar { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .hero h2 { font-size: 22px; }
  .hero-side { width: 100%; justify-content: space-between; }
  .hidden-sm { display: none !important; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .main { padding: 0 12px; }
  .card { padding: 15px 16px; border-radius: 16px; }
  .topbar-title p { display: none; }
  .countdown-chip .cd-label { display: none; }
  .hero-metric strong { font-size: 22px; }
  .grid { gap: 12px; }
  .stat .value { font-size: 25px; }
  .task-actions .btn span { display: none; }
  .foot { flex-wrap: wrap; }
  .search-panel { padding-top: 8vh; }
}
@media (max-width: 420px) {
  .topbar-actions { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .hero-side { flex-wrap: wrap; gap: 10px; }
  .hero-divider { display: none; }
}

/* ---------- 打印 ---------- */
@media print {
  .sidebar, .topbar, .foot, .gate, .scrim, .toast, .search-panel { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card, .hero { box-shadow: none; break-inside: avoid; }
  .view { padding: 0; }
}

/* ---------- 计时胶囊 ---------- */
.timer-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 120;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, #143157, #1d4a7c);
  color: #fff; box-shadow: 0 16px 36px rgba(16, 35, 65, .28);
  font-size: 12.5px;
}
.timer-fab .tf-dot { width: 8px; height: 8px; border-radius: 50%; background: #45d4aa; animation: pulse 1.4s infinite; }
.timer-fab .tf-time { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; cursor: pointer; }
.timer-fab .tf-label { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #cfe3f5; }
.timer-fab .tf-stop { border: 0; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 12px; padding: 5px 11px; cursor: pointer; }
.timer-fab .tf-stop:hover { background: rgba(255,255,255,.24); }
@media (max-width: 620px) { .timer-fab { right: 12px; bottom: 12px; } .timer-fab .tf-label { display: none; } }

/* ---------- 44 周周历（Excel 表格式） ---------- */
.wk-card { padding: 18px 18px 12px; }
.wk-headbar { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 0 2px 12px; }
.wk-title { font-weight: 800; color: var(--deep); font-size: 15px; }
.wk-title .muted { font-weight: 500; font-size: 12px; }
.wk-tip { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.wk-scroll { overflow: auto; max-height: min(70vh, 860px); border: 1px solid var(--line); border-radius: 14px; }
.wk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 1080px; }
.wk-table thead th { position: sticky; top: 0; z-index: 2; background: #f3f9fe; color: #5a6b7d; font-weight: 700; font-size: 11.5px; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wk-table td { border-bottom: 1px solid var(--line-2); padding: 9px 10px; vertical-align: top; }
.wk-tr:last-child td { border-bottom: 0; }
.wk-tr:hover td { background: #fafdff; }
.wk-tr.current td { background: linear-gradient(90deg, #eaf5fe, #f8fcff); }
.wk-tr.current td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.wk-tr.done td { background: #fbfefc; }
.wk-c-no { white-space: nowrap; width: 62px; }
.wk-no { display: inline-block; font-size: 13px; font-weight: 800; color: var(--deep); cursor: pointer; border-bottom: 1px dashed transparent; }
.wk-no:hover { color: var(--blue); border-bottom-color: #bcdcf5; }
.wk-state { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.wk-tr.current .wk-state { color: var(--blue); font-weight: 700; }
.wk-c-date { white-space: nowrap; width: 104px; }
.wk-c-date .num { font-size: 12px; font-variant-numeric: tabular-nums; color: #33404d; }
.wk-end { display: block; font-size: 10px; color: var(--muted-2); }
.wk-c-phase { width: 86px; }
.wk-ph { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 6px; white-space: nowrap; }
.wk-cell { cursor: pointer; min-width: 150px; }
.wk-cell-top { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.wk-subj { font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 5px; line-height: 16px; white-space: nowrap; }
.wk-subj.s-shiwu { color: #1c63a8; background: #e8f3fc; }
.wk-subj.s-guanli { color: #6f5bd6; background: #efecfd; }
.wk-subj.s-jingji { color: #c07a12; background: #fdf3e2; }
.wk-subj.s-fagui { color: #23986b; background: #e6f5ee; }
.wk-subj.s-x { color: #5a6b7d; background: #eef3f8; }
.wk-dot { margin-left: auto; font-size: 10px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.wk-dot.on { color: var(--green); font-weight: 700; }
.wk-items { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-i { font-size: 12px; color: #2c3a47; background: var(--soft); border-radius: 6px; padding: 1px 6px; line-height: 18px; }
.wk-cell.flex .wk-i { background: #fdf7ec; color: #8a6417; }
.wk-cell.final .wk-i { background: #fdf0f2; color: #a3303f; }
.wk-cell.alldone .wk-i { background: #e9f7f0; color: #1f7a58; }
.wk-cell:hover { background: #eff8ff !important; }
.wk-cell.empty { cursor: default; }
.wk-c-h { width: 76px; white-space: nowrap; }
.wk-c-h b { font-size: 12.5px; color: var(--deep); }
.wk-bar { display: block; height: 4px; border-radius: 999px; background: #e8eef5; margin: 5px 0 3px; overflow: hidden; }
.wk-bar i { display: block; height: 100%; border-radius: 999px; }
.wk-actual { font-size: 10px; color: var(--muted); }
@media (max-width: 900px) {
  .wk-scroll { max-height: none; }
  .wk-table th:first-child, .wk-table td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; box-shadow: 3px 0 6px -3px rgba(16, 35, 65, .12); }
  .wk-table thead th:first-child { z-index: 4; background: #f3f9fe; }
  .wk-tr.current td:first-child { background: #eaf5fe; }
  .wk-tr.done td:first-child { background: #fbfefc; }
  .wk-tr:hover td:first-child { background: #fafdff; }
  .wk-table { min-width: 940px; }
  .wk-cell { min-width: 132px; }
  .wk-tip { display: none; }
}

/* ---------- 章节练习 ---------- */
.pq-chap { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 15px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.pq-chap:hover { border-color: #bfe0f8; box-shadow: 0 8px 22px -12px rgba(16,35,65,.22); transform: translateY(-1px); }
.pq-chap-head { display: flex; align-items: flex-start; gap: 8px; }
.pq-chap-head h4 { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--deep); font-weight: 700; }
.pq-chap-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.pq-chap-meta .ok { color: var(--green); font-weight: 700; }
.pq-chap-meta .bad { color: var(--danger); font-weight: 700; }
.pq-chap-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.pq-cont, .pq-wrongbar { margin-top: 12px; }
.pq-cont .pq-cont-ico, .pq-wrongbar .pq-cont-ico { font-size: 22px; line-height: 1; }
.pq-wrongbar { background: linear-gradient(135deg, #fff8ec, #fff); border-color: #f3dfbb; }
.pq-runbar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 15px; backdrop-filter: blur(6px); background: rgba(255,255,255,.94); }
.pq-runinfo { flex: 1 1 320px; min-width: 0; }
.pq-runtitle { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13.5px; color: var(--deep); }
.pq-runmeta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pq-runmeta .ok { color: var(--green); font-weight: 700; }
.pq-runmeta .bad { color: var(--danger); font-weight: 700; }
.pq-progress { flex: 0 0 100%; height: 4px; border-radius: 999px; background: #e8eef5; overflow: hidden; }
.pq-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4aa3e8, #287fd0); transition: width .2s; }
.pq-card { padding: 20px 22px 18px; }
.pq-qhead { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pq-stem { margin: 14px 0 16px; font-size: 15px; line-height: 1.85; color: #21303e; font-weight: 600; }
.pq-opts { display: flex; flex-direction: column; gap: 9px; }
.pq-opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; cursor: pointer; background: #fbfdff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 13.5px; line-height: 1.7; color: #2c3a47; transition: border-color .12s, background .12s; }
.pq-opt:hover { border-color: #bfe0f8; background: #f5fbff; }
.pq-opt .pq-key { flex: 0 0 22px; height: 22px; border-radius: 7px; background: #eef4fa; color: #5a6b7d; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.pq-opt .pq-txt { flex: 1; }
.pq-opt.picked { border-color: var(--blue); background: #eef7ff; box-shadow: 0 0 0 3px rgba(40,127,208,.08); }
.pq-opt.picked .pq-key { background: var(--blue); color: #fff; }
.pq-opt.correct { border-color: #6fcea8; background: #effaf5; }
.pq-opt.correct .pq-key { background: var(--green); color: #fff; }
.pq-opt.wrong { border-color: #e8a3ad; background: #fdf2f4; }
.pq-opt.wrong .pq-key { background: var(--danger); color: #fff; }
.pq-opt.dim { opacity: .58; }
.pq-opt[disabled] { cursor: default; }
.pq-opt[disabled]:hover { border-color: var(--line); background: #fbfdff; }
.pq-opt.correct[disabled]:hover { border-color: #6fcea8; background: #effaf5; }
.pq-opt.wrong[disabled]:hover { border-color: #e8a3ad; background: #fdf2f4; }
.pq-hint { margin-top: 12px; }
.pq-result { margin-top: 16px; border-radius: 14px; padding: 16px 18px; border: 1px solid #cfe9dc; background: #f4fcf8; }
.pq-result.bad { border-color: #f0cdd2; background: #fdf7f8; }
.pq-verdict { font-size: 14.5px; font-weight: 800; color: #1f7a58; }
.pq-result.bad .pq-verdict { color: #a3303f; }
.pq-ansline { margin-top: 5px; font-size: 13px; color: #3d4a58; }
.pq-ansline b { color: var(--deep); }
.pq-expl { margin-top: 12px; border-top: 1px dashed #d8e4ee; padding-top: 11px; }
.pq-expl-h { font-size: 12px; font-weight: 800; color: #5a6b7d; margin-bottom: 5px; }
.pq-expl-body { font-size: 13px; line-height: 1.85; color: #33404d; }
.pq-streak { margin-top: 11px; font-size: 11.5px; color: #8a6417; background: #fdf7ec; border-radius: 8px; padding: 6px 10px; display: inline-block; }
.pq-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pq-keyhint { margin-top: 10px; text-align: right; }
.pq-sum { text-align: center; padding: 30px 22px 22px; }
.pq-sum-ico { font-size: 40px; line-height: 1; }
.pq-sum h3 { margin: 10px 0 4px; font-size: 19px; color: var(--deep); }
.pq-sum-nums { display: flex; justify-content: center; gap: 34px; margin: 18px 0 6px; flex-wrap: wrap; }
.pq-sum-nums > div { display: flex; flex-direction: column; gap: 3px; }
.pq-sum-nums strong { font-size: 26px; color: var(--deep); font-variant-numeric: tabular-nums; }
.pq-sum-nums strong.ok { color: var(--green); }
.pq-sum-nums strong.bad { color: var(--danger); }
.pq-sum-nums span { font-size: 11.5px; color: var(--muted); }
.pq-sum-list { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfdff; max-width: 640px; margin-left: auto; margin-right: auto; }
.pq-sumwrong { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.pq-sumwrong:last-child { border-bottom: 0; }
.pq-sumtitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #33404d; }
.pq-sum .pq-foot { justify-content: center; }
.mis-opt { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.7; color: #33404d; padding: 2px 0; }
.mis-opt .mis-key { flex: 0 0 20px; height: 20px; border-radius: 6px; background: #eef4fa; color: #5a6b7d; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.mis-opt.good { color: #1f7a58; font-weight: 600; }
.mis-opt.good .mis-key { background: var(--green); color: #fff; }
.mis-answer { margin-top: 8px; font-size: 12.5px; color: #1f7a58; }
.mis-expl { margin-top: 6px; font-size: 12.5px; color: #4a5866; line-height: 1.75; padding: 8px 10px; background: #f7fbf9; border-radius: 8px; }
@media (max-width: 900px) {
  .pq-grid { grid-template-columns: 1fr; }
  .pq-card { padding: 16px 14px; }
  .pq-runbar { position: static; }
  .pq-sum-nums { gap: 20px; }
  .pq-sum-nums strong { font-size: 22px; }
}

/* ---------- 章节练习 · 按讲列表 ---------- */
.pl-card { padding: 6px 8px 10px; }
.pl-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 11px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pl-head-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-head-l strong { font-size: 14px; color: var(--deep); }
.pl-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 10px; border-bottom: 1px dashed #edf2f7; }
.pl-row:last-child { border-bottom: none; }
.pl-row:hover { background: #f8fbff; }
.pl-row.watched { background: #fcfdff; }
.pl-row.done .pl-bar i { background: linear-gradient(90deg, #7fd8b4, #26a97c); }
.pl-num b { display: block; font-size: 12.5px; color: var(--deep); letter-spacing: .2px; }
.pl-main { min-width: 0; }
.pl-t { font-size: 13.5px; font-weight: 700; color: #22303d; line-height: 1.5; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pl-meta .ok { color: var(--green); font-weight: 700; }
.pl-meta .bad { color: var(--danger); font-weight: 700; }
.pl-bar { height: 3px; border-radius: 999px; background: #eef2f7; margin-top: 7px; overflow: hidden; }
.pl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7cc0ee, #287fd0); transition: width .2s; }
.pl-video { flex: 0 0 auto; font-size: 11.5px; border-radius: 999px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; white-space: nowrap; font-family: inherit; }
.pl-video:hover { border-color: #bfe0f8; color: var(--blue); }
.pl-video.on { background: #effaf5; border-color: #bfe6d3; color: #1f7a58; font-weight: 700; }
@media (max-width: 900px) {
  .pl-card { padding: 4px 6px 8px; }
  .pl-row { grid-template-columns: 62px minmax(0, 1fr); row-gap: 8px; padding: 11px 8px; }
  .pl-num b { font-size: 12px; }
  .pl-video, .pl-row > .btn, .pl-row > .tag { grid-column: 2; justify-self: start; }
}

/* ---------- 备考手册 ---------- */
.hb-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.hb-toc { position: sticky; top: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 118px); }
.hb-searchbar { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; }
.hb-sb-row { display: flex; align-items: center; gap: 7px; }
.hb-sb-ico { font-size: 12px; flex: none; }
.hb-searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); outline: none; }
.hb-sb-info { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.hb-toc-list { display: flex; flex-direction: column; gap: 2px; overflow: auto; padding-right: 2px; }
.hb-toc-item { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: transparent; padding: 8px 9px; border-radius: 10px; cursor: pointer; font: inherit; color: #3b4a59; position: relative; }
.hb-toc-item:hover { background: var(--soft); }
.hb-toc-item.active { background: linear-gradient(90deg, #e7f2fc, #f4faff); color: var(--blue-deep); }
.hb-toc-item.active::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--blue); }
.hb-toc-item.dim { opacity: .45; }
.hb-toc-name { font-size: 13px; font-weight: 600; padding-right: 26px; }
.hb-toc-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.hb-toc-hit { position: absolute; right: 8px; top: 8px; background: #e2f1fd; color: var(--blue); border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; }
.hb-toc-empty { font-size: 12px; color: var(--muted); padding: 10px 8px; }
.hb-toc-foot { font-size: 11px; color: var(--muted-2); line-height: 1.6; border-top: 1px dashed var(--line); padding-top: 9px; }
.hb-doc { padding: 22px 26px 18px; }
.hb-doc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); padding-bottom: 12px; }
.hb-doc-head h2 { margin: 0; font-size: 20px; color: var(--deep); }
.hb-qnote { font-size: 12px; color: var(--blue); background: var(--blue-soft); border-radius: 8px; padding: 3px 9px; }
.hb-h2 { font-size: 16.5px; margin: 26px 0 10px; color: var(--deep); padding-left: 11px; position: relative; }
.hb-h2::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: var(--blue); }
.hb-h3 { font-size: 14.5px; margin: 18px 0 8px; color: var(--deep-2); }
.hb-p { margin: 9px 0; font-size: 13.5px; line-height: 1.85; color: #2c3947; }
.hb-note { background: var(--bg-2); border-left: 3px solid #b9d8f2; border-radius: 0 10px 10px 0; padding: 9px 12px; margin: 12px 0; font-size: 12.8px; line-height: 1.75; color: #51606f; }
.hb-ul { margin: 8px 0 12px; padding-left: 20px; }
.hb-ul li { font-size: 13.5px; line-height: 1.8; color: #2c3947; margin: 3px 0; }
.hb-tw { overflow-x: auto; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.hb-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.8px; min-width: 520px; }
.hb-table th { background: #f3f9fe; color: #2f4258; font-weight: 600; text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hb-table td { padding: 9px 11px; border-bottom: 1px solid var(--line-2); color: #33404e; line-height: 1.65; vertical-align: top; }
.hb-table tbody tr:last-child td { border-bottom: 0; }
.hb-table tbody tr:nth-child(even) { background: #fbfdff; }
.hb-cap { font-size: 12px; color: var(--muted); margin: 16px 0 -4px; font-weight: 600; }
.hb-quote { background: linear-gradient(135deg, #f2f8fe, #fbfdff); border: 1px dashed #cfe4f7; border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.hb-q-h { font-size: 14px; font-weight: 700; color: var(--deep); }
.hb-q-l { font-size: 13px; color: #46525f; margin-top: 6px; line-height: 1.75; }
.hb-link { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; background: var(--blue-soft); border: 1px solid #d5e9fa; border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 13px; color: #20456b; line-height: 1.7; }
.hb-block { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 16px 0; background: #fff; }
.hb-block-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.5px; color: var(--deep); }
.hb-block-head .grow { flex: 1; }
.hb-checks { background: linear-gradient(180deg, #fbfdff, #fff); border-color: #dbeafb; }
.hb-crow, .hb-mrow { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; margin: 7px 0; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.hb-crow:hover, .hb-mrow:hover { border-color: #c9e2f8; box-shadow: 0 3px 12px rgba(34, 76, 122, .06); }
.hb-cb { width: 19px; height: 19px; border-radius: 6px; border: 1.5px solid #c3d6e8; display: grid; place-items: center; font-size: 12px; color: #fff; flex: none; margin-top: 1px; background: #fff; }
.hb-crow.done .hb-cb, .hb-mrow.done .hb-cb { background: var(--green); border-color: var(--green); }
.hb-crow.done, .hb-mrow.done { background: #f4fbf7; border-color: #cfeadd; }
.hb-crow.done .hb-ct b { color: #3c5a4b; text-decoration: line-through; text-decoration-color: #9dc9b2; }
.hb-cno { font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 6px; padding: 2px 6px; flex: none; margin-top: 1px; }
.hb-ct { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hb-ct b { font-size: 13px; font-weight: 600; color: #26333f; line-height: 1.5; }
.hb-ct small { font-size: 11.8px; color: var(--muted); line-height: 1.55; }
.hb-mno { font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 6px; padding: 2px 6px; flex: none; margin-top: 1px; }
.hb-mt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hb-mhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hb-mhead b { font-size: 13px; color: #26333f; }
.hb-st { font-size: 11px; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.st-done { background: var(--green-soft); color: #1d7f59; }
.st-late { background: var(--danger-soft); color: var(--danger); }
.st-todo { background: #eef3f8; color: #6b7784; }
.hb-mcheck { font-size: 12.6px; color: #3d4a58; line-height: 1.7; }
.hb-mfb { font-size: 11.8px; color: #90752f; background: #fdf8ea; border-radius: 8px; padding: 5px 8px; margin-top: 2px; }
.hb-mrow.late { background: #fffafa; border-color: #f6dcdf; }
.hb-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.hb-navbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--line); }
mark { background: #fff2a8; color: inherit; padding: 0 1px; border-radius: 3px; }
@media (max-width: 900px) {
  .hb-layout { grid-template-columns: 1fr; }
  .hb-toc { position: static; max-height: none; padding: 12px; }
  .hb-toc-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .hb-toc-item { min-width: 150px; border: 1px solid var(--line); background: #fff; }
  .hb-toc-item.active { border-color: #bfe0fa; }
  .hb-toc-item.active::before { display: none; }
  .hb-toc-foot { display: none; }
  .hb-doc { padding: 16px 14px; }
  .hb-doc-head h2 { font-size: 17px; }
  .hb-table { min-width: 440px; font-size: 12px; }
  .hb-block { padding: 12px; }
}

/* ==================== 学习笔记 · 配图（截图粘贴） ==================== */
.note-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.note-card .note-imgs { margin-top: 2px; }
.note-imgs .thumb { position: relative; width: 108px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f4f9fe; cursor: zoom-in; display: block; }
.note-card .note-imgs .thumb { width: 104px; height: 74px; }
.modal-body .note-imgs .thumb { width: 112px; height: 80px; }
.note-imgs .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.note-imgs .thumb .del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(16, 35, 65, .72); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.note-imgs .thumb .del:hover { background: var(--danger); }
.paste-zone { margin-top: 8px; border: 1.5px dashed #c6d9ea; border-radius: 12px; padding: 16px 14px; text-align: center; font-size: 13px; line-height: 1.6; color: #6b7c8f; background: #f7fbff; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.paste-zone:hover, .paste-zone.hot { border-color: var(--blue); background: #eef7ff; color: var(--blue-deep); }
.paste-zone .pick { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.note-img-view figure { margin: 0 0 12px; }
.note-img-view figure.on img { box-shadow: 0 0 0 2px var(--blue); }
.note-img-view img { display: block; width: 100%; max-width: 100%; border-radius: 10px; cursor: zoom-in; }
.note-img-view .view-hint { text-align: center; font-size: 12px; color: #7b8a99; margin: 2px 0 8px; }

/* 配图全屏放大层（弹窗内，fixed 覆盖视口） */
dialog.modal.modal-viewer { width: min(980px, calc(100vw - 32px)); }
.modal-viewer .note-img-view img { width: auto; max-width: 100%; max-height: 56vh; margin: 0 auto; }
.note-zoom { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(9, 17, 28, .95); color: #fff; }
.note-zoom[hidden] { display: none !important; }
.nz-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255, 255, 255, .07); flex: none; }
.nz-title { font-size: 13px; color: #dce8f5; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nz-btn { border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 8px; min-width: 34px; height: 32px; padding: 0 10px; font-size: 15px; line-height: 1; cursor: pointer; flex: none; }
.nz-btn:hover { background: rgba(255, 255, 255, .2); }
.nz-btn:disabled { opacity: .35; cursor: default; }
.nz-pct { min-width: 52px; text-align: center; font-size: 12.5px; color: #cfe2f5; font-variant-numeric: tabular-nums; }
.nz-sep { width: 1px; height: 20px; background: rgba(255, 255, 255, .2); margin: 0 4px; flex: none; }
.nz-close { margin-left: 4px; }
.nz-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-in; touch-action: none; }
.nz-img { max-width: 100%; max-height: 100%; display: block; transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none; border-radius: 4px; }
.nz-hint { padding: 8px 14px 12px; text-align: center; font-size: 12px; color: #9fb3c8; flex: none; }
@media (max-width: 620px) {
  .nz-title { max-width: 26vw; }
  .nz-hint { font-size: 11px; padding: 6px 10px 10px; }
}
@media (max-width: 620px) {
  .note-imgs .thumb, .modal-body .note-imgs .thumb { width: 84px; height: 62px; }
  .paste-zone { padding: 12px 10px; font-size: 12.5px; }
}
