:root {
  --accent: #2b5cff;
  --accent-soft: #eef2ff;
  --accent-dark: #1c40c4;
  --ok: #0a9d6a;
  --ok-soft: #e7f7f0;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warn: #f5a524;
  --warn-soft: #fff5e3;
  --purple: #7c4dff;
  --ink: #1c2333;
  --ink-2: #4a5468;
  --ink-3: #7b869c;
  --line: #e6eaf3;
  --line-2: #f0f3f9;
  --bg: #f4f6fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 30, 60, .05), 0 6px 20px -8px rgba(19, 30, 60, .12);
  --mono: "Consolas", "SFMono-Regular", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; min-height: 100vh; }

/* ------------------------------ 侧栏 ------------------------------ */
.sidebar {
  width: 226px;
  flex: none;
  background: linear-gradient(170deg, #1d2742 0%, #151c31 100%);
  color: #e8edf9;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 20px 18px 16px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, #3d6bff, #7c4dff);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(61, 107, 255, .9);
}
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: #8b98b8; margin-top: 1px; }
/* 校徽 logo：白底圆形，放在深色侧栏上更清晰 */
.brand-logo.emblem {
  background: #fff;
  box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .5);
  padding: 0;
  overflow: hidden;
}
.brand-logo.emblem img { width: 100%; height: 100%; display: block; object-fit: contain; }

.nav { flex: 1; padding: 6px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 3px;
  color: #b9c4dd; cursor: pointer; font-size: 13.5px; user-select: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(61, 107, 255, .95), rgba(61, 107, 255, .55)); color: #fff; font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
.nav-item .badge { margin-left: auto; background: rgba(255,255,255,.16); border-radius: 20px; padding: 0 7px; font-size: 11px; }

.side-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.key-pill { font-size: 11.5px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.07); color: #a9b6d3; }
.key-pill.ok { background: rgba(10, 157, 106, .18); color: #6ee7b7; }
.key-pill.warn { background: rgba(245, 165, 36, .16); color: #fbd38d; }
.side-meta { font-size: 11px; color: #6f7c99; margin-top: 8px; line-height: 1.7; }

/* ------------------------------ 主区 ------------------------------ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 20px 26px 14px; background: rgba(246, 248, 252, .96);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 20px; margin: 0; letter-spacing: .3px; }
.page-desc { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.topbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.page { padding: 20px 26px 60px; flex: 1; }

/* ------------------------------ 早读任务 ------------------------------ */
.morning-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.morning-grid { display: grid; grid-template-columns: minmax(240px, 26%) minmax(0, 1fr); gap: 16px; align-items: start; }

.mq-card { display: flex; flex-direction: column; min-height: 320px; }
.mq-no { font-size: 12px; color: var(--ink-3); }
.mq-cn { font-size: 17px; line-height: 1.9; font-weight: 600; letter-spacing: .3px; }
.mq-en { font-size: 14px; line-height: 1.85; color: #33507f; margin-top: 12px; font-family: Georgia, "Times New Roman", serif; }
.mq-src { font-size: 11.5px; color: var(--ink-3); margin-top: auto; padding-top: 12px; }

.mt-input { width: 100%; min-height: 92px; }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff;
}
.mt-item.done { background: #f7fbf9; border-color: #cfe9dd; }
.mt-item.done .mt-text { color: var(--ink-3); text-decoration: line-through; }
.mt-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-dark); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.mt-text { flex: 1; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.mt-ops { flex: none; display: flex; gap: 4px; }

/* ---------- 全屏演示 ---------- */
.present {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  background: #f5f7fb; color: #16233c; font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.present.dark { background: linear-gradient(150deg, #0e1729 0%, #16233c 55%, #1d2b47 100%); color: #eef3ff; }
.present-head {
  flex: none; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 1.1vh 2.2vw; border-bottom: 1px solid rgba(120, 140, 180, .25);
}
.present-title { font-size: clamp(20px, 2.6vw, 46px); font-weight: 800; letter-spacing: 2px; display: flex; align-items: baseline; gap: 12px; }
.present-title .subj { color: #2b5cff; }
.present.dark .present-title .subj { color: #7ea8ff; }
.present-title .tag { font-size: .62em; font-weight: 600; opacity: .72; letter-spacing: 1px; }
.present-meta { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: clamp(12px, 1.05vw, 20px); }
.present-count { display: flex; align-items: baseline; gap: 6px; }
.present-count b { font-size: clamp(20px, 2.2vw, 40px); color: #e5484d; font-weight: 800; }
.present.dark .present-count b { color: #ff8a8f; }
.present-body { flex: 1; display: flex; min-height: 0; }
.present-quote {
  flex: 0 0 30vw; min-width: 240px; display: flex; flex-direction: column;
  padding: 2.2vh 1.8vw; border-right: 1px solid rgba(120, 140, 180, .25);
  background: rgba(255, 255, 255, .55);
}
.present.dark .present-quote { background: rgba(255, 255, 255, .04); }
.present-quote .qt-label { flex: none; font-size: clamp(12px, 1vw, 18px); letter-spacing: 2px; color: #6b7691; margin-bottom: 1.4vh; }
.present.dark .present-quote .qt-label { color: #8fa3cc; }
.present-quote .qt-box { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.present-quote .qt-cn { font-weight: 700; line-height: 1.75; letter-spacing: .5px; }
.present-quote .qt-en { font-family: Georgia, "Times New Roman", serif; line-height: 1.7; opacity: .85; margin-top: 1.6vh; }
.present-quote .qt-ctrl { flex: none; display: flex; align-items: center; gap: 10px; padding-top: 1.4vh; font-size: clamp(11px, .95vw, 17px); }
.present-tasks { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 2.2vh 2.4vw; }
.present-tasks .pt-title { flex: none; font-size: clamp(15px, 1.5vw, 26px); font-weight: 700; letter-spacing: 2px; opacity: .8; margin-bottom: 1.6vh; }
.present-tasks .pt-box { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.present-tasks ol { margin: 0; padding: 0; list-style: none; }
.present-tasks li {
  display: flex; gap: .8em; align-items: flex-start;
  padding: .42em 0; border-bottom: 1px dashed rgba(120, 140, 180, .22); line-height: 1.6;
}
.present-tasks li:last-child { border-bottom: none; }
.present-tasks li .n {
  flex: none; width: 1.9em; height: 1.9em; border-radius: 50%;
  background: rgba(43, 92, 255, .12); color: #2b5cff; font-size: .54em; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: .3em;
}
.present.dark .present-tasks li .n { background: rgba(126, 168, 255, .18); color: #9dbcff; }
.present-tasks li.done { opacity: .45; }
.present-tasks li.done span { text-decoration: line-through; }
.present-tasks .pt-empty { text-align: center; font-size: clamp(16px, 1.6vw, 30px); opacity: .5; }
.present-foot {
  flex: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: .9vh 2.2vw; border-top: 1px solid rgba(120, 140, 180, .25);
  font-size: clamp(11px, .95vw, 17px); opacity: .78;
}
.present-foot .spacer { flex: 1; }
.kbd { display: inline-block; padding: 1px 7px; border-radius: 5px; border: 1px solid currentColor; font-size: .92em; }
.present-btn {
  border: 1px solid currentColor; background: transparent; color: inherit; opacity: .8;
  border-radius: 8px; padding: 3px 12px; font-size: .95em; cursor: pointer; font-family: inherit;
}
.present-btn:hover { opacity: 1; }
@media (max-width: 900px) {
  .morning-grid { grid-template-columns: minmax(0, 1fr); }
  .present-body { flex-direction: column; }
  .present-quote { flex: 0 0 auto; border-right: none; border-bottom: 1px solid rgba(120, 140, 180, .25); }
}

/* ------------------------------ 通用组件 ------------------------------ */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.card.tight { padding: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-title .dot { width: 4px; height: 15px; border-radius: 3px; background: var(--accent); }
.card-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.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.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.kpi { display: flex; align-items: center; gap: 12px; }
.kpi-num { font-size: 25px; font-weight: 700; letter-spacing: -.5px; }
.kpi-label { font-size: 12px; color: var(--ink-3); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.kpi-icon.blue { background: var(--accent-soft); }
.kpi-icon.green { background: var(--ok-soft); }
.kpi-icon.red { background: var(--danger-soft); }
.kpi-icon.orange { background: var(--warn-soft); }
.kpi-icon.purple { background: #f1ecff; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 7px 13px; border-radius: 9px; font-size: 13px; cursor: pointer;
  font-family: inherit; transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #c9d3e8; color: var(--ink); background: #fbfcff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { background: #fff; border-color: #f4c6c7; color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-3); }
.btn.ghost:hover { background: var(--line-2); color: var(--ink); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.xs { padding: 2px 7px; font-size: 11.5px; border-radius: 6px; }
.btn.lg { padding: 11px 22px; font-size: 14.5px; border-radius: 11px; }
.btn.block { width: 100%; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px;
  font-size: 13px; font-family: inherit; color: var(--ink); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43, 92, 255, .12); }
.textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.input.sm, .select.sm { padding: 4px 8px; font-size: 12.5px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.6; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer;
  user-select: none; transition: all .12s; color: var(--ink-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip.on { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.chip.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.chip.lg { padding: 7px 13px; font-size: 13px; border-radius: 10px; }
.chip .cnt { font-size: 11px; opacity: .78; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 11.5px; background: var(--line-2); color: var(--ink-2); }
.tag.blue { background: var(--accent-soft); color: var(--accent-dark); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.orange { background: var(--warn-soft); color: #a86400; }
.tag.purple { background: #f1ecff; color: #5b32d6; }

/* 学生选择器 */
.stu-picker { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; padding: 10px; background: #fafbfe; border: 1px solid var(--line); border-radius: 10px; }
.stu-pill {
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px;
  font-size: 12.5px; cursor: pointer; user-select: none; transition: all .12s; display: flex; gap: 5px; align-items: center;
}
.stu-pill:hover { border-color: var(--accent); }
.stu-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.stu-pill .m { font-size: 10.5px; opacity: .7; }
.stu-pill.has-mark { border-color: #f3b8b9; background: #fff6f6; }
.stu-pill.has-mark.active { background: var(--accent); border-color: var(--accent); }

/* 表格 */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.tbl { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.tbl th {
  background: #f7f9fd; color: var(--ink-2); font-weight: 600; text-align: left;
  padding: 9px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: #fafbff; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.center, .tbl th.center { text-align: center; }
.tbl.fixed { table-layout: fixed; }
.tbl .muted { color: var(--ink-3); font-size: 12px; }

.rank-medal { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; background: var(--line-2); color: var(--ink-2); }
.rank-medal.g1 { background: linear-gradient(135deg, #ffe08a, #f0b400); color: #7a5200; }
.rank-medal.g2 { background: linear-gradient(135deg, #e6ebf5, #c3ccdd); color: #4b566d; }
.rank-medal.g3 { background: linear-gradient(135deg, #f6d9bd, #dfa96f); color: #7a4a12; }

/* 错题矩阵 */
.matrix-wrap { overflow: auto; max-height: 66vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.matrix th, .matrix td { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 0; text-align: center; }
.matrix thead th {
  position: sticky; top: 0; z-index: 3; background: #f7f9fd; padding: 6px 8px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; white-space: nowrap; min-width: 46px;
}
.matrix thead th:hover { background: var(--accent-soft); color: var(--accent-dark); }
.matrix thead th.corner { left: 0; z-index: 5; min-width: 92px; }
.matrix tbody th {
  position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: 5px 10px;
  font-weight: 500; white-space: nowrap; border-right: 1px solid var(--line); min-width: 92px;
}
.matrix tbody tr:hover th { background: var(--accent-soft); }
.matrix td { width: 46px; height: 30px; cursor: pointer; transition: background .1s; }
.matrix td:hover { background: var(--accent-soft); }
.matrix td .mark { display: block; width: 100%; height: 30px; background: transparent; position: relative; }
.matrix td .mark::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
.matrix td.on .mark { background: var(--danger); }
.matrix td.on { background: var(--danger-soft); }
.matrix td.hot { background: #fff1f0; }
.matrix td.hot .mark::after { color: #e5484d; opacity: .5; }
.matrix td.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.matrix tfoot td { position: sticky; bottom: 0; background: #f7f9fd; font-weight: 600; padding: 5px; }
.matrix tfoot th { position: sticky; bottom: 0; left: 0; background: #f7f9fd; z-index: 4; padding: 5px 10px; text-align: left; }

/* 分布图 */
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.bar-click { cursor: pointer; }
.bar-click:hover rect { opacity: .82; }

/* 弹窗 / 提示 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 22, 40, .45); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: fadeIn .14s ease-out;
}
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px -12px rgba(12, 20, 40, .35);
  animation: popIn .16s ease-out;
}
.modal.wide { max-width: 940px; }
.modal.xwide { max-width: 1200px; }
/* 左栏编辑：把文件拖到编辑框就能导入 */
.textarea.drop-on {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
/* 「分配到每天」的预览列表 */
.dist-preview { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; max-height: 230px; overflow-y: auto; }
.dist-row {
  display: grid; grid-template-columns: 96px 62px 1fr; gap: 10px; align-items: baseline;
  padding: 6px 10px; border-radius: 9px; background: var(--accent-soft, #eef2ff);
  font-size: 12.5px; line-height: 1.5;
}
.dist-date { font-weight: 600; font-variant-numeric: tabular-nums; }
.dist-chars { color: var(--muted, #6b7280); font-variant-numeric: tabular-nums; }
.dist-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---------- 手动标红预览框 ---------- */
.mm-preview {
  max-height: 190px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  font-size: 13.5px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.mm-preview .hl { color: rgb(229, 72, 77); font-weight: 700; }

/* ---------- 云盘 ---------- */
.cloud-drop {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-2);
  transition: border-color .2s, background .2s, transform .2s;
}
.cloud-drop .big { font-size: 30px; line-height: 1.2; }
.cloud-drop p { margin: 4px 0 0; }
.cloud-drop.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  transform: scale(1.005);
}
.cloud-vis { display: flex; flex-direction: column; gap: 8px; }
.cloud-vis-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.cloud-vis-item.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.cloud-vis-item .ico { font-size: 20px; }
.cloud-vis-item input { margin: 0; }
.cloud-progress { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.cloud-prog-head { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 7px; flex-wrap: wrap; }
.cloud-prog-head .err { color: #c0392b; }
.cloud-bar { height: 8px; border-radius: 99px; background: rgba(120, 132, 160, .22); overflow: hidden; }
.cloud-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #6d92ff, #2b5cff); transition: width .18s linear; }
.cloud-name { font-weight: 600; color: var(--accent); text-decoration: none; }
.cloud-name:hover { text-decoration: underline; }
.cloud-steps { margin: 0; padding-left: 20px; line-height: 2; font-size: 13.5px; }
.cloud-steps code { background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; }

/* ---------- 手动标红：填词后即时预览 ---------- */
.hint.err { color: #c0392b; }
select.input.sm { padding: 4px 8px; font-size: 12.5px; height: auto; }
.modal-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }

.toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 10px 15px; font-size: 13px; box-shadow: 0 12px 28px -10px rgba(12, 20, 40, .3);
  max-width: 380px; animation: slideIn .18s ease-out;
}
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px) } to { opacity: 1; transform: none } }

.overlay {
  position: fixed; inset: 0; background: rgba(244, 246, 251, .82); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; z-index: 150;
}
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.overlay-text { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.overlay-sub { font-size: 12px; color: var(--ink-3); max-width: 420px; text-align: center; }
.progress { width: 260px; height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .big { font-size: 34px; margin-bottom: 8px; opacity: .6; }
.empty p { margin: 5px 0; font-size: 13px; }

.hint-box { background: var(--accent-soft); border: 1px solid #d6e0ff; border-radius: 10px; padding: 11px 14px; font-size: 12.5px; color: #27408b; line-height: 1.75; }
.hint-box.warn { background: var(--warn-soft); border-color: #f7dfb0; color: #8a5a00; }
.hint-box.danger { background: var(--danger-soft); border-color: #f6cdcd; color: #a12a2d; }

.thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); cursor: zoom-in; background: #f7f9fd; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.dropzone {
  border: 2px dashed #ccd6ea; border-radius: 12px; padding: 26px; text-align: center; background: #fafbff;
  cursor: pointer; transition: all .15s; color: var(--ink-3);
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.dropzone .big { font-size: 30px; margin-bottom: 6px; }

.q-list { display: flex; flex-direction: column; gap: 10px; }
.q-item { border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; background: #fff; }
.q-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.q-item-no { font-weight: 700; color: var(--accent); font-size: 13px; }
.q-item-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
.q-item-ans { font-size: 12.5px; color: var(--ok); margin-top: 4px; white-space: pre-wrap; }
.q-item-ana { font-size: 12.5px; color: #8a6a13; margin-top: 4px; white-space: pre-wrap; }
.level-easy { border-left: 3px solid var(--ok); }
.level-medium { border-left: 3px solid var(--warn); }
.level-hard { border-left: 3px solid var(--danger); }

.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 15px; cursor: pointer; font-size: 13.5px; color: var(--ink-3); border-bottom: 2px solid transparent; user-select: none; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.bar-row-mini { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); }
.bar-row-mini:last-child { border-bottom: none; }
.bar-row-mini .bn { width: 74px; flex: none; font-size: 12.5px; text-align: right; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-mini .bw { flex: 1; height: 16px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.bar-row-mini .bf { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #6d92ff, #2b5cff); transition: width .4s; }
.bar-row-mini .bv { width: 76px; flex: none; font-size: 12px; color: var(--ink-3); }

.md-body { font-size: 13.5px; line-height: 1.85; }
.md-body h2 { font-size: 15.5px; margin: 18px 0 8px; padding-left: 9px; border-left: 3px solid var(--accent); }
.md-body h3 { font-size: 14px; margin: 14px 0 6px; }
.md-body p { margin: 7px 0; }
.md-body ul { margin: 7px 0; padding-left: 20px; }
.md-body li { margin: 3px 0; }
.md-body table { border-collapse: collapse; width: 100%; font-size: 12.5px; margin: 8px 0; }
.md-body td, .md-body th { border: 1px solid var(--line); padding: 4px 8px; }

.scroll-y { max-height: 380px; overflow-y: auto; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0 } .mt8 { margin-top: 8px } .mt12 { margin-top: 12px } .mt16 { margin-top: 16px }
.mb0 { margin-bottom: 0 } .mb8 { margin-bottom: 8px } .mb12 { margin-bottom: 12px } .mb16 { margin-bottom: 16px }
.w100 { width: 100% }
.pos { color: var(--ok); font-weight: 700; }
.neg { color: var(--danger); font-weight: 700; }
.hidden { display: none !important; }
.pointer { cursor: pointer; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

.file-list { display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; background: #fff; }
.file-item .fi-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1180px) {
  .grid.c4, .grid.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 0 8px; overflow-x: auto; }
  .brand { padding: 10px; }
  .brand-text { display: none; }
  .nav { display: flex; padding: 6px; overflow-x: auto; }
  .nav-item { white-space: nowrap; }
  .nav-item .badge, .side-foot { display: none; }
  .grid.c2, .grid.c3, .grid.c4, .grid.c5 { grid-template-columns: minmax(0, 1fr); }
  .page, .topbar { padding-left: 14px; padding-right: 14px; }
}

/* ---------- 早读左栏内容（金句 / 英语语法句） ---------- */
.q-body { display: flex; flex-direction: column; gap: 10px; }
.g-point { font-size: 12px; color: var(--accent-dark); font-weight: 600; letter-spacing: .5px; }
.g-point .tag { margin-left: 6px; }
.g-sent { font-family: Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.7; }
.g-zh { font-size: 13.5px; color: #33507f; line-height: 1.8; }
.g-explain { font-size: 12.5px; color: #44506b; line-height: 1.8; background: #f5f8ff; border-radius: 8px; padding: 8px 10px; }
.g-tip { font-size: 12.5px; color: #8a5a00; background: var(--warn-soft); border-radius: 8px; padding: 7px 10px; line-height: 1.7; }
.qt-flag { margin-left: 8px; font-size: .85em; padding: 1px 7px; border-radius: 20px; background: rgba(43, 92, 255, .12); color: #2b5cff; }
.present.dark .qt-flag { background: rgba(126, 168, 255, .18); color: #9dbcff; }

/* 演示模式下左栏内容整体按 em 缩放（字号自适应只需改 .qt-box 的 font-size） */
.present-quote .qt-box .qt-cn { font-size: 1em; }
.present-quote .qt-box .qt-en { font-size: .68em; margin-top: .8em; }
.present-quote .qt-box .g-sent { font-size: 1em; }
.present-quote .qt-box .g-zh { font-size: .64em; }
.present-quote .qt-box .g-explain { font-size: .5em; background: rgba(43, 92, 255, .07); }
.present-quote .qt-box .g-tip { font-size: .5em; }
.present-quote .qt-box .g-point { font-size: .46em; }
.present.dark .present-quote .qt-box .g-explain { background: rgba(126, 168, 255, .12); color: #cfd9f5; }
.present.dark .present-quote .qt-box .g-zh { color: #c6d3ee; }
.present.dark .present-quote .qt-box .g-tip { background: rgba(245, 165, 36, .16); color: #f5d08a; }
/* ---------- 安全体检 ---------- */
.sec-list { display: flex; flex-direction: column; gap: 8px; }
.sec-item { border: 1px solid var(--line); border-left-width: 3px; border-radius: 8px; padding: 9px 12px; background: #fff; }
.sec-item.high { border-left-color: #e5484d; background: #fff5f5; }
.sec-item.mid { border-left-color: #f5a524; background: #fffaf0; }
.sec-item.info { border-left-color: #2b5cff; background: #f6f9ff; }
.sec-item.ok { border-left-color: #17a673; background: #f5fbf8; }
.sec-title { font-weight: 600; font-size: 13.5px; }
.sec-detail { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.7; }
.sec-fix { font-size: 12.5px; color: var(--accent-dark); margin-top: 4px; }
/* ---------- 进入前校验页 ---------- */
.gate-wrap { display: flex; align-items: center; justify-content: center; min-height: 70vh; padding: 20px; }
.gate-card {
  width: 100%; max-width: 430px; text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px 24px;
  box-shadow: 0 18px 50px -22px rgba(20, 40, 90, .35);
}
.gate-logo { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 20px; overflow: hidden; }
.gate-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gate-title { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.gate-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; letter-spacing: 1px; }
.gate-field { display: flex; gap: 8px; margin-top: 22px; }
.gate-field .input { flex: 1; height: 42px; font-size: 15px; text-align: center; letter-spacing: 2px; }
.gate-msg { min-height: 20px; margin-top: 10px; font-size: 13px; }
.gate-msg.err { color: #e5484d; }
.gate-msg.ok { color: #17a673; }
.gate-hint { margin-top: 8px; font-size: 12px; color: var(--ink-3); line-height: 1.8; text-align: left; background: #f7f9ff; border-radius: 10px; padding: 10px 12px; }
.gate-foot { margin-top: 14px; font-size: 12.5px; }
.gate-foot a { color: var(--accent-dark); text-decoration: none; }
.gate-foot a:hover { text-decoration: underline; }
/* ---------- 流量小卡片 ---------- */
.stat-mini { text-align: center; padding: 10px 6px; background: #f7f9ff; border-radius: 10px; }
.stat-mini .n { font-size: 17px; font-weight: 800; color: var(--accent-dark); }
.stat-mini .l { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
/* ==================================================================
   液态玻璃（Liquid Glass）视觉层
   · 半透明 + 背景模糊 + 饱和增强 → 玻璃质感
   · 内侧高光 + 外侧柔和投影 → 玻璃厚度
   · 页面切换淡入上浮 → 丝滑
   只覆盖外观，不改任何布局尺寸。   ================================================================== */

:root {
  --glass-blur: 10px;      /* 从 18px 降下来：模糊半径越大越吃 GPU，10px 观感几乎一样 */
  --glass-sat: 150%;
  --glass-bg: linear-gradient(150deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .74));
  --glass-line: rgba(255, 255, 255, .70);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .35);
  --glass-shadow: 0 1px 2px rgba(20, 33, 66, .04), 0 10px 30px -14px rgba(20, 33, 66, .28), 0 2px 8px -4px rgba(20, 33, 66, .10);
  --ease-out: cubic-bezier(.22, .80, .28, 1);
  --ease-spring: cubic-bezier(.34, 1.42, .44, 1);
}

/* ---------- 背景：静态彩色底（不模糊、不动画，滚动零成本） ---------- */
body {
  background: #eef2fa;   /* 兜底底色 */
}

/* 原来这里是两个 blur(70px) + 无限漂移的巨型光斑。
   实测那会让滚动掉到 11fps（关闭后 60fps）：模糊层 + 每帧重绘整页太贵；
   现在改成一张 **静态** 固定层：径向渐变本身就是软的，不需要 filter，也不动。 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 780px at 8% -12%, #dce8ff 0%, rgba(220, 232, 255, 0) 62%),
    radial-gradient(900px 700px at 102% -4%, #ecdcff 0%, rgba(236, 220, 255, 0) 58%),
    radial-gradient(1000px 820px at 46% 116%, #d6f3ea 0%, rgba(214, 243, 234, 0) 62%),
    linear-gradient(165deg, #f6f8fd 0%, #eef2fa 100%);
}

#app { position: relative; z-index: 1; }

/* ---------- 侧栏：深色玻璃 ---------- */
/* 侧栏是固定面板、底色本来就接近不透明，去掉背景模糊观感几乎不变、还省一层大模糊 */
.sidebar {
  background: linear-gradient(170deg, rgba(30, 41, 70, .95) 0%, rgba(20, 27, 48, .93) 100%);
  border-right: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 24px 0 50px -40px rgba(0, 0, 0, .9);
}
.brand-logo { transition: transform .5s var(--ease-spring); }
.brand-logo:hover { transform: scale(1.06) rotate(-2deg); }

.nav-item {
  border-radius: 13px;
  transition: background .26s var(--ease-out), transform .26s var(--ease-out), box-shadow .26s var(--ease-out);
}
.nav-item:hover { background: rgba(255, 255, 255, .10); transform: translateX(3px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(61, 107, 255, .62), rgba(124, 77, 255, .40));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .30), 0 8px 22px -10px rgba(61, 107, 255, .95);
}
.key-pill {
  backdrop-filter: blur(8px);
  border-radius: 10px;
  transition: transform .25s var(--ease-out);
}
.key-pill:active { transform: scale(.97); }

/* ---------- 顶栏：吸附式玻璃条 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  /* 吸附条每帧都在内容上方重新模糊，所以半径压到 10px、底色更实一些 */
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .74));
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .62);
  box-shadow: 0 10px 30px -24px rgba(20, 33, 66, .55);
}

/* ---------- 卡片：主玻璃面 ---------- */
/* 注意：卡片是页面上数量最多、面积最大的元素（一页 10 个左右）。   给它们加 backdrop-filter 会让浏览器为每张卡片单独做一次背景模糊，
   滚动时每帧都要重算 —— 实测这就是「卡卡的」的主因。   这里改成：不透背景模糊，只用渐变的半透明的白 + 玻璃高光/投影，观感接近、成本几乎为零。 */
.card {
  position: relative;
  border-radius: 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-hi), var(--glass-shadow);
  transition: transform .34s var(--ease-out), box-shadow .34s var(--ease-out), border-color .34s;
}
/* 顶部一道高光，模拟玻璃边缘的反光 */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: .75;
  mix-blend-mode: screen;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--glass-hi), 0 18px 44px -18px rgba(20, 33, 66, .34), 0 2px 10px -4px rgba(20, 33, 66, .12);
}
.card > * { position: relative; z-index: 1; }

/* ---------- 按钮：玻璃胶囊 ---------- */
.btn {
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .78));
  border: 1px solid rgba(255, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 2px 8px -3px rgba(20, 33, 66, .22);
  transition: transform .18s var(--ease-spring), box-shadow .22s var(--ease-out), background .22s, border-color .22s;
}
.btn:hover { transform: translateY(-1.5px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .98), 0 8px 20px -8px rgba(20, 33, 66, .34); }
.btn:active { transform: translateY(0) scale(.972); transition-duration: .08s; }
.btn.primary {
  background: linear-gradient(180deg, #4a74ff 0%, #2b5cff 55%, #1c40c4 100%);
  border-color: rgba(255, 255, 255, .34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -10px rgba(43, 92, 255, .95);
  color: #fff;
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ok { background: linear-gradient(180deg, #12b47c, #0a9d6a); border-color: rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px -12px rgba(10, 157, 106, .9); }
.btn.danger { background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(253, 236, 236, .8)); border-color: rgba(244, 198, 199, .9); }

/* ---------- 输入控件：内凹玻璃 ---------- */
.input, .select, .textarea {
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .92));
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 2px 5px -2px rgba(20, 33, 66, .12), 0 1px 0 rgba(255, 255, 255, .7);
  transition: box-shadow .24s var(--ease-out), border-color .24s, background .24s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(43, 92, 255, .55);
  box-shadow: inset 0 1px 3px -1px rgba(20, 33, 66, .10), 0 0 0 4px rgba(43, 92, 255, .16);
}

/* ---------- 弹窗 / 提示：厚玻璃 ---------- */
.modal-mask, .overlay-mask, .modal-mask {
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  background: rgba(18, 26, 48, .34);
}
.modal, .overlay > .modal, .modal-card {
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90));
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 40px 80px -30px rgba(12, 20, 44, .55);
  animation: modalIn .34s var(--ease-spring);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.965); } to { opacity: 1; transform: none; } }

.toast {
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .88));
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 18px 40px -18px rgba(20, 33, 66, .45);
  animation: toastIn .34s var(--ease-spring);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- 标签 / 芯片 ---------- */
.tag, .chip {
  backdrop-filter: blur(6px);
  transition: transform .2s var(--ease-out), box-shadow .2s;
}
.chip:hover { transform: translateY(-1px); }
.chip.on { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 6px 16px -8px rgba(43, 92, 255, .8); }

.tab {
  border-radius: 11px 11px 0 0;
  transition: background .24s var(--ease-out), color .24s;
}

/* ---------- 表格：玻璃行 ---------- */
tbody tr { transition: background .2s var(--ease-out); }
tbody tr:hover { background: rgba(255, 255, 255, .6); }

/* ---------- 页面切换：淡入 + 轻微上浮 ----------
   只在【真的换了页面】时播一次（main.js 会在新页面上加 .anim-in，700ms 后去掉）。
   以前是所有重绘都播：数据同步、点个按钮都会让整页卡片重新浮现一遍，既费性能又闪眼。 */
#page.anim-in {
  animation: pageIn .24s var(--ease-out) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
/* 卡片依次浮现，形成流动感 */
#page.anim-in > .card, #page.anim-in > .morning-grid > .card {
  animation: cardIn .26s var(--ease-out) both;
}
#page.anim-in > .card:nth-child(1) { animation-delay: .01s; }
#page.anim-in > .card:nth-child(2) { animation-delay: .03s; }
#page.anim-in > .card:nth-child(3) { animation-delay: .05s; }
#page.anim-in > .card:nth-child(4) { animation-delay: .07s; }
#page.anim-in > .card:nth-child(n+5) { animation-delay: .09s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 早读全屏演示：玻璃化（浅色/深色都适配） ----------
   全屏浮层正好是整屏面积，背景几乎不透明，就不做背景模糊了：
   演示页每秒刷新一次时钟，模糊层会跟着一起重算，容易掉帧。 */
.present { background: linear-gradient(160deg, rgba(246, 248, 253, .96), rgba(232, 238, 250, .96)); }
.present.dark { background: linear-gradient(160deg, rgba(12, 20, 38, .96), rgba(24, 34, 58, .94)); }
.present-head, .present-foot {
  background: rgba(255, 255, 255, .50);
}
.present.dark .present-head, .present.dark .present-foot { background: rgba(255, 255, 255, .05); }
.present-quote { background: rgba(255, 255, 255, .55); }
.present-btn { border-radius: 10px; transition: transform .18s var(--ease-spring), background .2s; }
.present-btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, .35); }
.present-btn:active { transform: scale(.96); }
.present-tasks li { transition: background .2s; }

/* ---------- 滚动条：细玻璃条 ---------- */
* { scrollbar-width: thin; scrollbar-color: rgba(120, 140, 180, .45) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(120, 140, 180, .40); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(90, 110, 155, .6); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 无障碍：用户开启「减少动态效果」时全部静止 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body::before, body::after { animation: none; }
}

/* ---------- 性能与兼容兜底 ---------- */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .card { background: rgba(255, 255, 255, .96); }
  .topbar { background: rgba(255, 255, 255, .96); }
  .sidebar { background: linear-gradient(170deg, #1e2946 0%, #141b30 100%); }
}

/* ==================================================================
   早读任务的标准 / 导入 / 左栏编辑（延续液态玻璃风格）
   ================================================================== */

/* ---------- 左栏内容：保留原文换行（导入的文档里一行就是一行） ---------- */
.q-body [data-panel-text],
.present-quote [data-panel-text] {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 标红重点：6 种颜色（选中一块区域点色块即可改色） ---------- */
.hl {
  color: var(--hl, #e5484d);
  font-weight: 700;
  background: var(--hl-bg, rgba(229, 72, 77, .10));
  border-radius: 4px;
  padding: 0 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
/* 每套颜色两个变量：文字色 / 淡底 —— 想调色只改这两行 */
.hl-red    { --hl: #e5484d; --hl-bg: rgba(229, 72, 77, .10); }
.hl-orange { --hl: #e8590c; --hl-bg: rgba(232, 89, 12, .10); }
.hl-amber  { --hl: #a16207; --hl-bg: rgba(199, 145, 0, .14); }
.hl-green  { --hl: #1a7f4b; --hl-bg: rgba(26, 127, 75, .11); }
.hl-blue   { --hl: #1c5fd4; --hl-bg: rgba(28, 95, 212, .10); }
.hl-purple { --hl: #8b46d6; --hl-bg: rgba(139, 70, 214, .10); }
/* 深色演示页下把文字调亮一点，保证看得清 */
.present.dark .hl-red    { --hl: #ff9ea2; --hl-bg: rgba(229, 72, 77, .22); }
.present.dark .hl-orange { --hl: #ffb27a; --hl-bg: rgba(232, 89, 12, .22); }
.present.dark .hl-amber  { --hl: #ffd479; --hl-bg: rgba(199, 145, 0, .22); }
.present.dark .hl-green  { --hl: #86e0a8; --hl-bg: rgba(26, 127, 75, .26); }
.present.dark .hl-blue   { --hl: #9dc0ff; --hl-bg: rgba(28, 95, 212, .26); }
.present.dark .hl-purple { --hl: #d3a8ff; --hl-bg: rgba(139, 70, 214, .26); }
/* 已完成的任务淡一点 */
.mt-item.done .hl, .present-tasks li.done .hl { opacity: .62; }

/* 气泡里的一排色块 */
.hl-colors { display: flex; gap: 6px; align-items: center; }
.hl-dot {
  width: 24px; height: 24px; padding: 0; border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%; cursor: pointer; background: var(--dot, #e5484d);
  box-shadow: 0 1px 4px rgba(12, 20, 44, .28);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  transition: transform .14s var(--ease-spring), box-shadow .18s;
}
.hl-dot span { opacity: .85; }
.hl-dot:hover { transform: translateY(-2px) scale(1.08); box-shadow: 0 4px 10px rgba(12, 20, 44, .3); }
.hl-dot:active { transform: scale(.94); }
.hl-sep { width: 1px; align-self: stretch; background: rgba(120, 132, 160, .28); margin: 2px 2px; }
/* 「手动标红」弹窗里的选色行 */
.mm-colors { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mm-color {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  background: var(--dot, #e5484d); padding: 0;
}
.mm-color.on { border-color: #2b5cff; box-shadow: 0 0 0 3px rgba(43, 92, 255, .18); }

/* ---------- 选中文字后浮出的小气泡 ---------- */
.hl-bubble {
  position: fixed;
  z-index: 420;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .90));
  box-shadow: 0 12px 30px -12px rgba(12, 20, 44, .38);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 20px 40px -20px rgba(20, 33, 66, .55);
  animation: bubbleIn .2s var(--ease-spring);
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: none; } }
.hl-bubble .btn { white-space: nowrap; }

/* 可编辑任务文本：聚焦时给一点玻璃高光 */
.mt-text[contenteditable="true"]:focus {
  outline: 2px solid rgba(43, 92, 255, .35);
  outline-offset: 2px;
  border-radius: 6px;
}
.mt-ops { flex-wrap: wrap; justify-content: flex-end; }
.mt-ops .btn.xs { white-space: nowrap; }

/* ---------- 左栏自定义内容 ---------- */
.q-body .q-custom {
  font-size: 17px; line-height: 1.9; font-weight: 600; letter-spacing: .3px;
  white-space: pre-wrap; word-break: break-word;
}
.present-quote .qt-box .q-custom { font-size: 1em; }

/* ---------- 导入试卷：文档选择列表 ---------- */
.doc-pick {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 48vh; overflow: auto; padding: 2px;
}
.doc-pick-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  cursor: pointer; background: rgba(255, 255, 255, .60);
  backdrop-filter: blur(8px);
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s, background .2s;
}
.doc-pick-item:hover { transform: translateY(-1px); border-color: rgba(43, 92, 255, .45); box-shadow: 0 12px 24px -16px rgba(43, 92, 255, .85); }
.doc-pick-item.on { border-color: var(--accent); background: rgba(43, 92, 255, .10); }
.doc-pick-item[data-busy] { opacity: .6; cursor: progress; }
.dpi-title { font-weight: 600; font-size: 13.5px; }
.dpi-meta { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ---------- 英语：左栏占一半宽度（语文保持原样） ---------- */
.morning-grid.mg-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.present.split .present-quote { flex: 0 0 50vw; }

@media (max-width: 900px) {
  .morning-grid.mg-split { grid-template-columns: minmax(0, 1fr); }
  .present.split .present-quote { flex: 0 0 auto; }
}
/* ---------------- 使用说明页 ---------------- */
.card-body { padding: 14px 18px 18px; }
.mt4 { margin-top: 4px; }
.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.kv-cell {
  border: 1px solid var(--line, #e7ebf3);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg-soft, #f8fafc);
}
.kv-label { font-size: 12px; color: #7b869c; margin-bottom: 4px; }
.kv-value { font-size: 14px; font-weight: 600; color: #1c2333; word-break: break-all; }
.kv-value.ok { color: #0a9d6a; }
.kv-value.warn { color: #d97706; }

.step-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eef1f8; }
.step-row:last-child { border-bottom: 0; }
.step-no {
  flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #2b5cff; color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; color: #1c2333; }

.doc-row { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px dashed #eef1f8; }
.doc-row:last-child { border-bottom: 0; }
.doc-name {
  flex: none; width: 84px; font-size: 14px; font-weight: 600; color: #2b5cff;
}

.faq-item {
  border: 1px solid var(--line, #e7ebf3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #fff;
}
.faq-item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #1c2333;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '▸ '; color: #9aa3b8; }
.faq-item[open] summary::before { content: '▾ '; }
.faq-body { margin-top: 8px; line-height: 1.75; color: #4a5568; }