/* ============ 现代设计系统与基础规范 ============ */
:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-light: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-subtle: #f1f5f9;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-weak: #ecfdf5;
  --primary-glow: rgba(5, 150, 105, 0.18);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-weak: #eff6ff;
  --ok: #10b981;
  --ok-weak: #ecfdf5;
  --bad: #ef4444;
  --bad-weak: #fef2f2;
  --warn: #f59e0b;
  --warn-weak: #fffbeb;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 1px 3px 0 rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100vw;
}
html.material-mode-root {
  scroll-padding-top: calc(var(--topbar-h, 46px) + var(--mat-sticky-h, 56px) + 12px);
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100vw;
  width: 100%;
}
a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; }

/* ============ 顶栏（毛玻璃与高精布局） ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.2s, box-shadow 0.2s;
}
.topbar-inner {
  max-width: 1140px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
}
.brand-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
  background: var(--primary-weak);
  border: 1px solid #a7f3d0;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}
.topnav { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.topnav a {
  position: relative;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.topnav a:hover {
  color: var(--ink);
  background: var(--line-subtle);
}
.topnav a.active {
  color: var(--primary);
  background: var(--primary-weak);
  font-weight: 700;
}
.topnav a.has-unread { color: var(--ink); font-weight: 700; }
.topnav a.has-mention { color: var(--bad); }
.nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 12px;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}
#account-link {
  max-width: min(34vw, 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  background: #fff;
}
#account-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-weak);
}
body.locked .topnav a:not(#account-link) { display: none; }

#app {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 20px 72px;
  min-height: calc(100vh - 140px);
}
.footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px 32px;
  color: #94a3b8;
  font-size: 12px;
}
/* ============ 通用卡片与按钮 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 18px;
  transition: box-shadow 0.2s var(--ease-spring), border-color 0.2s;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.16s var(--ease-spring);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-weak);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.975);
}
.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
.btn:disabled:hover {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}
.btn.is-busy { cursor: wait; }
.btn.is-blocked {
  opacity: .62;
  border-style: dashed;
}
.btn.is-blocked:hover {
  border-color: var(--bad);
  color: var(--bad);
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28);
}
.btn.primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 5px 16px rgba(5, 150, 105, 0.38);
  color: #fff;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
.btn.ghost:hover {
  color: var(--primary);
  background: var(--primary-weak);
}
.btn.small {
  padding: 5px 12px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}
.btn.danger { color: var(--bad); }
.btn.danger:hover {
  border-color: var(--bad);
  background: var(--bad-weak);
  color: var(--bad);
}
.btn.success { color: var(--ok); }
.btn.success:hover {
  border-color: var(--ok);
  background: var(--ok-weak);
  color: var(--ok);
}
.btn.review-request {
  border-color: #efd59a;
  background: #fffaf0;
  color: #8a5b00;
  font-weight: 700;
}
.btn.review-request:hover {
  border-color: #dba83a;
  background: #fff3cf;
  color: #704700;
}
.btn.review-sent {
  border-color: #f0b4b4;
  background: #fff1f1;
  color: #8d1f1f;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(141, 31, 31, .08);
}
.btn.review-sent:hover {
  border-color: #df8585;
  background: #ffe5e5;
  color: #781818;
}
.btn.keyword-toggle.active {
  border-color: #f0d36f;
  background: #fff8df;
  color: #8a6700;
}

.badge {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; vertical-align: 2px;
}
.badge.type { background: var(--accent-weak); color: var(--accent); }
.badge.diff-易 { background: var(--ok-weak); color: var(--ok); }
.badge.diff-中 { background: var(--warn-weak); color: var(--warn); }
.badge.diff-难 { background: var(--bad-weak); color: var(--bad); }
.badge.ai { background: #f3e8ff; color: #7c3aed; }
.question-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.card-head-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.card-note-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
  height: 26px;
  box-sizing: border-box;
}
.card-note-btn:hover {
  border-color: #059669;
  color: #047857;
  background: #ecfdf5;
}
.card-note-btn.is-noted {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
}
.card-note-icon {
  font-size: 12px;
  line-height: 1;
}
.card-note-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}
.card-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: var(--card, #fff);
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
  height: 26px;
  box-sizing: border-box;
}
.card-help-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
  transform: translateY(-1px);
}
.card-help-btn:active {
  transform: scale(0.96);
}
.card-help-icon {
  font-size: 12px;
  line-height: 1;
}
.card-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
  height: 26px;
  box-sizing: border-box;
}
.card-fav-btn:hover {
  border-color: #f59e0b;
  color: #d97706;
  background: #fffbeb;
}
.card-fav-btn.is-faved {
  border-color: #fde68a;
  background: #fffbeb;
  color: #d97706;
  font-weight: 700;
}
.card-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: var(--card, #fff);
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  touch-action: manipulation;
  height: 26px;
  box-sizing: border-box;
}
.card-report-btn:hover {
  border-color: #dc2626;
  color: #b91c1c;
  background: #fef2f2;
  transform: translateY(-1px);
}
.card-report-btn:active {
  transform: scale(0.96);
}
.card-report-icon {
  font-size: 12px;
  line-height: 1;
}
.card-fav-star {
  font-size: 13px;
  line-height: 1;
}
.tag-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
.q-tag {
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 6px);
  padding: 2px 9px;
  border: 1px solid #e6dcc6;
  border-radius: 999px;
  background: #fffaf0;
  color: #755b1b;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  box-sizing: border-box;
}
.q-tag.muted { color: #9aa2b2; border-color: #e8ebf2; background: #fafbfe; }
.q-tag.q-tag-clickable {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.q-tag.q-tag-clickable:hover {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
  transform: translateY(-1px);
}
.meta-edit-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  padding: 1px 4px;
  cursor: pointer;
}
.meta-edit-btn:hover { color: var(--accent); text-decoration: underline; }

.meta-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(31, 36, 48, .38);
}
.meta-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(31, 36, 48, .24);
  padding: 18px;
}
.meta-dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.meta-question {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f9fd;
  font-size: 14px;
  margin-bottom: 12px;
}
.meta-field { margin-bottom: 12px; }
.meta-field > span { align-items: baseline; }
.meta-field small { color: var(--muted); font-weight: 400; margin-left: 8px; }
.meta-system { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }

/* 复习资料导出弹窗 */
.export-dialog { width: min(460px, 100%); }
.export-field { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; }
.export-field > span { flex: 0 0 42px; color: var(--muted); font-size: 13px; padding-top: 6px; }
.export-choices { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.export-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 9px; padding: 6px 11px;
  font-size: 13.5px; cursor: pointer; background: #fff; user-select: none;
}
.export-chip:hover { border-color: var(--accent); }
.export-chip input { margin: 0; cursor: pointer; }
.export-chip:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.export-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.progress-track { height: 6px; background: #edf0f7; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }

.toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%);
  background: #272c3a; color: #fff; font-size: 14px;
  padding: 9px 18px; border-radius: 10px; z-index: 999;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  pointer-events: none;
}
.toast.show {
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.shortcut-notice {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 72;
  width: 175px;
  pointer-events: none;
}
.shortcut-notice[hidden] { display: none; }
.shortcut-notice-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(30, 41, 82, 0.12), 0 2px 8px rgba(30, 41, 82, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  max-height: min(500px, calc(100vh - 60px));
  overflow-y: auto;
  scrollbar-width: thin;
}
.shortcut-notice-inner .shortcut-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.shortcut-notice-inner .shortcut-header-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}
.shortcut-notice-inner .shortcut-close-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1;
  border-radius: 4px;
  transition: all .15s ease;
}
.shortcut-notice-inner .shortcut-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.shortcut-notice-inner .shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.shortcut-notice-inner .shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.shortcut-notice-inner .shortcut-keys {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.shortcut-notice-inner kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin: 0 1px;
  padding: 0 4px;
  border: 1px solid #cbd5e1;
  border-bottom-color: #94a3b8;
  border-radius: 4px;
  background: #f8fafc;
  color: #1e293b;
  font: 600 10.5px/1 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  box-shadow: inset 0 -1px 0 rgba(30, 41, 82, .06);
}
.shortcut-notice-inner .shortcut-desc {
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
  text-align: right;
  flex: 1 1 auto;
}
.shortcut-notice-inner .shortcut-footer {
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}
.shortcut-notice-inner .shortcut-dismiss-btn {
  width: 100%;
  font-size: 11px;
  padding: 3px 6px;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #f8fafc;
  cursor: pointer;
  transition: all .15s ease;
}
.shortcut-notice-inner .shortcut-dismiss-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}


.system-notice {
  position: sticky;
  top: 48px;
  z-index: 49;
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 16px 0;
}
.system-notice-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #f3c970;
  border-radius: 12px;
  background: #fff8df;
  color: #5f4312;
  box-shadow: 0 8px 24px rgba(122, 89, 20, .12);
  padding: 12px 14px;
}
.system-notice b { display: inline-block; margin-right: 8px; }
.system-notice span { color: #8a6700; font-size: 12px; }
.system-notice p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.system-notice .btn { flex: 0 0 auto; }

.page-title { font-size: 22px; font-weight: 700; margin: 4px 0 14px; }
.page-title small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.back-row { margin-bottom: 12px; font-size: 14px; }

/* ============ 首页与看板 ============ */
.hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.hero .stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.hero .stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}
.hero .stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero .stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.subject-card {
  cursor: pointer;
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring), border-color 0.2s;
  position: relative;
}
.subject-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}
.subject-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.subject-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.subject-card .sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 14px;
}
.subject-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 10px;
}
.subject-status-badge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-weak);
  color: var(--primary);
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.subject-status-badge.next,
.subject-status-badge.soon {
  background: #fff4d8;
  color: #8a5b00;
}
.subject-exam-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #bfe8d0;
  border-radius: 8px;
  background: #f1fbf5;
  color: #147a45;
  font-size: 12px;
}
.subject-exam-status b { font-size: 13px; }
.subject-exam-status span { color: #3f8d62; }
.subject-exam-status.next,
.subject-exam-status.soon {
  border-color: #f2d28a;
  background: #fff9e8;
  color: #8a5b00;
}
.subject-exam-status.next span,
.subject-exam-status.soon span { color: #9a6b18; }

/* ============ 科目页 ============ */
.bank-row { display: flex; flex-direction: column; gap: 10px; }
.bank-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.bank-head h3 { margin: 0; font-size: 16px; }
.bank-head .nums { color: var(--muted); font-size: 12.5px; }
.mode-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mode-row select {
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px;
  font-size: 13px; background: #fff; color: var(--ink);
}
.material-link { display: flex; align-items: center; gap: 8px; padding: 10px 2px; font-size: 15px; }

/* ============ 标签复习 ============ */
.tag-filter-card { display: grid; gap: 12px; }
.tag-filter-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.tag-filter-row select,
.tag-filter-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e6dcc6;
  border-radius: 999px;
  background: #fffaf0;
  color: #624a17;
  padding: 5px 9px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.tag-chip b {
  color: #8a6700;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.tag-chip:hover,
.tag-chip.active {
  border-color: #e2b93b;
  background: #fff3c4;
  color: #4e3708;
}
.tag-selected { display: grid; gap: 16px; }
.tag-selected-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.tag-selected-head h3 { margin: 0 0 2px; }
.tag-selected-head p { margin: 0; }
.tag-bank-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.tag-bank-section:first-of-type { border-top: 0; padding-top: 0; }
.tag-bank-actions { margin: 8px 0 10px; }
.tag-review-list { display: grid; gap: 10px; }
.tag-review-q {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcff;
  padding: 12px 14px;
}
.tag-review-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.tag-review-opts {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: #3c4354;
  font-size: 14px;
}
.tag-review-opts .right {
  color: #14532d;
  font-weight: 700;
}

/* ============ 账号 ============ */
.account-card code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #f3f5fb;
  color: #3c4354;
}
.account-rename-required {
  border-color: #f2c4c4;
  background: #fffafa;
}
.account-warning {
  border-color: #f2c4c4;
  background: #fff3f3;
  color: #8d1f1f;
}
.form-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 14px;
}
.form-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
}
.form-row input:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }

/* ============ 用户管理 ============ */
.admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.admin-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-stat.online {
  border-color: #a7f3d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}
.admin-stat-icon {
  font-size: 26px;
  line-height: 1;
}
.admin-stat-content b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}
.admin-stat-content span {
  color: var(--muted);
  font-size: 12px;
}
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.admin-card-head h3 { margin: 0 0 2px; }
.admin-card-head p { margin: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { min-width: 940px; }
.admin-table th,
.admin-table td { vertical-align: top; }
.admin-user-main { min-width: 260px; }
.admin-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}
.admin-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aeb5c4;
}
.admin-status.online { color: var(--ok); }
.admin-status.online::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-weak); }
.admin-sessions {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}
.admin-session {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
}
.admin-session span {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-session.online span:first-child { color: var(--ok); font-weight: 700; }
.username-review-flag {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid #f2c4c4;
  border-radius: 8px;
  background: #fff7f7;
  color: #8d1f1f;
  font-size: 12px;
}
.username-review-flag small { color: #a06262; }
.chat-mute-flag {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid #f3c970;
  border-radius: 8px;
  background: #fff8df;
  color: #6b4a08;
  font-size: 12px;
}
.chat-mute-flag small { color: #8a6700; }
.username-review-card { display: grid; gap: 12px; }
.username-review-list {
  display: grid;
  gap: 8px;
}
.username-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}
.username-review-item.is-required {
  border-color: #f2c4c4;
  background: #fff7f7;
}
.username-review-item b { margin-right: 6px; }
.username-review-item p { margin: 3px 0 0; }
.admin-actions {
  min-width: 156px;
  white-space: nowrap;
}
.admin-actions .btn { margin: 0 3px 5px 0; }
.admin-notice-card .draft-box { margin-top: 12px; }
.system-notice-preview {
  border: 1px solid #f3c970;
  border-radius: 10px;
  background: #fff8df;
  color: #5f4312;
  padding: 10px 12px;
}
.system-notice-preview b { margin-right: 8px; }
.system-notice-preview span { color: #8a6700; font-size: 12px; }
.system-notice-preview p { margin: 5px 0 0; }
.admin-notice-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-top-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.admin-desktop-table {
  display: block;
}
.admin-mobile-user-list {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.admin-mobile-user-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.admin-m-card-header {
  margin-bottom: 5px;
}
.admin-m-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-m-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.admin-m-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
}
.admin-m-kpi-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: #f8fafc;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 11.5px;
}
.admin-m-kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  flex: 1;
  justify-content: center;
}
.admin-m-kpi-chip b {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}
.admin-m-kpi-chip.has-wrong b {
  color: var(--bad);
}
.admin-m-sess-details {
  margin-bottom: 5px;
  border-radius: 6px;
  background: #f8f9fc;
  padding: 3px 6px;
  font-size: 11px;
}
.admin-m-sess-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
}
.admin-m-sess-summary::-webkit-details-marker {
  display: none;
}
.admin-m-sess-toggle-btn {
  color: var(--accent);
  font-size: 10.5px;
}
.admin-m-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px dashed var(--line-subtle, #e2e8f0);
}
.admin-m-actions .btn.small {
  height: 24px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 22px;
  border-radius: 5px;
}
.admin-notice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 2px 0;
}
.admin-notice-summary::-webkit-details-marker {
  display: none;
}
.admin-notice-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-notice-summary-left b {
  font-size: 13.5px;
}
.admin-notice-toggle-text {
  font-size: 11.5px;
  color: var(--accent);
}
.inline-input {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.inline-input input {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 8px;
  font: inherit;
  color: var(--ink);
}

/* ============ 练习页 ============ */
body.practice-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}
body.practice-mode #app {
  height: calc(100% - 49px);
  padding: 12px 16px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.practice-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.practice-top {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 9px; font-size: 14px;
}
.practice-top .spacer { flex: 1; }
.practice-top .counter { color: var(--muted); font-variant-numeric: tabular-nums; }
.practice-progress {
  flex: 0 0 auto;
}
.practice-card.card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 10px 0 0;
  overflow: hidden;
}
.practice-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 12px;
}
.q-text { font-size: 17px; margin: 10px 0 4px; white-space: normal; line-height: 1.6; }
.q-text .qnum { color: var(--muted); font-weight: 700; margin-right: 4px; }
.math-var {
  display: inline-block;
  font-family: "Times New Roman", Cambria, Georgia, serif;
  font-style: italic;
  letter-spacing: 0;
  margin: 0 .03em;
}
.math-var sub,
.math-var sup {
  font-size: .68em;
  line-height: 0;
  font-style: normal;
}
.math-var sub { vertical-align: -0.28em; }
.math-var sup { vertical-align: .48em; }
.katex { font-size: 1.05em; text-rendering: auto; }
.katex-display { margin: .5em 0; }
.katex-display-wrapper {
  display: block;
  margin: 10px 0;
  text-align: center;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.katex-display-wrapper .katex-display {
  margin: 0;
}
.math-formula {
  font-family: 'KaTeX_Math', 'Times New Roman', Cambria, serif;
  font-style: italic;
  padding: 0 2px;
}
.math-formula.math-display {
  display: block;
  text-align: center;
  margin: 8px 0;
  font-style: normal;
}
.kw-mark {
  color: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0) 48%, #fff0a8 48%);
  border-radius: 3px;
  padding: 0 .08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
img.qimg { display: block; max-width: 100%; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; }
.opt-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
/* ---- 多选题选项下方确认答案按钮 ---- */
.multi-confirm-row {
  margin-top: 14px;
  margin-bottom: 8px;
}
.multi-confirm-row .btn-confirm {
  width: 100%;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all .16s ease;
}
.multi-confirm-row .btn-confirm:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}
@media (max-width: 640px) {
  .multi-confirm-row {
    margin-top: 12px;
    margin-bottom: 6px;
  }
  .multi-confirm-row .btn-confirm {
    padding: 11px 16px;
    font-size: 14.5px;
  }
}
.opt {
  display: flex; gap: 14px; align-items: center;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 13px 18px; cursor: pointer; font-size: 15.5px; line-height: 1.6;
  transition: all .16s var(--ease-spring); background: #fff; text-align: left; width: 100%;
  box-shadow: var(--shadow-sm); user-select: none; touch-action: manipulation;
}
.opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-weak);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.opt:active:not(:disabled) { transform: scale(0.985); }
.opt .k {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--line-subtle); border: 1.5px solid var(--line);
  font-weight: 800; color: var(--muted); font-size: 13.5px; flex-shrink: 0;
  transition: all .16s var(--ease-spring);
}
.opt img { max-height: 2.8em; vertical-align: middle; border-radius: 4px; }
.opt.sel { border-color: var(--accent); background: var(--accent-weak); font-weight: 500; }
.opt.sel .k { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35); }
.opt.right { border-color: var(--ok); background: var(--ok-weak); color: #065f46; font-weight: 500; }
.opt.right .k { border-color: var(--ok); background: var(--ok); color: #fff; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }
.opt.wrong { border-color: var(--bad); background: var(--bad-weak); color: #991b1b; }
.opt.wrong .k { border-color: var(--bad); background: var(--bad); color: #fff; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35); }
.opt.dim { opacity: .5; }
.opt:disabled { cursor: default; }
.opt:disabled:hover { transform: none; box-shadow: var(--shadow-sm); }

.verdict { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 14.5px; }
.verdict.ok { background: var(--ok-weak); color: #14532d; }
.verdict.bad { background: var(--bad-weak); color: #7f1d1d; }
.verdict.info { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.practice-reveal-verdict { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.reveal-verdict-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reveal-notice-pill { font-size: 12px; background: #e0f2fe; color: #0284c7; padding: 2px 8px; border-radius: 6px; font-weight: 600; border: 1px solid #bae6fd; }
.reveal-verdict-action { display: flex; align-items: center; gap: 6px; }
.reveal-hint-text { font-size: 12.5px; color: #64748b; }
.verdict b { font-size: 15px; }
.exp-box {
  margin-top: 10px; padding: 12px 14px; border-radius: 10px;
  background: #f8f9fd; border: 1px dashed var(--line);
  font-size: 14.5px; color: #3c4354; white-space: pre-wrap;
}
.exp-box .pt { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ============ 现代结构化解析卡片规范 ============ */
.exp-box.exp-card-structured {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.65;
  white-space: normal;
}
.exp-point-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--accent-weak);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 12px;
}
.exp-point-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--accent-hover);
  white-space: nowrap;
}
.exp-point-val {
  color: var(--ink);
  font-weight: 600;
}
.exp-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.exp-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 4px;
}
.exp-sec-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.exp-sec-icon {
  font-size: 15px;
}
.exp-sec-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-light);
  white-space: pre-wrap;
}
.exp-opt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.exp-opt-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: var(--bg);
}
.exp-opt-item.opt-ok {
  background: var(--ok-weak);
  border-color: rgba(16, 185, 129, 0.35);
  border-left: 4px solid var(--ok);
}
.exp-opt-item.opt-bad {
  background: var(--bad-weak);
  border-color: rgba(239, 68, 68, 0.25);
  border-left: 4px solid var(--bad);
}
.exp-opt-item.opt-neutral {
  background: var(--bg);
  border-color: var(--line);
  border-left: 4px solid var(--muted);
}
.exp-opt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.exp-opt-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 13.5px;
}
.opt-status-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
}
.opt-status-badge.ok {
  background: #dcfce7;
  color: #15803d;
}
.opt-status-badge.bad {
  background: #fee2e2;
  color: #b91c1c;
}
.exp-opt-text {
  color: var(--ink-light);
  font-size: 13.5px;
}
.exp-opt-plain-line {
  padding: 4px 0;
  color: var(--ink-light);
  font-size: 13.5px;
  line-height: 1.6;
}
.exp-tip-callout {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-weak);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--warn);
}
.exp-tip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 4px;
}
.exp-tip-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: #78350f;
  white-space: pre-wrap;
}
.exp-legacy-content {
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--ink-light);
}
.ans-block { margin-top: 12px; white-space: pre-wrap; font-size: 15px; background: var(--ok-weak); border-radius: 10px; padding: 12px 14px; }
.draft-box { display: block; margin-top: 14px; }
.draft-box > span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.draft-box small { color: #9aa2b2; font-weight: 400; }
.draft-input {
  width: 100%; min-height: 112px; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 15px;
  background: #fff; color: var(--ink);
}
.draft-input:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }

.practice-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.practice-actions .spacer { flex: 1; }
.practice-footer {
  flex: 0 0 auto;
  min-height: 62px;
  margin-top: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}
.practice-footer .btn.nav-next.is-ready {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}
.practice-footer .btn.nav-next.is-ready:hover {
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}
.practice-footer .btn-sheet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.finish-card {
  margin-top: 14px;
  padding: 14px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}

.sheet { display: none; margin-top: 14px; }
.sheet.open { display: block; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sheet-head b { font-size: 14px; }
.sheet-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.sheet-close { flex: 0 0 auto; }
.sheet-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sheet-cell {
  width: 38px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 12.5px; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.sheet-cell.cur { border-color: var(--accent); color: var(--accent); font-weight: 700; box-shadow: 0 0 0 2px var(--accent-weak); }
.sheet-cell.ok { background: var(--ok-weak); color: var(--ok); border-color: #bbe8cb; }
.sheet-cell.bad { background: var(--bad-weak); color: var(--bad); border-color: #f5c8c8; }
.sheet-cell.done { background: var(--accent-weak); color: var(--accent); border-color: #cbd5ff; }
.sheet-cell.draft { background: #fff8df; color: #9a6700; border-color: #f2d889; }

/* ============ 试卷模式 ============ */
.paper-top { position: sticky; top: 58px; z-index: 20; background: rgba(244,246,251,.9); backdrop-filter: blur(8px); padding: 8px 0; }
.paper-status {
  position: sticky;
  top: 112px;
  z-index: 19;
  padding: 0 0 10px;
}
.paper-status-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.paper-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: 86px; }
.paper-q { margin-bottom: 0; scroll-margin-top: 150px; }
.paper-q-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.paper-q-head .sheet-cell { cursor: default; }
.paper-opt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.paper-opt {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.paper-opt:hover { border-color: #b9c4f9; background: #fafbff; }
.paper-opt input { margin-top: 5px; }
.paper-opt .k { min-width: 22px; color: var(--muted); font-weight: 700; }
.paper-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }
.paper-opt:has(input:checked) .k { color: var(--accent); }
.paper-opt.sel { border-color: var(--accent); background: var(--accent-weak); }
.paper-opt.right { border-color: var(--ok); background: var(--ok-weak); }
.paper-opt.wrong { border-color: var(--bad); background: var(--bad-weak); }
.paper-opt.dim { opacity: .62; }
.paper-draft-box .draft-input { min-height: 132px; }
.paper-item-actions { margin-top: 10px; }

/* 试卷模式解析折叠/展开优化 */
.paper-exp-wrap {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.7);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.paper-exp-wrap.is-open {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.paper-exp-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: left;
  transition: background .15s;
}
.paper-exp-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.06);
}
.paper-exp-toggle-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.paper-exp-toggle-icon {
  font-size: 14px;
}
.paper-exp-toggle-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.paper-exp-point-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
}
.paper-exp-toggle-arrow {
  font-size: 11px;
  color: var(--muted);
  transition: transform .2s ease;
  margin-left: 8px;
}
.paper-exp-toggle-btn.active .paper-exp-toggle-arrow {
  color: var(--accent);
}
.paper-exp-body {
  padding: 4px 12px 12px;
  border-top: 1px dashed var(--line);
}
.paper-exp-body .exp-box {
  margin-top: 8px;
}
.paper-sheet-layer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 69;
  background: transparent;
}
.paper-sheet-layer.open { display: block; }
.paper-sheet-popover.open {
  position: fixed;
  right: max(18px, calc((100vw - 920px) / 2 + 18px));
  bottom: 76px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(62vh, 520px);
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(229, 232, 240, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 16px 48px rgba(30, 41, 82, .22);
  backdrop-filter: blur(10px);
}
.paper-float-actions {
  position: fixed;
  right: max(18px, calc((100vw - 920px) / 2 + 18px));
  bottom: 18px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(229, 232, 240, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 34px rgba(30, 41, 82, .16);
  backdrop-filter: blur(10px);
}
.paper-float-actions .keyword-toggle {
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.2;
}
.paper-float-progress {
  min-width: 52px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* ============ 考试 ============ */
.exam-config .row { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.exam-config label { min-width: 130px; color: var(--muted); font-size: 14px; }
.exam-config input[type=number] {
  width: 90px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 14px;
}
.exam-timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.exam-timer.low { color: var(--bad); }
.score-hero { text-align: center; padding: 26px 0 10px; }
.score-hero .num { font-size: 46px; font-weight: 800; color: var(--accent); }
.score-hero .sub { color: var(--muted); }
.exam-review-item { border-top: 1px solid var(--line); padding: 12px 0; }

/* ============ 搜索 / 统计 / 资料 ============ */
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}
.search-box input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px 8px 36px;
  font-size: 14px;
  height: 38px;
  line-height: normal;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
  color: var(--text, #0f172a);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}
.search-box input::-webkit-search-decoration,
.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-results-button,
.search-box input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.search-box input::placeholder {
  color: var(--muted, #94a3b8);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-box input:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
.result-item { padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.result-item:hover .rq { color: var(--accent); }
.result-item .rmeta { font-size: 12px; color: var(--muted); }
mark { background: #fff3bf; padding: 0 1px; border-radius: 3px; }

.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stat-table th, .stat-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.stat-table th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.stat-table td.num { font-variant-numeric: tabular-nums; }
.stat-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; min-width: 150px; }

.doc h2 { font-size: 18px; margin: 22px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--accent-weak); }
.doc h3 { font-size: 15.5px; margin: 16px 0 6px; color: #2b3550; }
.doc p { margin: 6px 0; font-size: 14.8px; }
.doc img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }

.imgview { text-align: center; }
.imgview .tools { margin-bottom: 10px; display: flex; gap: 8px; justify-content: center; }
.imgview .frame { overflow: auto; max-height: 78vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: grab; }
.imgview img { display: block; margin: 0 auto; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.hint { font-size: 13px; color: var(--muted); }

/* ============ 移动端原生 App 级底部导航栏 ============ */
.bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .shortcut-notice { display: none !important; }
  body:not(.practice-mode) #app {
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-x: clip;
  }
  body:not(.practice-mode) .footer {
    padding: 0 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  body.practice-mode #app {
    box-sizing: border-box;
    height: calc(100% - 44px);
    padding: 2px 6px calc(16px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
  }
  .topbar-inner {
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: flex-start;
    overflow: hidden;
  }
  .brand {
    display: none !important;
  }
  .brand-badge {
    display: none !important;
  }
  .brand-title {
    display: none !important;
  }
  /* 移动端顶栏：所有导航链接均可横向手势滑动点击，不再隐藏 */
  .topnav {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 2px;
  }
  .topnav::-webkit-scrollbar {
    display: none;
  }
  .topnav a {
    display: inline-flex !important;
    flex-shrink: 0;
    font-size: 12.5px;
    padding: 5px 8px;
    white-space: nowrap;
    border-radius: 8px;
  }
  .topnav a.active {
    background: var(--primary-light, #ecfdf5);
    color: var(--primary, #059669);
    font-weight: 700;
  }
  #admin-link:not([hidden]) {
    display: inline-flex !important;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
  }
  #account-link {
    max-width: 95px;
    padding: 5px 8px;
  }

  /* 彻底移除底部导航 */
  .bottom-nav {
    display: none !important;
  }

  /* 移动端首页看板与网格 */
  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
  }
  .hero .stat {
    padding: 12px 14px;
    border-radius: 12px;
  }
  .hero .stat b {
    font-size: 22px;
  }
  .hero .stat span {
    font-size: 12px;
  }
  .subject-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .subject-card {
    padding: 16px;
    border-radius: 14px;
  }
  .subject-card h3 {
    font-size: 16.5px;
  }

  .card { padding: 14px; }
  .system-notice { top: 44px; padding: 7px 10px 0; }
  .system-notice-inner { flex-direction: column; gap: 8px; padding: 10px 12px; }
  .system-notice .btn { align-self: flex-end; }
  .tag-filter-row { grid-template-columns: 1fr; }
  .tag-selected-head { flex-direction: column; }
  .tag-selected-head .mode-row,
  .tag-bank-actions { width: 100%; }
  .tag-selected-head .btn,
  .tag-bank-actions .btn { flex: 1; justify-content: center; }
  .admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .admin-stat { padding: 11px 12px; }
  .admin-card-head { flex-direction: column; }
  .admin-notice-actions { align-items: stretch; }
  .admin-notice-actions .btn { justify-content: center; }
  .admin-table { min-width: 780px; }
  .admin-session span { max-width: 132px; }

  /* 移动端刷题界面极致紧凑与去滚动条优化 */
  .practice-shell {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .practice-top {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
    font-size: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .practice-top::-webkit-scrollbar {
    display: none;
  }
  .practice-top > b,
  .practice-top-title {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    flex-shrink: 1;
  }
  .practice-top .badge.type,
  .practice-top .practice-top-badge {
    display: none !important;
  }
  .practice-top .practice-top-tools {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
  }
  .practice-top .btn.small {
    padding: 2px 5px;
    font-size: 11px;
    height: 24px;
    line-height: 22px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .practice-top .practice-counter {
    display: none !important;
  }
  .practice-top .counter {
    width: auto !important;
    order: unset !important;
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    padding-left: 2px;
  }
  .practice-progress {
    flex: 0 0 auto;
    height: 3px;
    margin: 1px 0 2px;
  }
  .practice-workbench {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0 !important;
    gap: 0 !important;
    overflow: hidden;
  }
  .practice-main-col {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .practice-main-col .practice-card.card,
  .practice-card.card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    height: 100% !important;
    border-radius: 12px;
    overflow: hidden;
  }
  .practice-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px 6px;
    scrollbar-width: none;
  }
  .practice-scroll::-webkit-scrollbar {
    display: none;
  }
  .question-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    flex-wrap: wrap;
  }
  .question-head .badge {
    font-size: 10px;
    padding: 1px 5px;
    line-height: 1.45;
    border-radius: 5px;
  }
  .q-text {
    font-size: 14.5px;
    line-height: 1.45;
    margin: 3px 0 7px;
  }
  .q-text .qnum {
    font-size: 14.5px;
    font-weight: 700;
    margin-right: 3px;
  }
  img.qimg {
    max-height: 150px;
    object-fit: contain;
    margin: 4px auto;
  }
  .opt-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
  }
  .opt {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13.5px;
    line-height: 1.35;
    padding: 6px 10px;
    min-height: 36px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }
  .opt .k {
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .opt img {
    max-height: 2.2em;
  }
  .verdict {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12.5px;
    border-radius: 7px;
  }
  .verdict b {
    font-size: 12.5px;
  }
  .ans-block {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12.5px;
    line-height: 1.4;
    border-radius: 7px;
  }
  .exp-box {
    margin-top: 6px;
    padding: 6px 9px;
    font-size: 12px;
    line-height: 1.45;
    border-radius: 7px;
  }
  .exp-box .pt {
    font-size: 11px;
    margin-top: 3px;
  }
  .draft-box {
    margin-top: 6px;
  }
  .draft-input {
    min-height: 64px;
    font-size: 13px;
    padding: 6px 8px;
  }
  .finish-card {
    margin-top: 8px;
    padding: 10px;
  }

  /* 移动端卡片头部收藏与笔记按钮：右上角胶囊徽章，精致醒目 */
  .card-head-actions {
    margin-left: auto;
    gap: 4px;
  }
  .card-note-btn,
  .card-help-btn,
  .card-report-btn,
  .card-fav-btn {
    padding: 2px 7px;
    font-size: 11px;
    height: 22px;
    gap: 3px;
    border-radius: 999px;
  }
  .card-note-btn .card-note-icon,
  .card-help-btn .card-help-icon,
  .card-report-btn .card-report-icon,
  .card-fav-btn .card-fav-star {
    font-size: 11px;
  }

  /* 移动端刷题底栏：适度上移悬浮、单行不换行、拇指自然舒适区 */
  .practice-footer {
    flex: 0 0 auto !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    overflow: hidden !important;
    padding: 6px 8px !important;
    gap: 4px !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.05);
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  .practice-footer .spacer { display: none !important; }
  .practice-footer .btn {
    height: 36px !important;
    padding: 0 6px !important;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap !important;
    flex-shrink: 0;
    box-sizing: border-box;
    touch-action: manipulation;
  }
  .practice-footer .nav-prev {
    flex: 0 0 auto !important;
    min-width: 50px !important;
    padding: 0 6px !important;
    font-size: 11.5px !important;
    order: 1 !important;
  }
  .practice-footer .btn-dontknow {
    flex: 0 0 auto !important;
    min-width: 40px !important;
    padding: 0 5px !important;
    font-size: 11px !important;
    order: 2 !important;
  }
  .practice-footer .btn-confirm,
  .practice-footer .btn-reveal {
    flex: 1 1 auto !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    min-width: 56px !important;
    padding: 0 6px !important;
    order: 3 !important;
  }
  .practice-footer .nav-next {
    flex: 1 1 auto !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    min-width: 52px !important;
    padding: 0 6px !important;
    order: 4 !important;
  }
  .practice-footer .btn-sheet {
    flex: 0 0 auto !important;
    min-width: 58px !important;
    height: 36px !important;
    padding: 0 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    font-size: 11.5px !important;
    font-variant-numeric: tabular-nums !important;
    order: 5 !important;
  }
  .practice-footer .btn-sheet .sheet-counter-text {
    font-size: 11px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  .practice-footer .btn-sheet .sheet-icon {
    font-size: 12px !important;
    line-height: 1 !important;
  }
  .sheet-cell { width: 34px; height: 32px; border-radius: 7px; font-size: 12px; }
  .sheet-panel.open {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 16px 14px 20px;
    overflow: auto;
    background: var(--bg);
  }
  .sheet-panel .sheet-head {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: -16px -14px 12px;
    padding: 14px;
    background: rgba(244,246,251,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .sheet-panel .sheet-grid {
    align-content: start;
    gap: 7px;
    padding-bottom: 18px;
  }
  .paper-sheet-layer.open {
    display: block;
  }
  .paper-sheet-popover.open {
    position: fixed;
    inset: auto 10px 76px 10px;
    z-index: 70;
    display: block;
    max-height: min(58vh, 460px);
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid rgba(229, 232, 240, .95);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 16px 48px rgba(30, 41, 82, .22);
  }
  .paper-sheet-popover .sheet-head {
    margin: -14px -14px 12px;
    background: rgba(255,255,255,.96);
  }
  .paper-top { position: static; }
  .paper-status { position: sticky; top: 46px; }
  .paper-status-row { align-items: stretch; flex-direction: column; }
  .paper-status-row .mode-row { width: 100%; }
  .paper-status-row .btn { flex: 1; justify-content: center; }
  .paper-q { scroll-margin-top: 64px; }
  .paper-list { padding-bottom: 112px; }
  .paper-float-actions {
    left: 10px;
    right: 10px;
    bottom: 10px;
    justify-content: stretch;
    gap: 6px;
    border-radius: 12px;
  }
  .paper-float-actions .btn {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding-inline: 6px;
    white-space: nowrap;
    font-size: 11px;
  }
  .paper-float-actions .btn.small { font-size: 10px; }
  .paper-float-actions .keyword-toggle {
    flex: 0 0 auto;
    padding-inline: 6px;
    font-size: 10.5px;
  }
  .paper-float-progress {
    flex: 0 0 auto;
    min-width: 48px;
    padding: 0 2px;
  }
  .meta-modal {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 50px 10px 10px !important;
    box-sizing: border-box !important;
  }
  .meta-dialog {
    max-height: 52vh !important;
    padding: 14px !important;
    border-radius: 12px !important;
    overflow-y: auto !important;
  }
  .meta-dialog-head { flex-direction: column; }
  .export-dialog {
    max-height: min(86dvh, 640px) !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
  }
  .export-dialog .meta-dialog-head {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .export-dialog .meta-question { margin-bottom: 8px; padding: 8px 10px; font-size: 13px; }
  .export-dialog .export-field { margin: 8px 0; gap: 8px; }
  .export-dialog .export-choices { gap: 6px; }
  .export-dialog .export-chip { padding: 5px 9px; font-size: 12.5px; }
  .export-dialog .export-actions { margin-top: 12px; }

  .topbar-inner { padding: 6px 8px; gap: 4px; }
  .brand { font-size: 16px; }
  .brand-text { display: none; }
  .topnav { gap: 2px; flex-wrap: nowrap; }
  .topnav a { font-size: 11px; flex-shrink: 0; padding: 3px 3px; }
}

/* ---------------- 思维导图 ---------------- */
body.mindmap-mode {
  overflow: hidden;
  background: #eef2f7;
}
body.mindmap-mode #app {
  max-width: none;
  margin: 0;
  padding: 0;
}
.mm-page {
  position: fixed;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  color: #172033;
  background:
    linear-gradient(rgba(43, 58, 84, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 58, 84, .055) 1px, transparent 1px),
    #eef2f7;
  background-size: 32px 32px;
}
.mm-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.mm-page.is-panning .mm-stage { cursor: grabbing; }
.mm-world {
  position: absolute;
  inset: 0 auto auto 0;
  transform-origin: 0 0;
  will-change: auto;
  backface-visibility: visible;
}
.mm-lines,
.mm-node-layer {
  position: absolute;
  inset: 0 auto auto 0;
  backface-visibility: visible;
}
.mm-lines {
  overflow: visible;
  pointer-events: none;
}
.mm-edge {
  fill: none;
  stroke: rgba(85, 101, 131, .34);
  stroke-width: 2;
}
.mm-edge.d1 { stroke: rgba(49, 93, 244, .42); stroke-width: 2.4; }
.mm-edge.d2 { stroke: rgba(68, 119, 86, .34); }
.mm-edge.d3,
.mm-edge.d4,
.mm-edge.d5 { stroke-width: 1.6; }
.mm-edge.side-left { stroke: rgba(49, 93, 244, .32); }
.mm-edge.side-right { stroke: rgba(68, 119, 86, .32); }
.mm-node-card {
  position: absolute;
  display: flex;
  align-items: stretch;
  gap: 8px;
  border: 1px solid rgba(107, 122, 153, .23);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 10px 26px rgba(40, 52, 76, .11), 0 1px 0 rgba(255, 255, 255, .75) inset;
  color: #172033;
  outline: 0;
  padding: 10px 10px 9px 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  backface-font-size: 0; line-height: 0;
}
.mm-page.is-panning .mm-node-card {
  transition: none;
  box-shadow: 0 1px 4px rgba(40, 52, 76, .08);
}
.mm-page.is-panning .mm-node-card:hover,
.mm-page.is-panning .mm-node-card:focus-visible,
.mm-page.is-panning .mm-node-card.is-selected {
  box-shadow: 0 1px 4px rgba(40, 52, 76, .08);
}
.mm-node-card:hover,
.mm-node-card:focus-visible {
  border-color: rgba(49, 93, 244, .6);
  box-shadow: 0 14px 34px rgba(49, 93, 244, .16), 0 0 0 3px rgba(49, 93, 244, .12);
}
.mm-node-card.is-selected {
  border-color: rgba(49, 93, 244, .84);
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(49, 93, 244, .2), 0 0 0 3px rgba(49, 93, 244, .14);
}
.mm-node-card.is-hit {
  border-color: rgba(201, 139, 36, .82);
  background: #fffaf0;
}
.mm-node-card.depth-0 {
  border-color: rgba(28, 47, 82, .36);
  background: #172033;
  color: #fff;
}
.mm-node-card.depth-1 {
  border-color: rgba(49, 93, 244, .35);
  background: #f7f9ff;
}
.mm-node-card.depth-2 {
  background: #fbfcf8;
}
.mm-node-card.side-left {
  flex-direction: row-reverse;
  text-align: right;
}
.mm-node-body {
  min-width: 0;
  flex: 1;
}
.mm-node-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: pretty;
}
.mm-node-card.depth-0 .mm-node-title {
  font-size: 16px;
  line-height: 1.32;
}
.mm-node-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  min-height: 18px;
}
.mm-node-card.side-left .mm-node-meta {
  justify-content: flex-end;
}
.mm-node-tag,
.mm-node-count {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  max-width: 150px;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mm-node-tag {
  background: rgba(221, 229, 242, .8);
  color: #536079;
}
.mm-node-card.depth-0 .mm-node-tag {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.78);
}
.mm-node-count {
  background: #315df4;
  color: #fff;
  font-weight: 700;
}
.mm-node-count.muted {
  background: rgba(49, 93, 244, .1);
  color: #315df4;
}
.mm-type-row {
  display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px;
}
.mm-type-badge {
  display: inline-block; padding: 0 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; line-height: 17px;
}
.mm-type-badge.sgl { background: #e8f0fe; color: #1967d2; }
.mm-type-badge.mul { background: #fce8e6; color: #c5221f; }
.mm-type-badge.jud { background: #e6f4ea; color: #137333; }
.mm-type-badge.sht { background: #fef7e0; color: #b06000; }
.mm-type-badge.trm { background: #f3e8fd; color: #7627bb; }
.mm-node-toggle {
  flex: 0 0 auto;
  align-self: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(49, 93, 244, .1);
  color: #315df4;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mm-node-card.depth-0 .mm-node-toggle {
  background: rgba(255,255,255,.16);
  color: #fff;
}
.mm-node-toggle:hover { background: rgba(49, 93, 244, .18); }
.mm-node-title mark,
.mm-result mark {
  border-radius: 4px;
  padding: 0 2px;
  background: #ffe8a3;
  color: inherit;
}
.mm-node-card.label-hidden .mm-node-title {
  color: transparent;
  text-shadow: none;
}
.mm-node-card.label-hidden .mm-node-title {
  min-height: 18px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(122, 135, 158, .28), rgba(122, 135, 158, .13));
}
.mm-node-card.label-hidden.depth-0 .mm-node-title {
  background: linear-gradient(90deg, rgba(255,255,255,.34), rgba(255,255,255,.14));
}
.mm-node-card.label-hidden .mm-node-title mark {
  background: transparent;
  color: transparent;
}
.mm-control-surface {
  border: 1px solid rgba(122, 135, 158, .22);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 18px 50px rgba(35, 47, 70, .14);
  backdrop-filter: blur(14px);
}
.mm-commandbar {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 5;
  width: min(920px, calc(100vw - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
}
.mm-back,
.mm-command-actions button,
.mm-panel-head button,
.mm-drawer-actions button,
.mm-detail-actions a,
.mm-detail-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(107, 122, 153, .24);
  border-radius: 9px;
  background: rgba(255,255,255,.76);
  color: #273349;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.mm-back:hover,
.mm-command-actions button:hover,
.mm-panel-head button:hover,
.mm-drawer-actions button:hover,
.mm-detail-actions a:hover,
.mm-detail-actions button:hover {
  border-color: rgba(49, 93, 244, .5);
  background: #fff;
  color: #315df4;
}
.mm-command-actions button.is-active {
  border-color: rgba(49, 93, 244, .55);
  background: rgba(49, 93, 244, .1);
  color: #315df4;
}
.mm-label-depth {
  min-height: 34px;
  min-width: 70px;
  border: 1px solid rgba(107, 122, 153, .24);
  border-radius: 9px;
  background: rgba(255,255,255,.76);
  color: #273349;
  padding: 6px 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  outline: none;
}
.mm-label-depth:hover,
.mm-label-depth:focus-visible {
  border-color: rgba(49, 93, 244, .5);
  background: #fff;
  color: #315df4;
}
.mm-label-depth.is-active {
  border-color: rgba(49, 93, 244, .55);
  background: rgba(49, 93, 244, .1);
  color: #315df4;
}
.mm-heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mm-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1.3;
}
.mm-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #647087;
  font-size: 12px;
  line-height: 1.25;
}
.mm-command-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mm-drawer,
.mm-inspector {
  position: absolute;
  z-index: 6;
  border-radius: 16px;
}
.mm-drawer {
  left: 14px;
  top: 88px;
  bottom: 16px;
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .18s ease;
  overflow: hidden;
}
.mm-page.drawer-open .mm-drawer {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 8;
}
.mm-inspector {
  right: 14px;
  top: 88px;
  width: 330px;
  max-height: calc(100dvh - 168px);
  overflow: auto;
  padding: 16px;
}
.mm-inspector-compact {
  display: none;
}
.mm-inspector-full {
  display: block;
}
.mm-compact-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.mm-compact-copy span {
  color: #7a8498;
  font-size: 11px;
  font-weight: 700;
}
.mm-compact-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172033;
  font-size: 13px;
  line-height: 1.25;
}
.mm-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.mm-panel-head.compact { margin-bottom: 12px; }
.mm-panel-head b {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.mm-panel-head span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #6a758b;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}
.mm-search-box {
  display: grid;
  gap: 6px;
}
.mm-search-box span {
  color: #647087;
  font-size: 12px;
  font-weight: 650;
}
.mm-search-box input {
  width: 100%;
  border: 1px solid rgba(107, 122, 153, .26);
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  color: #172033;
  padding: 9px 10px;
  font-size: 14px;
  outline: none;
}
.mm-search-box input:focus {
  border-color: rgba(49, 93, 244, .66);
  box-shadow: 0 0 0 3px rgba(49, 93, 244, .12);
}
.mm-drawer-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.mm-drawer-actions button {
  min-height: 32px;
  padding-inline: 6px;
  font-size: 12px;
}
.mm-toc,
.mm-search-results {
  display: grid;
  gap: 7px;
  min-height: 0;
  min-width: 0;
}
.mm-toc {
  flex: 1 1 auto;
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}
.mm-search-results {
  flex: 0 1 auto;
  max-height: min(34%, 220px);
  overflow: auto;
  border-top: 1px solid rgba(107, 122, 153, .16);
  padding-top: 10px;
  overscroll-behavior: contain;
}
.mm-search-results.is-empty {
  display: none;
}
.mm-toc-branch {
  display: grid;
  gap: 6px;
}
.mm-toc-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  margin-left: calc(var(--toc-depth, 0) * 14px);
}
.mm-toc-toggle {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(107, 122, 153, .18);
  border-radius: 9px;
  background: rgba(255,255,255,.72);
  color: #315df4;
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}
.mm-toc-toggle:disabled {
  cursor: default;
  opacity: .28;
}
.mm-toc-toggle:not(:disabled):hover {
  border-color: rgba(49, 93, 244, .35);
  background: #fff;
}
.mm-toc-item,
.mm-result {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  height: auto;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(244, 247, 252, .8);
  color: #243047;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
}
.mm-toc-item:hover,
.mm-result:hover {
  border-color: rgba(49, 93, 244, .3);
  background: #fff;
}
.mm-toc-branch.is-selected > .mm-toc-row .mm-toc-item {
  border-color: rgba(49, 93, 244, .52);
  background: rgba(49, 93, 244, .08);
}
.mm-toc-children {
  display: grid;
  gap: 6px;
}
.mm-toc-children .mm-toc-item {
  min-height: 42px;
  padding-block: 7px;
}
.mm-toc-item span,
.mm-result span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.mm-toc-item small,
.mm-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  color: #7a8498;
  font-size: 11px;
}
.mm-result-title {
  color: #647087;
  font-size: 12px;
  font-weight: 700;
}
.mm-inspector h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  text-wrap: pretty;
}
.mm-inspector p {
  margin: 12px 0 0;
  color: #3e4a61;
  font-size: 13.5px;
  line-height: 1.65;
}
.mm-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mm-detail-meta span {
  border-radius: 7px;
  background: #eef2f8;
  color: #536079;
  padding: 2px 7px;
  font-size: 11.5px;
  font-weight: 650;
}
.mm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.mm-detail-actions a {
  background: #315df4;
  border-color: #315df4;
  color: #fff;
}
.mm-detail-actions a:hover {
  color: #fff;
  background: #264ed4;
}
.mm-empty {
  margin: 0;
  color: #7a8498;
  font-size: 12px;
  line-height: 1.55;
}
.mm-zoom-hud {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 5px 11px;
  color: #536079;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .mm-inspector {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 42dvh;
    overflow: auto;
  }
  .mm-inspector-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .mm-inspector-compact button {
    flex: 0 0 auto;
    min-height: 30px;
    border: 1px solid rgba(107, 122, 153, .24);
    border-radius: 8px;
    background: rgba(255,255,255,.84);
    color: #315df4;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
  }
  .mm-inspector.is-collapsed {
    max-height: none;
    overflow: hidden;
    padding: 8px 10px;
    border-radius: 14px;
  }
  .mm-inspector.is-collapsed .mm-inspector-full {
    display: none;
  }
  .mm-inspector.is-open .mm-inspector-compact {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(107, 122, 153, .16);
  }
  .mm-zoom-hud { bottom: 72px; }
}
@media (max-width: 760px) {
  .mm-commandbar {
    top: 10px;
    width: calc(100vw - 20px);
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
  }
  .mm-command-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  .mm-command-actions button,
  .mm-back,
  .mm-label-depth {
    min-height: 31px;
    padding-inline: 7px;
    font-size: 12px;
  }
  .mm-label-depth {
    min-width: 0;
    width: 100%;
    padding-inline: 4px;
  }
  .mm-heading strong { font-size: 13.5px; }
  .mm-heading span { font-size: 11.5px; }
  .mm-drawer {
    top: 92px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    transform: translateX(calc(-100% - 20px));
    border-radius: 14px;
  }
  .mm-search-results {
    max-height: 28dvh;
  }
  .mm-inspector {
    padding: 12px;
  }
  .mm-inspector.is-collapsed {
    padding: 8px 10px;
  }
  .mm-inspector.is-open {
    max-height: 40dvh;
  }
  .mm-inspector h2 { font-size: 15.5px; }
  .mm-inspector p { font-size: 12.5px; }
  .mm-zoom-hud { bottom: 72px; }
  .mm-node-card {
    border-radius: 9px;
    padding: 9px 9px 8px 10px;
  }
  .mm-node-title { font-size: 13px; }
}

/* ======== 复习资料与知识矩阵页（桌面端 & 移动端自适应） ======== */
.mat-sticky-sentinel {
  height: 1px;
  width: 100%;
  margin-bottom: -1px;
  pointer-events: none;
}
.mat-sticky-bar {
  position: sticky;
  top: var(--topbar-h, 46px);
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  margin: -24px -20px 14px;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
@supports (container-type: scroll-state) {
  .mat-sticky-bar {
    container-type: scroll-state;
    container-name: mat-sticky;
  }
  @container mat-sticky scroll-state(stuck: top) {
    .mat-sticky-inner::after {
      opacity: 1;
    }
  }
}
.mat-sticky-bar.is-stuck {
  border-bottom-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.mat-sticky-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 7px 0;
  font-size: 12px;
  flex-wrap: nowrap;
  max-width: 1100px;
  margin: 0 auto;
}
.mat-sticky-inner::after {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  bottom: -8px;
  height: 8px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.08), transparent);
  transition: opacity 0.2s ease;
}
.mat-sticky-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.mat-sticky-nav {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.mat-sticky-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  background: var(--line-subtle);
  border: 1px solid var(--line);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mat-sticky-link:hover {
  color: var(--accent);
  border-color: #bfdbfe;
  background: var(--accent-weak);
}
.mat-sticky-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mat-sticky-primary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.mat-sticky-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.mat-sticky-controls [hidden] {
  display: none !important;
}
.mat-root-summary-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-light);
}
.mat-sticky-inner .mat-tool-btn,
.mat-sticky-inner .mat-blank-pill,
.mat-sticky-inner .mat-peek-pill {
  position: relative;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  min-block-size: 30px;
  white-space: nowrap;
  box-shadow: none;
}
.mat-blank-pill {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--accent);
  font-weight: 700;
}
.mat-blank-pill:hover {
  border-color: var(--accent);
  background: #dbeafe;
  color: var(--accent-hover);
}
.mat-blank-pill.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.mat-blank-pill.is-active:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
}
.mat-peek-pill {
  border-color: var(--line);
  background: #fff;
  color: var(--ink-light);
  font-weight: 600;
}
.mat-peek-pill.is-active {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}
.mat-depth-sel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  min-block-size: 30px;
  font-size: 12px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
}
.mat-hidden-sync {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.mat-layout {
  display: flex;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.mat-toc-backdrop {
  display: none;
}
.mat-toc-sidebar {
  width: 0;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--line);
  transition: width 0.2s;
  position: sticky;
  top: calc(var(--topbar-h, 46px) + var(--mat-sticky-h, 52px) + 8px);
  align-self: flex-start;
  max-height: calc(100vh - var(--topbar-h, 46px) - var(--mat-sticky-h, 52px) - 20px);
  max-height: calc(100dvh - var(--topbar-h, 46px) - var(--mat-sticky-h, 52px) - 20px);
  display: flex;
  flex-direction: column;
}
.mat-layout.toc-open .mat-toc-sidebar { width: 280px; }
.mat-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  flex-shrink: 0;
}
.mat-toc-list { padding: 8px 0; overflow-y: auto; flex: 1; }
.mat-toc-item { padding: 0; }
.mat-toc-link {
  display: flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid transparent;
}
.mat-toc-link:hover { background: var(--accent-weak); color: var(--accent); }
.mat-toc-link.active {
  background: var(--accent-weak);
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 700;
}
.mat-toc-item.lv1 .mat-toc-link { font-weight: 600; padding-left: 12px; }
.mat-toc-item.lv2 .mat-toc-link { padding-left: 22px; font-size: 12.5px; }
.mat-toc-item.lv3 .mat-toc-link { padding-left: 32px; font-size: 12px; color: var(--muted); }
.mat-toc-item.lv4 .mat-toc-link { padding-left: 40px; font-size: 11.5px; color: var(--muted); }
.mat-toc-kids { margin: 0; }
.mat-main { flex: 1; min-width: 0; max-width: 100%; }
.mat-card { padding: 20px 24px; max-width: 100%; }
.mat-tree, .mat-tree ul, .mat-tree li { list-style: none; margin: 0; padding: 0; }
.mat-tree li { padding: 0; }
.mat-tree > li { border-bottom: 1px solid #eef0f5; padding-bottom: 16px; margin-bottom: 16px; }
.mat-tree > li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.md-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 3px 0;
}
/* 目录跳转后短暂高亮落点标题 */
.md-row.md-jump-flash {
  animation: md-jump-flash 2.8s ease-out;
  border-radius: 6px;
}
@keyframes md-jump-flash {
  0%, 22% { background-color: #fff3bf; box-shadow: 0 0 0 5px #fff3bf; }
  100% { background-color: transparent; box-shadow: 0 0 0 5px transparent; }
}
.md-label { font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: break-word; }
.md-label.h1 { font-size: 20px; color: #1a1d2e; }
.md-label.h2 { font-size: 16px; color: #1f2430; }
.md-label.h3 { font-size: 14.5px; color: #3a4050; }
.md-label.h4 { font-size: 13.5px; color: #2a3040; font-weight: 600; }
.md-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
  flex-shrink: 0;
}
.md-badge:hover { background: var(--accent-hover); color: #fff; }
.md-badge.off { background: #dce0e8; color: #6b7388; }
.md-types { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.md-types i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  line-height: 1.55;
}
i.mt.sgl { background: #e8f0fe; color: #1967d2; }
i.mt.mul { background: #fce8e6; color: #c5221f; }
i.mt.jud { background: #e6f4ea; color: #137333; }
i.mt.sht { background: #fef7e0; color: #b06000; }
i.mt.trm { background: #f3e8fd; color: #7627bb; }
.md-detail {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  padding: 0 0 4px 0;
  margin: 0;
  overflow-wrap: break-word;
}
.md-kids { margin: 4px 0 0 16px; padding-left: 10px; border-left: 2px solid #e2e5ed; }
.md-kids .md-row { padding: 2px 0; }
.md-kids .md-kids { margin-left: 14px; padding-left: 8px; border-left-color: #eceef3; }

@media (max-width: 900px) {
  .mat-sticky-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 6px 0 7px;
  }
  .mat-sticky-main { width: 100%; gap: 6px; }
  .mat-sticky-controls { width: 100%; justify-content: flex-start; gap: 6px; }
}

@media (max-width: 768px) {
  .mat-toc-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(2px);
  }
  .mat-layout.toc-open .mat-toc-backdrop {
    display: block;
  }
  .mat-toc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 65;
    max-height: none;
    height: 100vh;
    height: 100dvh;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateX(-100%);
    transition: transform 0.22s var(--ease-spring);
    width: 280px;
    max-width: 85vw;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.16);
  }
  .mat-layout.toc-open .mat-toc-sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(0);
  }
  .mat-toc-link {
    min-block-size: 38px;
    padding-block: 6px;
  }
}

@media (max-width: 640px) {
  .mat-sticky-bar {
    margin: -14px -12px 10px;
    padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  }
  .mat-sticky-inner::after {
    left: -12px;
    right: -12px;
  }
  .mat-sticky-link {
    padding: 4px 8px;
    font-size: 11.5px;
    min-block-size: 30px;
  }
  .mat-sticky-title {
    font-size: 13px;
  }
  .mat-sticky-controls {
    gap: 5px;
  }
  .mat-sticky-inner .mat-tool-btn,
  .mat-sticky-inner .mat-blank-pill,
  .mat-sticky-inner .mat-peek-pill,
  .mat-sticky-controls .mat-depth-sel {
    font-size: 11.5px;
    padding: 3px 7px;
    min-block-size: 31px;
  }
  .mat-main .page-title {
    font-size: 18px;
    line-height: 1.35;
    margin: 2px 0 10px;
    text-wrap: balance;
  }
  .mat-main .page-title small {
    display: block;
    margin-left: 0;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
  }
  .mat-card {
    padding: 12px 11px;
    border-radius: 12px;
  }
  .mat-layout.is-matrix-layout .mat-card {
    padding: 12px 10px;
  }
  .mat-layout.is-matrix-layout .md-kids {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
  .mat-layout:not(.is-matrix-layout) .md-kids {
    margin-left: 8px;
    padding-left: 6px;
  }
  .mat-layout.is-matrix-layout .md-item.lv2 {
    margin-top: 12px;
  }
  .md-label.h1 { font-size: 16.5px; }
  .md-label.h2 { font-size: 15px; }
  .md-label.h3 { font-size: 13.5px; }
  .md-label.h4 { font-size: 13px; }
}

@media (max-width: 380px) {
  .mat-sticky-nav { gap: 4px; }
  .mat-sticky-link { padding: 3px 6px; font-size: 11px; }
  .mat-sticky-inner .mat-tool-btn { padding: 3px 7px; font-size: 11px; }
  .mat-sticky-controls { gap: 4px; }
  .mat-sticky-inner .mat-blank-pill,
  .mat-sticky-inner .mat-peek-pill,
  .mat-sticky-controls .mat-depth-sel {
    font-size: 11px;
    padding: 3px 6px;
    min-block-size: 30px;
  }
}

/* ====== 填空与分层：display 切换，正文/挖空都正常参与排版、可自动换行（手机窄屏不再溢出） ====== */
.md-txt{display:inline}
.md-blk{display:none;white-space:normal;word-break:break-word}
.md-blank{display:inline-block;white-space:nowrap;overflow:hidden;max-width:100%;text-align:center;font-weight:700;color:transparent;margin:0 2px 2px;padding:0 1px;line-height:1.3;min-width:2ch;vertical-align:bottom;border-bottom:none}

/* ---- 填空：仅对含挖空内容(.has-blank)的节点，把标题正文换成可换行的下划线 ---- */
.mat-blank-1 .lv4 .has-blank .md-txt,.mat-blank-2 .lv3 .has-blank .md-txt,.mat-blank-2 .lv4 .has-blank .md-txt,.mat-blank-3 .lv2 .has-blank .md-txt,.mat-blank-3 .lv3 .has-blank .md-txt,.mat-blank-3 .lv4 .has-blank .md-txt,.mat-blank-4 .lv1 .has-blank .md-txt,.mat-blank-4 .lv2 .has-blank .md-txt,.mat-blank-4 .lv3 .has-blank .md-txt,.mat-blank-4 .lv4 .has-blank .md-txt,.mat-blank-all .has-blank .md-txt{display:none}
.mat-blank-1 .lv4 .has-blank .md-blk,.mat-blank-2 .lv3 .has-blank .md-blk,.mat-blank-2 .lv4 .has-blank .md-blk,.mat-blank-3 .lv2 .has-blank .md-blk,.mat-blank-3 .lv3 .has-blank .md-blk,.mat-blank-3 .lv4 .has-blank .md-blk,.mat-blank-4 .lv1 .has-blank .md-blk,.mat-blank-4 .lv2 .has-blank .md-blk,.mat-blank-4 .lv3 .has-blank .md-blk,.mat-blank-4 .lv4 .has-blank .md-blk,.mat-blank-all .has-blank .md-blk{display:inline}
.mat-blank-all .md-blank,.mat-blank-1 .md-blank,.mat-blank-2 .md-blank,.mat-blank-3 .md-blank,.mat-blank-4 .md-blank{border-bottom:3px solid var(--accent)}
/* ---- 分层隐藏（从下层到上层） ---- */
/* depth-1: 隐最下层lv4 */  .mat-depth-1 .lv4 .md-txt,.mat-depth-1 .lv4 .md-blk{color:transparent}
/* depth-2: 隐lv3-lv4 */   .mat-depth-2 .lv3 .md-txt,.mat-depth-2 .lv3 .md-blk,.mat-depth-2 .lv4 .md-txt,.mat-depth-2 .lv4 .md-blk{color:transparent}
/* depth-3: 隐lv2-lv4 */   .mat-depth-3 .lv2 .md-txt,.mat-depth-3 .lv2 .md-blk,.mat-depth-3 .lv3 .md-txt,.mat-depth-3 .lv3 .md-blk,.mat-depth-3 .lv4 .md-txt,.mat-depth-3 .lv4 .md-blk{color:transparent}
/* depth-4: 隐lv1-lv4 */   .mat-depth-4 .lv1 .md-txt,.mat-depth-4 .lv1 .md-blk,.mat-depth-4 .lv2 .md-txt,.mat-depth-4 .lv2 .md-blk,.mat-depth-4 .lv3 .md-txt,.mat-depth-4 .lv3 .md-blk,.mat-depth-4 .lv4 .md-txt,.mat-depth-4 .lv4 .md-blk{color:transparent}
/* depth-0: 全隐 */        .mat-depth-0 .md-txt,.mat-depth-0 .md-blk{color:transparent}
/* 分层隐藏下划线 */
.mat-depth-1 .lv4 .md-txt,
.mat-depth-2 .lv3 .md-txt,.mat-depth-2 .lv4 .md-txt,
.mat-depth-3 .lv2 .md-txt,.mat-depth-3 .lv3 .md-txt,.mat-depth-3 .lv4 .md-txt,
.mat-depth-4 .lv1 .md-txt,.mat-depth-4 .lv2 .md-txt,.mat-depth-4 .lv3 .md-txt,.mat-depth-4 .lv4 .md-txt,
.mat-depth-0 .md-txt{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:3px}
/* 详情独立分层（从下层到上层） */
.mat-detail-0 .md-detail{color:transparent;text-decoration:underline;text-decoration-color:#c8cdd6;text-underline-offset:2px}
.mat-detail-1 .lv4 .md-detail{color:transparent;text-decoration:underline;text-decoration-color:#c8cdd6;text-underline-offset:2px}
.mat-detail-2 .lv3 .md-detail,.mat-detail-2 .lv4 .md-detail{color:transparent;text-decoration:underline;text-decoration-color:#c8cdd6;text-underline-offset:2px}
.mat-detail-3 .lv2 .md-detail,.mat-detail-3 .lv3 .md-detail,.mat-detail-3 .lv4 .md-detail{color:transparent;text-decoration:underline;text-decoration-color:#c8cdd6;text-underline-offset:2px}
.mat-detail-4 .lv1 .md-detail,.mat-detail-4 .lv2 .md-detail,.mat-detail-4 .lv3 .md-detail,.mat-detail-4 .lv4 .md-detail{color:transparent;text-decoration:underline;text-decoration-color:#c8cdd6;text-underline-offset:2px}

/* ---- 知识矩阵表格（容器查询自适应堆叠卡片 + 触控交互挖空） ---- */
.mat-matrix-wrap {
  container: mat-matrix / inline-size;
  overflow-x: auto;
  max-inline-size: 100%;
  margin: 8px 0 12px;
  border: 1px solid #e1e6f2;
  border-radius: 10px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.mat-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.55;
}
.mat-matrix thead th {
  background: #f4f7fd;
  color: #27304a;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1.5px solid #dbe2f0;
  white-space: nowrap;
}
.mat-matrix thead th:last-child { text-align: right; }
.mat-matrix tbody th,
.mat-matrix tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f7;
  vertical-align: top;
  color: #23293a;
  text-align: left;
  overflow-wrap: break-word;
  min-width: 0;
}
.mat-matrix tbody tr:last-child th,
.mat-matrix tbody tr:last-child td { border-bottom: 0; }
.mat-matrix tbody tr:nth-child(even) th,
.mat-matrix tbody tr:nth-child(even) td { background: #fafbfe; }
.mat-matrix tbody tr:hover th,
.mat-matrix tbody tr:hover td { background: #f2f5ff; }
.mat-matrix tbody tr.md-jump-flash th,
.mat-matrix tbody tr.md-jump-flash td { background: #eef3ff; }
.mat-matrix th.mat-td-key,
.mat-matrix td.mat-td-key {
  font-weight: 600;
  color: #171d32;
  min-width: 118px;
}
.mat-matrix td.mat-td-act {
  white-space: nowrap;
  text-align: right;
}
.mat-matrix td.mat-td-act .md-types {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  gap: 3px;
}
.mat-matrix .katex-display {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  padding: 2px 0;
}
.mat-matrix .katex { max-width: 100%; }

/* 交互挖空：行内自然换行，避免长答案撑破窄屏 */
.md-blank-slot {
  position: relative;
  display: inline;
  cursor: pointer;
  margin: 0 2px;
  border-radius: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(37, 99, 235, 0.14);
}
.md-blank-line {
  display: inline-block;
  min-width: 3.5ch;
  max-width: 100%;
  height: 1.15em;
  background: rgba(37, 99, 235, 0.08);
  border-radius: 4px 4px 0 0;
  border-bottom: 2.5px solid var(--accent);
  vertical-align: text-bottom;
}
.md-blank-ans {
  display: none;
  background: #eef2ff;
  color: var(--accent);
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  border-bottom: 1.5px dashed var(--accent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.md-blank-slot.is-peeked .md-blank-line { display: none; }
.md-blank-slot.is-peeked .md-blank-ans { display: inline; }
.mat-cell-wrap { max-width: 100%; }
.mat-cell-wrap .md-txt { display: inline; }
.mat-cell-wrap .md-blk { display: none; }
.mat-blank-all .mat-matrix .has-blank .md-txt,.mat-blank-2 .mat-matrix .has-blank .md-txt,.mat-blank-3 .mat-matrix .has-blank .md-txt,.mat-blank-4 .mat-matrix .has-blank .md-txt,.mat-blank-1 .mat-matrix .has-blank .md-txt { display: none; }
.mat-blank-all .mat-matrix .has-blank .md-blk,.mat-blank-2 .mat-matrix .has-blank .md-blk,.mat-blank-3 .mat-matrix .has-blank .md-blk,.mat-blank-4 .mat-matrix .has-blank .md-blk,.mat-blank-1 .mat-matrix .has-blank .md-blk { display: inline; }

/* 窄容器（手机/窄分栏）下自动重排为纵向卡片流，彻底告别横向拖拽找列与公式挤压 */
@container mat-matrix (width < 620px) {
  .mat-matrix-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    margin: 6px 0 8px;
  }
  .mat-matrix,
  .mat-matrix tbody {
    display: block;
    width: 100%;
  }
  .mat-matrix thead {
    display: none;
  }
  .mat-matrix tbody tr {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #dce3f1;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }
  .mat-matrix tbody tr:last-child {
    margin-bottom: 0;
  }
  .mat-matrix tbody th.mat-td-key,
  .mat-matrix tbody td.mat-td-key {
    display: block;
    width: 100%;
    min-width: 0;
    background: linear-gradient(135deg, #f2f6ff 0%, #f8faff 100%) !important;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.48;
    padding: 9px 12px;
    border-bottom: 1px solid #e2e8f5;
  }
  .mat-matrix tbody td {
    display: block;
    width: 100%;
    padding: 9px 12px;
    border-bottom: 1px dashed #e9eef7;
    font-size: 13px;
    line-height: 1.65;
    background: #fff !important;
  }
  .mat-matrix tbody td[data-col]::before {
    content: attr(data-col);
    display: table;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-weak);
    border: 1px solid #dbeafe;
    border-radius: 5px;
    padding: 1px 7px;
    margin-bottom: 5px;
    line-height: 1.4;
  }
  .mat-matrix tbody td.mat-td-act {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: #f8fafd !important;
    border-top: 1px solid #e6ebf5;
    border-bottom: 0;
    text-align: left;
    white-space: normal;
  }
  .mat-matrix tbody td.mat-td-act::before {
    display: none;
  }
  .mat-matrix td.mat-td-act .md-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 0;
    gap: 4px;
  }
  .mat-matrix td.mat-td-act .md-badge {
    min-block-size: 32px;
    padding: 4px 12px;
    font-size: 12px;
  }
  .mat-matrix tbody tr.md-jump-flash {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  }
  .mat-matrix tbody tr.md-jump-flash th,
  .mat-matrix tbody tr.md-jump-flash td {
    background: #eef3ff !important;
  }
}

@media (pointer: coarse) {
  .mat-sticky-link::after,
  .mat-sticky-inner .btn::after,
  .md-blank-slot::after {
    content: "";
    position: absolute;
    inset: -4px -2px;
  }
  .mat-matrix .has-blank .md-blk {
    line-height: 1.85;
  }
  .mat-matrix td.mat-td-act .md-badge,
  .md-row .md-badge {
    min-block-size: 36px;
    padding: 4px 13px;
    font-size: 12.5px;
  }
}

/* ====== 知识矩阵可视化图解与第一性原理因果推演 ====== */
.mat-model-pill {
  border-color: #cbd5e1;
  background: #fff;
  color: #334155;
  font-weight: 600;
}
.mat-model-pill:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.mat-model-pill.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.mat-card.mat-hide-models .mat-blueprint-panel,
.mat-card.mat-hide-models .mat-topic-model,
.mat-card.mat-hide-models .mat-model-panel {
  display: none;
}

.mat-blueprint-panel {
  margin: 10px 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  overflow: hidden;
}
.mat-blueprint-head {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #1e3a8a;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  user-select: none;
}
.mat-blueprint-head::-webkit-details-marker { display: none; }
.mat-blueprint-head::after {
  content: '▾';
  font-size: 13px;
  color: #3b82f6;
  transition: transform .18s;
}
.mat-blueprint-panel:not([open]) .mat-blueprint-head::after {
  transform: rotate(-90deg);
}
.mat-blueprint-hint {
  margin-left: auto;
  margin-right: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}
.mat-blueprint-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
}

.mat-topic-model {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.mat-model-panel {
  margin: 8px 0 10px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fafcff 0%, #ffffff 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1.08fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 900px) {
  .mat-model-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 9px 10px;
  }
}

.mat-diagram-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.mat-diagram-fig.is-compact .mat-svg-frame svg {
  max-height: 220px;
}
.mat-diagram-stage {
  position: relative;
  display: block;
  width: 100%;
  padding: 6px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #ffffff;
  cursor: zoom-in;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.mat-diagram-stage:hover {
  border-color: #60a5fa;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.1);
}
.mat-svg-frame {
  display: block;
  width: 100%;
  overflow: hidden;
}
.mat-svg-frame svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.mat-zoom-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1e40af;
  background: rgba(239, 246, 255, 0.92);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  pointer-events: none;
}
.mat-diagram-cap {
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
  padding: 0 2px;
}
.mat-diag-ttl {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  margin-bottom: 2px;
}
.mat-diag-desc {
  display: block;
  color: #475569;
}

.mat-mech-grid {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.mat-mech-grid.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.mat-mech-step {
  background: #ffffff;
  border: 1px solid #e6ebf3;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mat-mech-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  line-height: 1.45;
}
.mat-mech-tag.s1 { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.mat-mech-tag.s2 { background: #ecfeff; color: #0f766e; border: 1px solid #a5f3fc; }
.mat-mech-tag.s3 { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.mat-mech-text {
  font-size: 12.8px;
  line-height: 1.6;
  color: #1e293b;
  overflow-wrap: break-word;
}

.mat-diagram-modal-dialog {
  width: min(920px, 95vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}
.mat-diagram-modal-svg {
  margin: 10px 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  overflow-x: auto;
}
.mat-diagram-modal-svg svg {
  display: block;
  width: 100%;
  min-width: 520px;
  height: auto;
  max-height: 64vh;
}
.mat-diagram-modal-cap {
  font-size: 13.5px;
  line-height: 1.65;
  color: #334155;
  margin: 6px 0 0;
}


/* ---- 在线用户 ---- */
.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 6px;
  vertical-align: middle;
}
.stat-table .highlight-row {
  background: var(--accent-weak);
}

/* ---- 悬浮聊天球已移除（由题目卡片【求助】替代） ---- */
.floating-chat,
.float-chat-button {
  display: none !important;
}
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  height: 44px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  color: #2563eb;
  box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.25), 0 2px 6px rgba(0, 0, 0, 0.06);
  font-weight: 700;
  font-size: 13.5px;
  cursor: grab;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  touch-action: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.floating-chat.dragging .float-chat-button {
  cursor: grabbing;
}
.float-chat-button:hover {
  transform: scale(1.05);
  border-color: #3b82f6;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.35), 0 4px 10px rgba(0, 0, 0, 0.08);
}
.float-chat-button:active {
  transform: scale(0.96);
}
.float-chat-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.float-chat-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
}
.float-chat-label {
  font-weight: 700;
  letter-spacing: 0.5px;
}
.float-chat-button em,
.float-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  border: 2px solid #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: floatBadgePulse 2s infinite;
}
@keyframes floatBadgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.float-chat-panel {
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 48px -8px rgba(15, 23, 42, 0.22), 0 4px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.floating-chat.open .float-chat-button {
  display: none;
}
.float-chat-panel[hidden] {
  display: none;
}
.float-chat-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: grab;
  touch-action: none;
}
.floating-chat.dragging .float-chat-head { cursor: grabbing; }
.float-chat-head-title {
  display: flex;
  align-items: center;
  gap: 7px;
}
.float-chat-head-title b {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}
.float-chat-head-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.float-head-btn {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 7px;
  transition: all 0.15s ease;
}
.float-head-btn:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.float-head-btn.close {
  padding: 4px 7px;
  font-size: 13px;
}
.float-head-btn.close:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}
.float-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #f8fafc;
}
.float-chat-mute {
  border-top: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  padding: 7px 12px;
  font-size: 12px;
  line-height: 1.35;
}
.float-chat-mute[hidden] {
  display: none;
}
.float-chat-msg {
  max-width: 86%;
  align-self: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  background: #fff;
  padding: 8px 11px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.float-chat-msg.own {
  align-self: flex-end;
  border-color: #bfdbfe;
  border-radius: 12px 12px 4px 12px;
  background: #eff6ff;
}
.float-chat-msg.mentioned {
  border-color: #fecaca;
  background: #fffafa;
}
.float-chat-msg.revoked {
  background: #f8fafc;
  border-style: dashed;
  color: var(--muted);
}
.float-chat-msg.revoked p {
  color: var(--muted);
  font-style: italic;
}
.float-chat-msg div {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
}
.float-chat-msg b {
  color: var(--ink);
  font-size: 12px;
}
.float-chat-msg p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13.5px;
  line-height: 1.45;
}
.float-chat-input {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}
.float-chat-input textarea {
  flex: 1;
  min-height: 38px;
  max-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.float-chat-input textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
body.practice-mode .floating-chat {
  bottom: 148px;
}

/* ---- 聊天板与视口锁定 ---- */
body.page-chat-active,
body.page-chat-active html {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}
body.page-chat-active #app {
  height: calc(100% - 52px) !important;
  padding: 8px 12px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.page-chat-active .footer,
body.page-chat-active .scroll-nav-group,
body.page-chat-active .scroll-top-btn,
body.page-chat-active .scroll-bottom-btn,
body.page-chat-active .floating-chat {
  display: none !important;
}
body.page-chat-active .chat-container {
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 auto !important;
  width: 100% !important;
}
@media (max-width: 640px) {
  body.page-chat-active #app {
    height: var(--chat-app-height, calc(100% - 46px - var(--keyboard-height, 0px))) !important;
    max-height: var(--chat-app-height, calc(100% - 46px - var(--keyboard-height, 0px))) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    transition: none !important;
  }
  body.page-chat-active .chat-container {
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }
}

.chat-back-row {
  max-width: 860px;
  margin: 0 auto 10px;
  font-size: 13.5px;
}
.chat-container {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: min(760px, calc(100dvh - 130px));
  min-height: 460px;
  border-radius: var(--radius-lg, 16px);
  background: var(--card, #ffffff);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}
.chat-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.chat-head-back-btn {
  height: 28px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.chat-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: chatLivePulse 2s infinite;
  flex-shrink: 0;
}
@keyframes chatLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.chat-head b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.chat-title-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.chat-online-count {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chat-refresh-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 6px;
}

/* 交流与求助双频道选项卡 */
.chat-tabs-bar {
  padding: 6px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}
.chat-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 10px;
}
.chat-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-decoration: none;
}
.chat-tab-btn:hover {
  color: var(--ink, #0f172a);
}
.chat-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.help-unsolved-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #ffffff;
}

/* 关联题目求助贴卡片 */
.chat-attach-card {
  margin: 8px 14px 4px;
  padding: 8px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  box-sizing: border-box;
  width: calc(100% - 28px);
  max-width: calc(100% - 28px);
  overflow: hidden;
}
.chat-attach-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
}
.chat-attach-icon {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.chat-attach-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
}
.chat-attach-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  display: block;
}
.chat-attach-snippet {
  color: #475569;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  display: block;
}
.chat-attach-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.chat-attach-send-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.15s ease;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.chat-attach-send-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.chat-attach-cancel-btn {
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.chat-attach-cancel-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* 消息内的题目引用卡片 */
.chat-q-card {
  margin: 6px 0 8px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 3.5px solid #2563eb;
  border-radius: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.chat-q-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  border-left-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.chat-q-card-head, .chat-q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}
.chat-q-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  flex-wrap: wrap;
}
.chat-q-pin {
  color: #2563eb;
}
.chat-q-bank {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.chat-q-type {
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
}
.chat-q-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chat-q-goto {
  font-size: 11px;
  color: #2563eb;
  font-weight: 600;
}
.chat-q-snippet {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-q-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px dashed #e2e8f0;
  flex-wrap: wrap;
}
.chat-q-actions .btn.chat-q-jump-btn {
  border: 1px solid #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3.5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
  transition: all 0.15s ease;
}
.chat-q-actions .btn.chat-q-jump-btn:hover {
  background: #dbeafe !important;
  border-color: #60a5fa !important;
  color: #1e40af !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.16);
}
.chat-q-actions .btn.chat-q-reply-btn {
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3.5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}
.chat-q-actions .btn.chat-q-reply-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* 采纳回答与求助状态徽章 */
.help-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.help-status-tag.unsolved,
.help-status-tag.waiting {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.help-status-tag.solved {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.chat-msg.accepted-answer {
  border: 2px solid #10b981 !important;
  background: #f0fdf4 !important;
}
.chat-accepted-banner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #10b981;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.chat-accept-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #10b981;
  background: #ffffff;
  color: #059669;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.15s ease;
}
.chat-accept-btn:hover {
  background: #ecfdf5;
  border-color: #059669;
}
.chat-accept-btn.is-accepted {
  background: #10b981;
  color: #ffffff;
}

/* 电脑端求助悬浮窗 (Floating Help Modal) */
.help-floating-modal {
  position: fixed;
  inset: 0;
  z-index: 1045;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}
.help-floating-modal.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.help-floating-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.help-floating-dialog {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 600px;
  height: 80vh;
  max-height: 680px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.help-floating-modal.open .help-floating-dialog {
  transform: scale(1) translateY(0);
}
.help-floating-head {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  flex-shrink: 0;
}
.help-floating-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.help-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-users {
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 4px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  flex-wrap: nowrap !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch !important;
}
.chat-users::-webkit-scrollbar {
  display: none !important;
}
.chat-user-chip {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  border-radius: 6px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 0 8px !important;
  font-size: 11.5px !important;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap !important;
  transition: all 0.15s ease;
}
.chat-user-chip:hover {
  background: #f1f5f9;
  color: var(--ink);
  border-color: #94a3b8;
}
.chat-user-chip span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}
.chat-user-chip.online {
  color: #1e293b;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.chat-user-chip.online span { background: #10b981; }
.chat-user-chip.all {
  border-color: #fed7aa;
  color: #c2410c;
  background: #fff7ed;
  font-weight: 600;
}
.chat-body-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}
.chat-empty {
  margin: auto;
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13.5px;
}
.chat-msg {
  max-width: min(80%, 580px);
  padding: 10px 14px 9px;
  border-radius: 14px 14px 14px 4px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.chat-msg:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 2px 8px rgba(15, 23, 42, 0.04);
}
.chat-msg.own {
  align-self: flex-end;
  background: #eff6ff;
  border-color: #bfdbfe;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.chat-msg.mentioned {
  border-color: #fca5a5;
  background: #fff5f5;
}
.chat-msg.revoked {
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  color: var(--muted);
  box-shadow: none;
}
.chat-msg.revoked .msg-text {
  color: var(--muted);
  font-style: italic;
}
.chat-msg.pulse {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.chat-msg:hover {
  border-color: #94a3b8;
}
.chat-msg .msg-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}
.chat-msg.own .msg-user {
  color: #1d4ed8;
}
.chat-msg .msg-user em {
  padding: 1px 6px;
  border-radius: 4px;
  background: #ef4444;
  color: #ffffff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
}
.chat-msg .msg-time {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 400;
  margin-left: auto;
}
.chat-msg .msg-text {
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  color: #0f172a;
}
.chat-mention {
  display: inline;
  color: #2563eb;
  font-weight: 700;
}
.chat-mention.me {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-radius: 4px;
  padding: 1px 4px;
}
.chat-reply-ref {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-left: 3px solid #60a5fa;
  background: rgba(241, 245, 249, 0.85);
  color: var(--muted);
  border-radius: 4px 6px 6px 4px;
  padding: 5px 8px;
  margin: 2px 0 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-reply-ref:hover {
  background: rgba(226, 232, 240, 0.9);
}
.chat-reply-ref b {
  display: block;
  color: #1e293b;
  font-size: 11.5px;
}
.chat-reply-ref span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
}
.chat-reply-ref.revoked {
  border-left-color: #cbd5e1;
  color: var(--muted);
  font-style: italic;
}
.chat-action-menu {
  position: fixed;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(10px);
}
.chat-action-menu[hidden] {
  display: none;
}
.chat-action-menu button {
  border: 0;
  background: transparent;
  color: #334155;
  min-width: 36px;
  height: 30px;
  border-radius: 6px;
  padding: 0 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.chat-action-menu button:hover {
  background: #eff6ff;
  color: #2563eb;
}
.chat-action-menu button.danger {
  color: #dc2626;
}
.chat-action-menu button.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}
.chat-new-tip {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  z-index: 10;
}
.chat-new-tip:hover {
  transform: translateX(-50%) translateY(-2px);
  background: #1d4ed8;
}
.chat-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: #f1f5f9;
}
.chat-replying div {
  min-width: 0;
}
.chat-replying b {
  display: block;
  font-size: 12px;
  color: #1e293b;
}
.chat-replying span {
  display: block;
  color: #64748b;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-mute-tip {
  border-top: 1px solid #fde68a;
  background: #fefce8;
  color: #854d0e;
  padding: 9px 16px;
  font-size: 12.5px;
  line-height: 1.4;
}
.chat-mute-tip[hidden] {
  display: none;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}
.chat-input-row textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.chat-input-row textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.chat-send-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 6px;
}
.chat-send-col span {
  color: #94a3b8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chat-send-col .btn {
  min-width: 72px;
  height: 38px;
  font-weight: 600;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .nav-badge {
    top: -6px;
    right: -7px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-width: 1px;
    font-size: 9px;
    line-height: 12px;
  }
  .chat-container {
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-radius: 0;
  }
  .chat-head {
    padding: 6px 10px;
    height: 44px;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
  }
  .chat-head-left {
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .chat-head-back-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }
  .chat-title {
    gap: 0;
  }
  .chat-title b {
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-title-sub {
    display: none !important;
  }
  .chat-head-actions {
    gap: 4px;
    flex: 0 0 auto;
  }
  .chat-online-count {
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
  }
  .chat-refresh-btn {
    height: 24px;
    padding: 0 6px;
    font-size: 11px;
  }
  .chat-users {
    padding: 4px 10px !important;
  }
  .chat-attach-card {
    margin: 6px 10px 4px;
    padding: 6px 10px;
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    gap: 8px;
  }
  .chat-attach-title {
    font-size: 12px;
  }
  .chat-attach-snippet {
    font-size: 11px;
  }
  .chat-attach-send-btn {
    font-size: 11.5px;
    padding: 3.5px 8px;
  }
  .chat-attach-cancel-btn {
    padding: 2.5px 6px;
    font-size: 11.5px;
  }
  .chat-body-wrap {
    flex: 1 1 auto;
  }
  .chat-messages {
    min-height: 0;
    padding: 12px;
    gap: 8px;
  }
  .chat-msg {
    max-width: 92%;
    padding: 8px 11px 7px;
  }
  .chat-action-menu {
    left: 50% !important;
    right: auto;
    transform: translateX(-50%);
    bottom: 84px;
    top: auto !important;
    border-radius: 12px;
    padding: 5px;
  }
  .chat-action-menu button {
    min-width: 44px;
    height: 34px;
  }
  .chat-input-row {
    padding: 10px 12px calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    gap: 8px;
    background: #ffffff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.05);
    flex-shrink: 0 !important;
  }
  .chat-input-row textarea {
    min-height: 44px;
    font-size: 16px !important;
    padding: 9px 12px;
    border-radius: 12px;
  }
  .chat-send-col .btn {
    height: 44px;
    min-width: 66px;
    border-radius: 10px;
  }
  body.keyboard-is-open .chat-input-row {
    padding: 8px 12px 8px !important;
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
  }
  .floating-chat {
    right: 14px;
    bottom: 20px;
    width: 48px;
    height: 48px;
  }
  body.practice-mode .floating-chat {
    bottom: 56px;
    right: 10px;
  }
  .float-chat-button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.38);
  }
  .float-chat-button .float-chat-label {
    display: none;
  }
  .float-chat-button .float-chat-icon-wrap {
    margin: 0;
  }
  .float-chat-button .float-chat-badge {
    top: -2px;
    right: -2px;
  }
  .float-chat-panel {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: min(520px, calc(100dvh - 116px));
    border-radius: 14px;
  }
  body.practice-mode .float-chat-panel {
    height: min(420px, calc(100dvh - 180px));
  }
}

/* ---- 页面回到顶部与回到底部浮动导航 ---- */
.scroll-nav-group {
  position: fixed;
  right: 20px;
  bottom: 72px; /* 同步向上平移至视觉舒适操作区 */
  z-index: 75;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
body.practice-mode .scroll-nav-group {
  bottom: 126px;
}
@media (max-width: 640px) {
  .scroll-nav-group {
    right: 14px;
    bottom: 64px;
    gap: 7px;
  }
  body.practice-mode .scroll-nav-group {
    bottom: 120px;
  }
}

.scroll-nav-btn,
.scroll-top-btn,
.scroll-bottom-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 4px 18px rgba(30, 41, 82, 0.12);
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
  line-height: 1;
}

/* 兼容未放置于 .scroll-nav-group 内的独立回退定位 */
body:not(:has(.scroll-nav-group)) .scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 82px;
  z-index: 75;
}
body:not(:has(.scroll-nav-group)).practice-mode .scroll-top-btn {
  bottom: 136px;
}
@media (max-width: 640px) {
  body:not(:has(.scroll-nav-group)) .scroll-top-btn {
    right: 14px;
    bottom: 76px;
  }
  body:not(:has(.scroll-nav-group)).practice-mode .scroll-top-btn {
    bottom: 130px;
  }
}

.scroll-nav-btn.show,
.scroll-top-btn.show,
.scroll-bottom-btn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-nav-btn:hover,
.scroll-top-btn:hover,
.scroll-bottom-btn:hover {
  background: var(--accent-weak);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.22);
}
.scroll-nav-btn:active,
.scroll-top-btn:active,
.scroll-bottom-btn:active {
  transform: scale(0.94);
}

.scroll-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* 浮动提示条 (桌面端悬停显示“回到顶部” / “回到底部”) */
.scroll-nav-tip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.5px;
}
.scroll-nav-tip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-left-color: rgba(15, 23, 42, 0.88);
}
@media (hover: hover) and (min-width: 641px) {
  .scroll-nav-btn:hover .scroll-nav-tip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}
@media (max-width: 640px) {
  .scroll-nav-btn,
  .scroll-top-btn,
  .scroll-bottom-btn {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .scroll-nav-icon {
    font-size: 16px;
  }
  .scroll-nav-tip {
    display: none;
  }
}

@media (min-width: 641px) { .brand-text { display: inline; } }

/* ---- 反馈页面与卡片 ---- */
.fb-form-card {
  margin-bottom: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 20px 22px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
.fb-form-head {
  margin-bottom: 16px;
}
.fb-form-head h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.fb-form-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.fb-type-select {
  width: 100%;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-family: inherit;
}
.fb-type-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.fb-textarea {
  width: 100%;
  min-height: 96px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.fb-form-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.fb-form-footer .btn {
  min-width: 110px;
  font-weight: 600;
}
.fb-section-title {
  margin: 28px 0 14px;
}
.fb-section-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.fb-empty-state {
  text-align: center;
  padding: 36px 16px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: #fafafa;
}
.fb-empty-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}
.fb-record-card {
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px 16px;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}
.fb-record-card:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.fb-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.fb-user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fb-time {
  font-size: 11.5px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.fb-item-body {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 6px;
}
.fb-item-reply {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 10px 14px;
  border-radius: 10px;
  margin-top: 10px;
}
.fb-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}
.fb-reply-content,
.fb-reply-body {
  font-size: 13px;
  line-height: 1.5;
  color: #14532d;
  white-space: pre-wrap;
  word-break: break-word;
}
/* 管理员端反馈管理卡片 */
.fb-admin-card {
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.fb-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.fb-admin-text {
  font-size: 14px;
  line-height: 1.5;
  color: #1e293b;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
}
.fb-reply-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.fb-reply-input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-family: inherit;
}
.fb-reply-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.fb-reply-row .btn {
  height: 36px;
  padding: 0 14px;
  font-weight: 600;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .fb-form-card {
    padding: 14px 14px;
  }
  .fb-reply-row {
    flex-direction: column;
    align-items: stretch;
  }
  .fb-reply-row .btn {
    width: 100%;
  }
}

/* ---- 题库操作区 ---- */
.bank-actions { align-items: center; }
.bank-actions-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 4px;
  flex-shrink: 0;
  align-self: center;
}
.bank-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.bank-head h3 { margin: 0; font-size: 15px; }
.bank-head .nums { font-size: 12px; color: var(--muted); }
.bank-row { padding: 14px 18px; }

/* ---- 复习资料荧光标记 ---- */
mark { background: #fde68a; color: inherit; padding: 1px 2px; border-radius: 2px; }

/* ---- 复习资料标题样式 ---- */
.doc h2 {
  font-size: 17px; color: #1a3a6a; border-bottom: 2px solid #e5e8f0;
  padding-bottom: 6px; margin: 18px 0 10px;
}
.doc h3 {
  font-size: 14px; color: #2a4a7a; margin: 12px 0 6px;
  padding-left: 8px; border-left: 3px solid var(--accent);
}
.doc p { font-size: 13.5px; color: #3a3a3a; margin: 4px 0; line-height: 1.7; }

/* ---- 题目插图与大图预览 ---- */
.q-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 14px;
  align-items: flex-start;
}
.q-img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: #ffffff;
  padding: 6px;
  cursor: zoom-in;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.q-img:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.img-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
  cursor: zoom-out;
}
.img-modal.active {
  display: flex;
}
.img-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 95vw;
  max-height: 95vh;
}
.img-modal-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  padding: 10px;
}
.img-modal-tip {
  color: #e2e8f0;
  font-size: 13px;
  margin-top: 10px;
  user-select: none;
}

/* 题库机构独立切换条（珞研题库 vs 衡真题库）— 遵循现代单行可滚动 Tab 规范与非颜色下划线指示 */
.org-switch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 16px;
  background: var(--card, #ffffff);
  border-radius: var(--radius, 14px);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.04));
}
.org-switch-bar.is-hengzhen {
  border-color: #c7d2fe;
  background: linear-gradient(90deg, #ffffff 0%, #f5f3ff 100%);
}
.org-switch-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-shrink: 0;
}
.org-switch-label {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-light, #334155);
  white-space: nowrap;
}
.org-switch-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  max-width: 100%;
}
.org-switch-tabs::-webkit-scrollbar {
  display: none;
}
.org-switch-btn {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #475569);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.org-switch-btn:hover {
  color: var(--ink, #0f172a);
  background: rgba(255, 255, 255, 0.72);
}
.org-switch-btn:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}
.org-switch-btn[aria-selected="true"] {
  background: #ffffff;
  color: #047857;
  border-color: #a7f3d0;
}
.org-switch-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 12px 0 12px;
  border-block-end: 3px solid currentColor;
  border-radius: 3px 3px 0 0;
}
.org-switch-btn[data-org-switch="hengzhen"][aria-selected="true"] {
  color: #4338ca;
  border-color: #c7d2fe;
}
.org-switch-sub {
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted, #64748b);
}
.org-switch-btn[aria-selected="true"] .org-switch-sub {
  background: #ecfdf5;
  color: #047857;
}
.org-switch-btn[data-org-switch="hengzhen"][aria-selected="true"] .org-switch-sub {
  background: #eef2ff;
  color: #4338ca;
}
.org-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
}
.org-badge-inline.hengzhen {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
@media (max-width: 640px) {
  .org-switch-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .org-switch-tabs {
    width: 100%;
    box-sizing: border-box;
  }
  .org-switch-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 7px 6px;
    font-size: 12.5px;
    gap: 4px;
  }
  .org-switch-sub {
    font-size: 10.5px;
    padding: 1px 5px;
  }
}

/* 考试模式切换条 (本科 / 专科) - 现代化 Segmented Pill Group */
.track-switch-pill,
.track-switch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 16px;
  background: var(--card, #ffffff);
  border-radius: var(--radius, 14px);
  border: 1px solid var(--line, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(15, 23, 42, 0.04));
  flex-wrap: wrap;
}
.track-pill-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.track-pill-icon {
  font-size: 16px;
  line-height: 1;
}
.track-pill-label,
.track-label {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink-light, #334155);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.track-pill-group,
.track-buttons {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  gap: 5px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.track-pill-btn,
.track-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
.track-pill-btn:hover,
.track-btn:hover {
  color: var(--ink, #0f172a);
  background: rgba(255, 255, 255, 0.7);
}
.track-pill-btn.active,
.track-btn.active {
  background: #ffffff !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  border: none !important;
}
.track-pill-title {
  display: inline-block;
  letter-spacing: -0.01em;
}
.track-pill-count,
.track-btn .track-count {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--muted, #64748b);
  transition: all 0.2s ease;
}
.track-pill-btn.active .track-pill-count,
.track-btn.active .track-count {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}
.track-pill-btn.purple-pill.active {
  background: #faf5ff !important;
  border-color: #c4b5fd !important;
  color: #7c3aed !important;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.15);
}
.track-pill-btn.purple-pill.active .track-pill-title {
  color: #6d28d9 !important;
  font-weight: 700;
}
.track-pill-btn.purple-pill.active .track-pill-count {
  background: #ede9fe !important;
  color: #6d28d9 !important;
  border: 1px solid #c4b5fd !important;
}
.q-tag.ug-tag {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
  font-weight: 600;
}

/* ========================================================
   2026 现代化UI体系：断点看板、模式矩阵、双栏工作台与抽屉答题卡
   ======================================================== */

/* 1. 首页断点续做看板（轻量紧凑条） */
.resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius, 12px);
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.resume-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.resume-bar-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.resume-bar-text {
  font-size: 13.5px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resume-bar-text b {
  color: #ffffff;
  font-weight: 700;
}
.resume-bar-text small {
  color: #94a3b8;
}
.resume-bar-btn {
  background: #10b981 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  white-space: nowrap;
}
.resume-bar-btn:hover {
  background: #059669 !important;
}

/* 1.45 首页官方考纲与参考书目导引条 */
.home-exam-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary, #0284c7);
  border-radius: var(--radius, 12px);
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.home-exam-scope-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.home-exam-scope-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.home-exam-scope-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.home-exam-scope-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  flex-wrap: wrap;
}
.home-exam-scope-badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--primary, #0284c7);
  font-weight: 600;
}
.home-exam-scope-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.home-exam-scope-btn {
  white-space: nowrap;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 8px 16px !important;
  border-radius: 8px !important;
}
.home-exam-scope-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------------- 紫色考点标签与 2027 考纲主题体系 ---------------- */
.q-tag.purple,
.q-tag.tag-purple {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%) !important;
  color: #4c1d95 !important;
  border: 1.5px solid #8b5cf6 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.15) !important;
}
.q-tag.purple.q-tag-clickable:hover,
.q-tag.tag-purple.q-tag-clickable:hover {
  background: #c4b5fd !important;
  border-color: #7c3aed !important;
  color: #3b0764 !important;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25) !important;
  transform: translateY(-1px);
}
.badge.purple {
  background: #ede9fe !important;
  border: 1px solid #a78bfa !important;
  color: #5b21b6 !important;
  font-weight: 600;
}
.tag-chip.purple {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
  border: 1.5px solid #8b5cf6 !important;
  color: #4c1d95 !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.15) !important;
}
.tag-chip.purple b {
  color: #ffffff !important;
  background: #7c3aed !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  margin-left: 2px !important;
}
.tag-chip.purple:hover,
.tag-chip.purple.active {
  background: #ddd6fe !important;
  border-color: #6d28d9 !important;
  color: #3b0764 !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.28) !important;
}

/* ---------------- 考纲表格自适应与移动端防畸变容器 ---------------- */
.scope-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.scope-table-scroll-hint {
  display: none;
  padding: 6px 12px;
  background: #f5f3ff;
  border-bottom: 1px solid #ede9fe;
  color: #6d28d9;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.scope-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
}
.scope-table thead tr {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}
.scope-table th {
  padding: 10px 14px;
  color: #334155;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}
.scope-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}
.scope-table tbody tr:hover {
  background: #fafaf9;
}
@media (max-width: 768px) {
  .scope-table-scroll-hint {
    display: block;
  }
  .scope-table {
    min-width: 580px;
    font-size: 12.5px;
  }
  .scope-table th, .scope-table td {
    padding: 8px 10px;
  }
}

/* 首页 2027 考纲卡片专属紫色主题 */
.home-exam-scope-bar.purple-theme {
  border-left: 4px solid #8b5cf6;
  background: linear-gradient(to right, #faf5ff 0%, #ffffff 100%);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.06);
}
.home-exam-scope-badge.purple {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.25);
  font-weight: 700;
}
.home-exam-scope-btn.purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border-color: #7c3aed !important;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}
.home-exam-scope-btn.purple:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

/* 大纲版本快速切换栏 */
.scope-version-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  width: fit-content;
}
.scope-version-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: all 0.2s ease;
}
.scope-version-tab:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.7);
}
.scope-version-tab.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.scope-version-tab.active.purple {
  color: #7c3aed;
  background: #ffffff;
  border: 1px solid #ddd6fe;
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.15);
}

/* 1.46 科目考纲专属横幅 (通用与主题化，紧凑轻量版) */
.hy-scope-banner {
  margin-top: 12px;
  margin-bottom: 0 !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.hy-scope-banner.wh-theme {
  background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%) !important;
  border: 1px solid #bfdbfe !important;
  border-left: 4px solid #2563eb !important;
}
.hy-scope-banner.zr-theme {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
  border: 1px solid #a7f3d0 !important;
  border-left: 4px solid #059669 !important;
}
.hy-scope-banner.zk-theme {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
  border: 1px solid #ddd6fe !important;
  border-left: 4px solid #7c3aed !important;
}
.hy-scope-banner.gh-theme {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%) !important;
  border: 1px solid #fde68a !important;
  border-left: 4px solid #d97706 !important;
}
.hsb-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hsb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.hsb-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.hsb-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hsb-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.wh-theme .hsb-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #1e40af;
}
.zr-theme .hsb-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #065f46;
}
.zk-theme .hsb-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #5b21b6;
}
.gh-theme .hsb-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #92400e;
}
.wh-theme .hsb-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
  font-weight: 600;
}
.zr-theme .hsb-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  font-weight: 600;
}
.zk-theme .hsb-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  font-weight: 600;
}
.gh-theme .hsb-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.15);
  color: #b45309;
  font-weight: 600;
}
.wh-theme .hsb-desc {
  font-size: 11.5px;
  color: #2563eb;
  line-height: 1.35;
}
.zr-theme .hsb-desc {
  font-size: 11.5px;
  color: #047857;
  line-height: 1.35;
}
.zk-theme .hsb-desc {
  font-size: 11.5px;
  color: #6d28d9;
  line-height: 1.35;
}
.gh-theme .hsb-desc {
  font-size: 11.5px;
  color: #b45309;
  line-height: 1.35;
}
.hsb-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.wh-theme .hsb-actions .btn.primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
}
.wh-theme .hsb-actions .btn.ghost {
  color: #2563eb !important;
  border-color: #93c5fd !important;
  background: rgba(255, 255, 255, 0.7) !important;
}
.zr-theme .hsb-actions .btn.primary {
  background: #059669 !important;
  border-color: #059669 !important;
}
.zr-theme .hsb-actions .btn.ghost {
  color: #059669 !important;
  border-color: #a7f3d0 !important;
  background: rgba(255, 255, 255, 0.7) !important;
}
.zk-theme .hsb-actions .btn.primary {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
}
.zk-theme .hsb-actions .btn.ghost {
  color: #7c3aed !important;
  border-color: #c4b5fd !important;
  background: rgba(255, 255, 255, 0.7) !important;
}
.gh-theme .hsb-actions .btn.primary {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
}
.gh-theme .hsb-actions .btn.ghost {
  color: #b45309 !important;
  border-color: #fcd34d !important;
  background: rgba(255, 255, 255, 0.8) !important;
}
.self-study-card {
  border-color: #ddd6fe !important;
  background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
}
.self-study-card:hover {
  border-color: #8b5cf6 !important;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12) !important;
}
.hsb-btn {
  font-weight: 600 !important;
  white-space: nowrap !important;
  padding: 4px 10px !important;
  height: 28px !important;
  font-size: 12px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 1.47 考纲导引横幅移动端与平板响应式适配 (@media max-width: 768px) */
@media (max-width: 768px) {
  /* 首页考纲大纲导引条 (平板与手机通用垂直流) */
  .home-exam-scope-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 12px 14px !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
  .home-exam-scope-left {
    width: 100% !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .home-exam-scope-icon {
    font-size: 24px !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
  }
  .home-exam-scope-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }
  .home-exam-scope-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    line-height: 1.35 !important;
  }
  .home-exam-scope-badge {
    font-size: 10.5px !important;
    padding: 1px 6px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  .home-exam-scope-desc {
    font-size: 11.5px !important;
    line-height: 1.4 !important;
    color: var(--muted, #64748b) !important;
  }
  .home-exam-scope-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 2px !important;
  }
  .home-exam-scope-actions .btn,
  .home-exam-scope-btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  /* 科目页考纲专属横幅 (企业文化/社会责任/自考/公共行业) - 移动端紧凑排版 */
  .hy-scope-banner {
    padding: 8px 12px !important;
    margin-top: 10px !important;
    margin-bottom: 0 !important;
    border-radius: 10px !important;
  }
  .hsb-main {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .hsb-left {
    width: 100% !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .hsb-icon {
    font-size: 20px !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
    flex-shrink: 0 !important;
  }
  .hsb-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  .hsb-title-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .hsb-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
  }
  .hsb-badge {
    font-size: 10px !important;
    padding: 1px 5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  .hsb-desc {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
  .hsb-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    margin-top: 0 !important;
  }
  .hsb-btn,
  .hsb-actions .btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
  }
}

/* 官方资料原文件下载卡片与下载盒 */
.doc-download-box {
  background: var(--bg-hover, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 12px);
  padding: 16px;
  margin: 16px 0 24px 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.ddb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  margin-bottom: 14px;
}
.ddb-head b {
  font-size: 15px;
  color: var(--ink, #0f172a);
}
.ddb-head .hint {
  font-size: 12px;
  color: var(--muted, #64748b);
}

.doc-downloads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.doc-download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 10px);
  padding: 12px 14px;
  transition: all 0.15s ease;
}
.doc-download-item:hover {
  border-color: var(--primary, #0284c7);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}
.ddi-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.ddi-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.ddi-top b {
  display: block;
  font-size: 13.5px;
  color: var(--ink, #0f172a);
  word-break: break-all;
}
.ddi-top small {
  display: block;
  font-size: 11.5px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}
.doc-download-item .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.doc-download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-left: 4px solid var(--primary, #0284c7);
  border-radius: var(--radius, 10px);
  padding: 12px 16px;
  margin: 16px 0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}
.ddc-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.ddc-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.ddc-info b {
  display: block;
  font-size: 14px;
  color: var(--ink, #0f172a);
}
.ddc-info small {
  display: block;
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}
.doc-download-card .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* 1.5 首页轻量紧凑 KPI 状态条 */
.home-kpi-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.kpi-chip {
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius, 12px);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.kpi-chip-label {
  font-size: 12px;
  color: var(--muted);
}
.kpi-chip-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.kpi-chip-val.bad {
  color: var(--bad);
}
.kpi-chip-val small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* 2. 首页科目卡片（紧凑高信息密度） */
.subject-hub-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius, 14px);
  transition: transform 0.2s ease, box-shadow 0.2s, border-color 0.2s;
  background: var(--card);
  border: 1px solid var(--line);
}
.subject-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: #cbd5e1;
}
.subject-hub-top {
  padding: 14px 16px 10px;
  cursor: pointer;
}
.subject-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.subject-title-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.subject-status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--line-subtle);
  color: var(--muted);
}
.subject-status-badge.in-progress {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.subject-status-badge.done {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.subject-hub-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  flex-wrap: wrap;
  gap: 4px;
}
.hub-action-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hub-act-btn {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.hub-act-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #eff6ff;
}
.hub-act-btn.primary {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.hub-act-btn.primary:hover {
  background: #2563eb;
  color: #ffffff;
}
.hub-act-btn.success {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.hub-act-btn.success:hover {
  background: #059669;
  color: #ffffff;
}
.hub-act-btn.danger {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}
.hub-act-btn.danger:hover {
  background: #ef4444;
  color: #ffffff;
}
.hub-act-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  margin-left: auto;
}
.hub-act-btn.ghost:hover {
  background: #f1f5f9;
  color: var(--ink);
}

/* 3. 科目详情页紧凑看板与筛选 */
.subj-compact-hero {
  padding: 16px 20px !important;
  margin-bottom: 14px !important;
  border-radius: var(--radius, 14px) !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.subj-compact-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.subj-compact-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subj-compact-title-row h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}
.subj-track-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-weight: 600;
}
.subj-compact-kpis {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.subj-compact-kpis b {
  color: var(--ink);
  font-weight: 700;
}
.subj-compact-kpis .kpi-bad b {
  color: var(--bad);
}
.subj-compact-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.subj-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.subj-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.subj-chip,
.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--card, #ffffff);
  color: var(--ink, #1e293b);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  position: relative;
  outline: none;
}
.subj-chip:hover,
.type-pill:hover {
  border-color: var(--primary, #007749);
  color: var(--primary, #007749);
  background: var(--primary-weak, #f0fdf4);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 119, 73, 0.15);
}
.subj-chip:active,
.type-pill:active {
  transform: scale(0.96);
}
.subj-chip.active,
.type-pill.active {
  background: linear-gradient(135deg, var(--primary, #007749) 0%, #0d9488 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 119, 73, 0.35), 0 1px 3px rgba(0, 0, 0, 0.12) !important;
  transform: translateY(-1.5px) !important;
}
.subj-chip.active:active,
.type-pill.active:active {
  transform: scale(0.97) translateY(0);
}
.subj-chip .pill-text,
.type-pill .pill-text {
  line-height: 1.2;
}
.subj-chip .pill-count,
.type-pill .pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.07);
  color: var(--muted, #64748b);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: all 0.2s ease;
}
.subj-chip:hover .pill-count,
.type-pill:hover .pill-count {
  background: rgba(0, 119, 73, 0.15);
  color: var(--primary, #007749);
}
.subj-chip.active .pill-count,
.type-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.subj-filter-danger-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}
.subj-filter-danger-actions .btn.small.ghost.danger {
  font-size: 12px;
  padding: 3px 9px;
  height: 28px;
  line-height: 20px;
  border-radius: 6px;
}

/* 4. 刷题与背题一体化卡片 */
.subj-modes-unified {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0;
  padding: 0 !important;
  border-radius: var(--radius, 14px) !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  margin-bottom: 14px !important;
  overflow: hidden;
}
.subj-mode-col {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
}
.subj-mode-col-divider {
  background: var(--line);
  width: 1px;
  height: 100%;
}
.subj-mode-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.subj-mode-col-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.mode-section-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.mode-section-tag.practice {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.mode-section-tag.browse {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.subj-mode-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.subj-mode-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}
.subj-mode-item:hover:not(.disabled) {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.subj-mode-item.primary {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.subj-mode-item.primary:hover {
  border-color: #60a5fa;
  background: #eff6ff;
}
.subj-mode-item.success {
  border-color: #bbf7d0;
  background: #f6fdf9;
}
.subj-mode-item.success:hover {
  border-color: #86efac;
  background: #ecfdf5;
}
.subj-mode-item.warn {
  border-color: #fecaca;
  background: #fffafa;
}
.subj-mode-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #fafafa;
}
.smi-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.smi-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.smi-info b {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.3;
}
.smi-info small {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smi-btn {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
}
.subj-modes-card {
  padding: 18px 20px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
.subj-modes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.subj-modes-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.subj-modes-sub-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.subj-style-toggle {
  display: inline-flex;
  background: var(--bg, #f1f5f9);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  gap: 3px;
  box-sizing: border-box;
}
.subj-style-btn {
  border: none;
  background: transparent;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
  white-space: nowrap;
}
.subj-style-btn:hover {
  color: var(--ink, #1e293b);
}
.subj-style-btn.active {
  background: #ffffff;
  color: var(--accent, #0284c7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.subj-modes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}
.subj-mode-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: #ffffff;
  color: inherit;
  transition: all 0.18s ease;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}
.subj-mode-item:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.subj-mode-item.primary-item {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.subj-mode-item.primary-item:hover {
  border-color: #60a5fa;
  background: #eff6ff;
}
.subj-mode-item.warn-item {
  border-color: #fecaca;
  background: #fffafa;
}
.subj-mode-item.warn-item:hover {
  border-color: #f87171;
  background: #fef2f2;
}
.subj-mode-item.fav-item {
  border-color: #fde68a;
  background: #fffdf5;
}
.subj-mode-item.fav-item:hover {
  border-color: #f59e0b;
  background: #fffbeb;
}
.smi-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.smi-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg, #f1f5f9);
  color: var(--ink, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.primary-item .smi-badge {
  background: #dbeafe;
  color: #1d4ed8;
}
.warn-item .smi-badge {
  background: #fee2e2;
  color: #b91c1c;
}
.fav-item .smi-badge {
  background: #fef3c7;
  color: #b45309;
}
.smi-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.smi-info b {
  font-size: 14px;
  color: var(--ink, #1e293b);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.smi-info small {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.smi-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.smi-actions .smi-btn {
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 7px;
  line-height: 1.2;
}

/* 移动端专属适配 (<= 640px) */
@media (max-width: 640px) {
  .subj-modes-card {
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
  }
  .subj-modes-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 10px;
  }
  .subj-modes-title-row {
    justify-content: space-between;
    width: 100%;
  }
  .subj-style-toggle {
    display: flex;
    width: 100%;
  }
  .subj-style-btn {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    font-size: 12px;
  }
  .subj-modes-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .subj-mode-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 11px 12px;
  }
  .smi-main {
    width: 100%;
  }
  .smi-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .smi-actions .smi-btn {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 12.5px;
  }
  .smi-actions .smi-btn.ghost {
    flex: 0 0 auto;
    min-width: 75px;
  }
}

/* 5. 备考工具与重置卡片 */
.subj-tools-card {
  padding: 14px 18px !important;
  border-radius: var(--radius, 14px) !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  margin-bottom: 18px !important;
}
.subj-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.subj-tools-head b {
  font-size: 13.5px;
  color: var(--ink);
}
.subj-reset-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subj-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.subj-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #ffffff;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
}
.subj-tool-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  transform: translateY(-1px);
}
.stb-icon {
  font-size: 20px;
  margin-bottom: 3px;
}
.subj-tool-btn b {
  font-size: 13px;
  margin-bottom: 1px;
}
.subj-tool-btn small {
  font-size: 11px;
  color: var(--muted);
}
.subj-tool-btn.is-empty,
.subj-tool-btn.disabled {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.65 !important;
  filter: grayscale(0.85) !important;
  box-shadow: none !important;
  transform: none !important;
}
.subj-tool-btn.is-empty:hover,
.subj-tool-btn.disabled:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  transform: none !important;
}
.subj-tool-btn.is-empty .stb-icon,
.subj-tool-btn.disabled .stb-icon {
  opacity: 0.55;
}
.subj-tool-btn.is-empty b,
.subj-tool-btn.disabled b {
  color: #64748b !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.empty-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #64748b;
  line-height: 1.3;
  vertical-align: middle;
}
.subj-exam-hist {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.exam-hist-chip {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: #475569;
}

/* 6. 账号与服务中心 (全端高精排版与移动端专属优化) */
.account-page-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.account-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 32px;
}

.account-back-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--line-subtle, #f1f5f9);
  color: var(--muted, #475569);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--line, #e2e8f0);
  transition: all 0.15s;
}

.account-back-pill:hover,
.account-back-pill:active {
  background: #e2e8f0;
  color: var(--ink, #0f172a);
}

.account-header-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.account-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.account-section-head h3 {
  margin: 0 !important;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.account-section-head .section-icon {
  font-size: 16px;
  line-height: 1;
}

/* 个人信息主卡片 */
.account-hero-card {
  padding: 16px 18px !important;
  margin-bottom: 12px !important;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
}

.account-profile-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-user-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28);
}

.account-user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.account-user-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-role-badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.account-role-badge.admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.account-role-badge.student {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.account-sync-pill {
  font-size: 11.5px;
  color: #10b981;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sync-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.sync-dot.offline {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

/* 学习概览数据栏 */
.account-quick-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line, #f1f5f9);
}

.acc-metric-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #f1f5f9;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.acc-metric-chip:hover,
.acc-metric-chip:active {
  background: #e0f2fe;
  border-color: #bae6fd;
}

.acc-metric-chip span {
  font-size: 11.5px;
  color: var(--muted, #64748b);
}

.acc-metric-chip b {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin-top: 2px;
}

.acc-metric-chip.wrong b {
  color: var(--bad, #dc2626);
}

.acc-metric-chip.fav b {
  color: #d97706;
}

/* 导航网格卡片 */
.account-nav-card {
  margin-bottom: 12px !important;
  padding: 14px 16px !important;
  border-radius: 14px;
}

.account-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.acc-nav-btn {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: #ffffff;
  text-decoration: none;
  color: var(--ink, #0f172a);
  transition: all 0.15s ease;
}

.acc-nav-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-1px);
}

.acc-nav-btn:active {
  background: #e0f2fe;
  transform: scale(0.98);
}

.acc-nav-btn.admin {
  border-color: #fecaca;
  background: #fffafa;
}

.acc-nav-btn.admin:hover {
  border-color: #ef4444;
  background: #fef2f2;
}

.acc-nav-icon {
  font-size: 18px;
  margin-bottom: 3px;
}

.acc-nav-btn b {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1px;
}

.acc-nav-btn .hint {
  font-size: 11px;
  color: var(--muted, #64748b);
  line-height: 1.2;
}

/* 云端同步与管理卡片 */
.account-sync-card {
  margin-bottom: 12px !important;
  padding: 14px 16px !important;
  border-radius: 14px;
}

.account-sync-info {
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.sync-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink, #0f172a);
  margin-bottom: 4px;
}

.sync-state-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 600;
  margin-left: auto;
}

.sync-desc {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin: 0;
  line-height: 1.5;
}

.sync-desc code {
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11.5px;
  color: #475569;
}

.account-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-actions-row .btn {
  flex: 1 1 auto;
  justify-content: center;
  padding: 7px 12px;
  font-size: 13px;
}

/* 改名卡片 */
.account-rename-card {
  margin-bottom: 12px !important;
  padding: 14px 16px !important;
  border-radius: 14px;
}

.account-rename-card.account-rename-required {
  border-color: #fca5a5;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.account-rename-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
}

.account-input-wrap input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink, #0f172a);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.account-input-wrap input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.account-save-btn {
  flex-shrink: 0;
  padding: 8px 16px !important;
  font-size: 13px !important;
}

/* 未登录状态横幅与登录卡片 */
.account-guest-banner {
  text-align: center;
  padding: 18px 12px 14px;
}

.guest-banner-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.account-guest-banner h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink, #0f172a);
}

.account-guest-banner p {
  font-size: 12.5px;
  color: var(--muted, #64748b);
  margin: 0;
}

.account-login-card {
  padding: 18px 20px !important;
  border-radius: 14px;
}

.account-field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.account-field-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.account-field-item label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #334155);
}

.account-input {
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink, #0f172a);
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  width: 100%;
}

.account-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.account-login-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-btn-lg {
  width: 100%;
  padding: 10px 16px !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  justify-content: center !important;
}

.account-login-hint {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

/* ============ 移动端专属微调 (@media max-width: 768px) ============ */
@media (max-width: 768px) {
  .account-page-wrapper {
    padding: 0 2px;
  }
  .account-hero-card {
    padding: 12px 14px !important;
    border-radius: 12px;
  }
  .account-avatar {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }
  .account-user-name {
    font-size: 15px;
  }
  .account-role-badge {
    font-size: 10.5px;
    padding: 1px 6px;
  }
  .account-quick-metrics {
    margin-top: 10px;
    padding-top: 10px;
    gap: 6px;
  }
  .acc-metric-chip {
    padding: 6px 3px;
    border-radius: 8px;
  }
  .acc-metric-chip span {
    font-size: 10.5px;
  }
  .acc-metric-chip b {
    font-size: 15px;
  }
  .card.account-card.account-nav-card {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px;
  }
  .account-nav-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-top: 6px !important;
  }
  .acc-nav-btn {
    padding: 8px 10px !important;
    border-radius: 8px !important;
  }
  .acc-nav-icon {
    font-size: 16px !important;
    margin-bottom: 2px !important;
  }
  .acc-nav-btn b {
    font-size: 12.5px !important;
    line-height: 1.3 !important;
    margin-bottom: 1px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .acc-nav-btn .hint {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    color: var(--muted, #64748b) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .card.account-card.account-sync-card {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px;
  }
  .account-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .account-actions-row .account-btn-sync {
    grid-column: 1 / -1;
    padding: 9px 12px !important;
    font-size: 13.5px !important;
  }
  .account-actions-row .btn {
    padding: 8px 10px !important;
    font-size: 12.5px !important;
  }
  .card.account-card.account-rename-card,
  .card.account-card.account-backup-card {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 12px;
  }
  .account-login-card {
    padding: 14px 14px !important;
    border-radius: 12px;
  }
}

/* 7. 做题页双栏工作台 */
.practice-workbench {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 18px;
  margin-top: 10px;
  overflow: hidden;
}
.practice-main-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.practice-main-col .practice-card.card {
  margin: 0 !important;
  height: 100%;
}
.practice-sidebar-col {
  width: 320px;
  flex: 0 0 320px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sheet-sidebar {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px !important;
  margin: 0 !important;
  background: var(--card);
  border-radius: var(--radius, 14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sheet-sidebar-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-subtle);
  margin-bottom: 10px;
}
.sheet-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-sidebar-title b {
  font-size: 14.5px;
  color: var(--ink);
}
.sheet-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.legend-item.ok { color: var(--ok); font-weight: 600; }
.legend-item.bad { color: var(--bad); font-weight: 600; }
.legend-item.un { color: var(--muted); }
.legend-item.note { color: #6366f1; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.legend-note-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  background: #6366f1;
  color: #ffffff;
  font-size: 8px;
  font-weight: 700;
  border-radius: 50%;
  line-height: 1;
}
.sheet-grid-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.sheet-sidebar-footer {
  flex: 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 8. 移动端抽屉答题卡 */
.mobile-sheet-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}
.mobile-sheet-drawer.open {
  visibility: visible;
  pointer-events: auto;
}
.mobile-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-sheet-drawer.open .mobile-sheet-backdrop {
  opacity: 1;
}
.mobile-sheet-content {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -8px 36px rgba(15, 23, 42, 0.22);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease-spring);
  padding: 12px 18px 24px;
}
.mobile-sheet-drawer.open .mobile-sheet-content {
  transform: translateY(0);
}
.sheet-drag-handle {
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 12px;
  cursor: pointer;
}

/* 9. 统计页响应式卡片流与桌面表格 */
.stat-mobile-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.stat-m-card {
  padding: 12px 14px !important;
  border-radius: var(--radius, 12px) !important;
}
.stat-m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat-m-head b {
  font-size: 14.5px;
  color: var(--ink);
}
.stat-m-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.stat-m-metrics b {
  color: var(--ink);
}
.stat-m-metrics .kpi-bad b {
  color: var(--bad);
}
.stat-m-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.stat-backup-card {
  padding: 16px 18px !important;
  border-radius: var(--radius, 14px) !important;
}
.stat-backup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.stat-backup-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-btn-group.danger-group {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* 10. 响应式布局与断点媒体查询 */
@media (min-width: 1024px) {
  .mobile-sheet-drawer {
    display: none !important;
  }
  .practice-footer .btn-sheet {
    display: none !important;
  }
}
@media (max-width: 1023px) {
  .practice-sidebar-col {
    display: none !important;
  }
  .practice-workbench {
    display: flex;
    flex-direction: column;
  }
  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .resume-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .resume-bar-left {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .resume-bar-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .subj-compact-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .subj-modes-unified {
    grid-template-columns: 1fr;
  }
  .subj-mode-col-divider {
    width: 100%;
    height: 1px;
  }
  .subj-mode-col {
    padding: 14px 14px;
  }
  .subj-compact-hero {
    padding: 12px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .subj-compact-filter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .subj-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: visible;
  }
  .subj-filter-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 2px;
  }
  .type-pill {
    padding: 3px 9px;
    font-size: 12px;
    height: 26px;
    flex-shrink: 0;
    white-space: nowrap;
    gap: 4px;
    border-radius: 999px;
  }
  .type-pill .pill-count {
    height: 16px;
    min-width: 16px;
    font-size: 10px;
    padding: 0 4px;
  }
  .subj-filter-danger-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    justify-content: flex-end;
    margin-left: 0;
    gap: 8px;
    display: flex;
    align-items: center;
  }
  .subj-filter-danger-actions .btn.small.ghost.danger {
    height: 26px;
    padding: 2px 8px;
    font-size: 11.5px;
    line-height: 22px;
  }
  .subj-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-desktop-table {
    display: none !important;
  }
  .stat-mobile-list {
    display: flex !important;
  }
  /* 管理员页移动端自适应与极致紧凑 */
  .admin-desktop-table {
    display: none !important;
  }
  .admin-mobile-user-list {
    display: flex !important;
    gap: 8px !important;
  }
  .admin-overview {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }
  .admin-stat {
    padding: 6px 2px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    min-height: 44px !important;
  }
  .admin-stat-icon {
    display: none !important;
  }
  .admin-stat b {
    font-size: 14px !important;
    line-height: 1.1 !important;
  }
  .admin-stat span {
    font-size: 10px !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
  }
  .admin-page-title {
    font-size: 15px !important;
    margin-bottom: 6px !important;
  }
  .admin-card {
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }
  .admin-card-head {
    margin-bottom: 6px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
  .admin-card-head h3 {
    font-size: 13.5px !important;
    margin: 0 !important;
  }
  .admin-card-head p.hint {
    display: none !important;
  }
  .admin-top-nav-row {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }
  .admin-top-nav-row a {
    font-size: 12.5px !important;
  }
  .admin-top-tools {
    gap: 4px !important;
  }
  .admin-top-tools .btn.small {
    padding: 2px 6px !important;
    font-size: 11px !important;
    height: 25px !important;
  }
  .admin-notice-card {
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }
  .admin-notice-body {
    padding-top: 6px !important;
    border-top: 1px dashed var(--line) !important;
    margin-top: 6px !important;
  }
  .admin-notice-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }
  .admin-notice-presets {
    flex-wrap: wrap !important;
    gap: 3px !important;
  }
  .admin-notice-presets .btn.small {
    padding: 2px 5px !important;
    font-size: 10.5px !important;
  }
  .track-switch-pill,
  .track-switch-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 7px 9px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    border-radius: 10px;
  }
  .track-pill-header {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  .track-pill-icon {
    font-size: 13.5px;
  }
  .track-pill-label {
    font-size: 11.5px;
  }
  .track-pill-group,
  .track-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 5px;
    padding: 2px;
    box-sizing: border-box;
  }
  .track-pill-btn,
  .track-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 4px;
    font-size: 11.5px;
    gap: 1px;
    box-sizing: border-box;
    border-radius: 7px;
  }
  .track-pill-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11.5px;
    text-align: center;
    line-height: 1.25;
  }
  .track-pill-count,
  .track-btn .track-count {
    font-size: 11.5px;
    padding: 2px 7px;
    flex-shrink: 0;
  }
  .katex-display {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================
   题目笔记与草稿 (Notes & Drafts) 模块
   ============================================================ */
.question-notes-details {
  margin-top: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface-bg, #f8fafc);
  overflow: hidden;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.question-notes-details[open],
.question-notes-details.has-content {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.question-notes-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  background: transparent;
  font-size: 13.5px;
  list-style: none;
  position: relative;
}
.question-notes-summary::-webkit-details-marker {
  display: none;
}
.notes-summary-title {
  font-weight: 600;
  color: var(--text, #1e293b);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.notes-summary-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.note-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9999px;
  font-weight: 500;
  line-height: 1.4;
}
.note-pill-text {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.note-pill-img {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.note-pill-empty {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
  font-size: 11px;
}
.note-status {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 500;
}
.note-status.saving {
  color: #d97706;
}
.note-status.saved {
  color: #059669;
}
.note-status.error {
  color: #dc2626;
}
.notes-summary-arrow {
  margin-left: 6px;
  font-size: 12px;
  color: #94a3b8;
  transition: transform 0.2s ease;
}
.question-notes-details[open] .notes-summary-arrow {
  transform: rotate(180deg);
}

.notes-content-body {
  padding: 6px 12px 12px 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-textarea {
  width: 100%;
  min-height: 72px;
  max-height: 260px;
  padding: 8px 10px;
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text, #0f172a);
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.note-textarea:focus {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.note-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.note-thumb-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  flex-shrink: 0;
}
.note-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.15s ease;
}
.note-thumb:hover {
  transform: scale(1.05);
}
.note-thumb-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  border: none;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.note-thumb-del:hover {
  background: #ef4444;
}

.note-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}
.note-upload-btn {
  cursor: pointer;
  font-size: 12px !important;
  padding: 4px 10px !important;
}
.note-paste-hint {
  font-size: 11.5px;
  color: #64748b;
}

.badge.note-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-weight: 600;
}

/* 答题卡小格上的笔记指示器 (题号右上角紫色圆标 ✎ + 底部高亮指示条) */
.sheet-cell {
  position: relative;
}
.sheet-cell.has-note {
  border-bottom: 2.5px solid #6366f1 !important;
}
.sheet-cell.has-note::after {
  content: "✎";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: #6366f1;
  color: #ffffff !important;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  z-index: 5;
  pointer-events: none;
}
.sheet-cell.has-note::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 10px solid rgba(99, 102, 241, 0.35);
  border-left: 10px solid transparent;
  border-top-right-radius: 7px;
  pointer-events: none;
  z-index: 1;
}

/* 搜索页笔记过滤与预览 */
.search-filter-bar {
  margin: 6px 0 12px 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-filter-btn {
  font-size: 12.5px;
  border-radius: 9999px;
  padding: 4px 12px;
  transition: all 0.2s;
}
.search-filter-btn.active {
  background: var(--primary, #2563eb) !important;
  color: #ffffff !important;
  border-color: var(--primary, #2563eb) !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}
.result-note-snippet {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  padding: 4px 8px;
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  border-radius: 0 4px 4px 0;
  color: #334155;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.result-note-snippet .rnote-text {
  font-weight: 500;
  color: #1e293b;
}
.result-note-snippet .rnote-img {
  color: #2563eb;
  font-weight: 500;
}

/* ============================================================
   题目笔记悬浮窗 (Floating Notes Modal)
   ============================================================ */
.note-floating-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}
.note-floating-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.note-floating-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.note-floating-dialog {
  position: relative;
  z-index: 1;
  width: 92%;
  max-width: 580px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.note-floating-modal.open .note-floating-dialog {
  transform: scale(1) translateY(0);
}
.note-floating-head {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.note-floating-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: #0f172a;
}
.note-modal-icon {
  font-size: 16px;
  line-height: 1;
}
.note-modal-close {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.note-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.note-floating-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.note-floating-body .note-textarea {
  min-height: 100px;
  max-height: 380px;
  font-size: 14.5px;
  line-height: 1.6;
  resize: none;
  box-sizing: border-box;
}
.note-floating-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.note-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.note-done-btn {
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 5px 12px !important;
  border-radius: 8px !important;
}
.note-next-btn {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 5px 14px !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, #059669 0%, #0d9488 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.note-next-btn:hover {
  filter: brightness(1.05);
}

@media (max-width: 640px) {
  .note-floating-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1050 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: max(48px, calc(env(safe-area-inset-top, 0px) + 8px)) 12px 12px !important;
    box-sizing: border-box !important;
  }
  .note-floating-dialog {
    width: 100% !important;
    max-width: 480px !important;
    max-height: min(54vh, 360px) !important;
    min-height: 150px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.95) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    transform: scale(0.96) translateY(-10px) !important;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .note-floating-modal.open .note-floating-dialog {
    transform: scale(1) translateY(0) !important;
  }
  .note-floating-head {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }
  .note-floating-body {
    padding: 10px 14px 12px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  .note-floating-body .note-textarea {
    font-size: 16px !important;
    line-height: 1.45 !important;
    min-height: 70px !important;
    max-height: 220px !important;
    flex: 0 0 auto !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
    resize: none !important;
  }
  .note-floating-footer {
    flex-shrink: 0 !important;
    padding-top: 4px !important;
    gap: 6px !important;
  }
  .note-upload-btn {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }
  .note-paste-hint {
    display: none !important;
  }
  .note-footer-right {
    display: inline-flex !important;
    gap: 6px !important;
    margin-left: auto !important;
  }
  .note-done-btn,
  .note-next-btn {
    font-size: 12px !important;
    padding: 4px 10px !important;
  }
}

@media (max-width: 768px) {
  .question-notes-summary {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .notes-content-body {
    padding: 6px 8px 10px 8px;
  }
  .note-textarea {
    font-size: 16px !important;
    min-height: 64px;
    line-height: 1.45 !important;
  }
  .note-thumb-wrap {
    width: 72px;
    height: 72px;
  }
  .note-paste-hint {
    display: none;
  }
}

/* ============ 移动端输入框防软键盘顶起与防 Safari 自动放大规范 ============ */
@media (max-width: 768px) {
  input[type="text"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input:not([type]),
  textarea,
  select:not(.mat-depth-sel),
  .search-box input,
  .note-textarea,
  .draft-input,
  .form-row input,
  .form-row textarea,
  .chat-input-row textarea,
  .float-chat-input textarea,
  .tag-filter-row input,
  .tag-filter-row select,
  .mm-search-box input,
  .inline-input input {
    font-size: 16px !important;
    line-height: 1.45 !important;
  }
}

/* 刷题模式软键盘展开时给滚动容器底部垫高，保证输入框可见且不压缩页面 */
.practice-scroll.keyboard-open {
  padding-bottom: calc(var(--keyboard-height, 320px) + 80px) !important;
  scroll-behavior: smooth;
}

/* ============================================================
   全新功能增强样式 (v34): 模考断点恢复 / 错题消灭 / 首页倒计时 / 纠错弹窗
   ============================================================ */

/* 1. 模拟考试断点续练横幅 */
.exam-resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.exam-resume-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exam-resume-text b {
  font-size: 15px;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.exam-resume-text span {
  font-size: 13px;
  color: #3b82f6;
}
.exam-resume-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 2. 模拟考试历史记录卡片与复盘 */
.exam-history-card {
  margin-top: 20px;
}
.exam-history-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.exam-history-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.exam-history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.exam-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}
.exam-history-table th {
  background: var(--bg-soft, #f8fafc);
  padding: 10px 14px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.exam-history-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}
.exam-history-table tr:last-child td {
  border-bottom: none;
}
.exam-history-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}
.exam-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
}
.exam-score-badge.high { color: var(--ok, #10b981); }
.exam-score-badge.mid { color: var(--primary, #2563eb); }
.exam-score-badge.low { color: var(--bad, #ef4444); }

/* 3. 错题消灭战正向激励样式 */
.wrong-kill-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.wrong-kill-pill.celebrate {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.wrong-eliminated-tag {
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 700;
  font-size: 12px;
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
}
@keyframes bounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.wrong-cleared-celebration {
  text-align: center;
  padding: 36px 20px;
  border: 2px dashed #34d399;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
  border-radius: 16px;
  margin-top: 16px;
}
.wrong-cleared-celebration .celebrate-icon {
  font-size: 48px;
  margin-bottom: 8px;
  animation: rotateTada 1s ease infinite alternate;
}
@keyframes rotateTada {
  from { transform: scale(1) rotate(-4deg); }
  to { transform: scale(1.08) rotate(4deg); }
}
.wrong-cleared-celebration h3 {
  font-size: 20px;
  color: #065f46;
  margin: 0 0 8px 0;
}
.wrong-cleared-celebration p {
  font-size: 14px;
  color: #047857;
  margin: 0 0 20px 0;
}
.wrong-cleared-celebration .celebrate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* 4. 首页备考目标倒计时挂件 */
.countdown-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  position: relative;
  overflow: hidden;
}
.countdown-hero-card::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.countdown-hero-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.countdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #67e8f9;
  width: fit-content;
}
.countdown-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.countdown-sub {
  font-size: 12.5px;
  color: #94a3b8;
}
.countdown-hero-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.countdown-digits {
  display: flex;
  align-items: center;
  gap: 8px;
}
.countdown-num-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px 12px;
  min-width: 52px;
  box-sizing: border-box;
}
.countdown-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
}
.countdown-unit {
  font-size: 11px;
  color: #cbd5e1;
  font-weight: 500;
}
.countdown-edit-btn {
  color: #cbd5e1 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  font-size: 12px !important;
}
.countdown-edit-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* 全局弹窗背景滚动穿透锁：保持页面停在原位置，完全不影响弹窗内部正常滑动 */
body.modal-scroll-locked {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}

/* 5. 题目纠错弹窗与目标设置弹窗通用样式 */
.error-report-modal-overlay,
.exam-target-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}
.error-report-modal,
.exam-target-modal {
  background: var(--card, #fff);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 36px);
  max-height: min(88vh, 640px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: modalPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
@keyframes modalPopIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.error-report-head,
.exam-target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft, #f8fafc);
  flex-shrink: 0;
  box-sizing: border-box;
}
.error-report-head b,
.exam-target-head b {
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.error-report-foot,
.exam-target-foot {
  flex-shrink: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-soft, #f8fafc);
  box-sizing: border-box;
}
.error-report-body,
.exam-target-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.error-q-preview {
  background: var(--bg-soft, #f8fafc);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  max-height: 140px;
  overflow-y: auto;
}
.error-q-preview-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.error-q-preview-text {
  color: var(--text);
  line-height: 1.6;
}
.error-q-preview .katex-display,
.help-q-body-preview .katex-display {
  margin: 0.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.help-q-body-preview {
  line-height: 1.6;
  color: var(--text);
}
.error-report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.error-chip-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.error-chip-btn:hover {
  border-color: #f87171;
  color: #ef4444;
}
.error-chip-btn.active {
  background: #fef2f2;
  border-color: #ef4444;
  color: #dc2626;
  font-weight: 700;
}
.error-report-desc,
.exam-target-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-soft, #f8fafc);
  color: var(--text);
}
.error-report-desc:focus,
.exam-target-input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}


/* 响应式调整 (Mobile) */
@media (max-width: 768px) {
  .exam-resume-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .exam-resume-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .countdown-hero-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 14px;
  }
  .countdown-hero-right {
    width: 100%;
    justify-content: space-between;
  }
  .countdown-title {
    font-size: 16px;
  }
  .countdown-num {
    font-size: 20px;
  }
  .countdown-num-box {
    padding: 4px 8px;
    min-width: 44px;
  }
}

/* ============================================================
   融合题库检索中心与独立题目笔记专页样式 (v35)
   ============================================================ */

/* 题库与搜索融合中心 */
.search-hub-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.search-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.search-filter-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card, #fff);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.search-filter-select:focus {
  border-color: var(--primary, #2563eb);
}
.search-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.search-tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-tab-btn:hover {
  background: var(--bg-soft, #f8fafc);
  color: var(--text);
}
.search-tab-btn.active {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.search-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

/* 独立题目笔记专页 */
.notes-page-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.notes-header-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #64748b);
}
.notes-filter-card {
  margin-bottom: 14px;
  padding: 14px 16px;
}
.notes-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}
.notes-filter-search {
  flex: 1;
  min-width: 0;
  position: relative;
}
.notes-filter-options {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-box-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 34px;
  font-size: 14px;
  height: 38px;
  line-height: normal;
  color: var(--text, #0f172a);
  background: var(--card, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 10px center;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.search-box-input::-webkit-search-decoration,
.search-box-input::-webkit-search-cancel-button,
.search-box-input::-webkit-search-results-button,
.search-box-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  display: none;
}
.search-box-input:focus {
  border-color: var(--primary, #0284c7);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
  background-color: #fff;
}
.search-box-input::placeholder {
  color: var(--muted, #94a3b8);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.notes-item-card {
  background: var(--card, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notes-item-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}
.notes-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}
.notes-item-head-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.notes-item-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
}
.notes-item-time {
  font-size: 12px;
  color: var(--muted);
}
.notes-item-q-box {
  background: var(--bg-soft, #f8fafc);
  border-left: 3px solid var(--primary, #2563eb);
  padding: 8px 12px;
  border-radius: 4px 8px 8px 4px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
}
.notes-item-text-box {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  padding: 10px 14px;
  color: #78350f;
}
.notes-item-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.notes-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.notes-thumb:hover {
  transform: scale(1.05);
  border-color: #2563eb;
}
.notes-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.notes-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.notes-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--card, #fff);
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.notes-empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.notes-empty-state h3 {
  font-size: 18px;
  color: var(--text);
  margin: 0 0 8px;
}
.notes-empty-state p {
  font-size: 13.5px;
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .notes-filter-card {
    padding: 10px 12px !important;
  }
  .notes-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .notes-filter-search {
    width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .notes-filter-options {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .notes-filter-options .search-filter-select {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
  .notes-img-toggle-btn,
  .notes-reset-btn {
    flex-shrink: 0 !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
  }
  .notes-item-card {
    padding: 12px 14px;
  }
  .notes-item-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .notes-item-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr auto !important;
    gap: 6px !important;
    width: 100% !important;
    margin-left: 0;
  }
  .notes-item-actions .btn {
    justify-content: center !important;
    text-align: center !important;
    font-size: 12px !important;
    padding: 6px 4px !important;
    white-space: nowrap !important;
  }
}

/* ---------------- 考题互助社区（论坛模式） ---------------- */
.help-plaza-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4px 60px;
}
.help-plaza-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.help-plaza-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--bg-soft, #f1f5f9);
  padding: 3px;
  border-radius: 999px;
}
.help-tab-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.help-tab-btn.active {
  background: #fff;
  color: var(--accent, #0284c7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.help-plaza-topbar .btn {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 640px) {
  .help-tab-btn {
    font-size: 12px;
    padding: 4px 10px;
  }
  .help-plaza-topbar .btn {
    font-size: 12px;
    padding: 4px 10px;
  }
}
.help-filter-card {
  margin-bottom: 10px;
  padding: 10px 14px;
}
.help-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.help-filter-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.help-ftab {
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text, #334155);
  cursor: pointer;
}
.help-ftab.active {
  background: var(--accent, #0284c7);
  border-color: var(--accent, #0284c7);
  color: #fff;
}
.help-search-input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
}
.help-subj-select {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  background: #fff;
  color: var(--text, #334155);
}

/* 知乎风格考题互助帖子卡片 (紧凑精致) */
.help-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.help-thread-card {
  background: #fff;
  border: 1px solid #eef2f6;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.help-thread-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  background: #fafbfc;
}
.help-thread-card:hover .help-thread-title {
  color: var(--accent, #0284c7);
}
.help-thread-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.help-thread-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #8590a6;
}
.help-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
}
.help-author-text {
  font-weight: 600;
  color: #334155;
}
.help-time-text {
  color: #94a3b8;
}
.help-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.help-status-badge.solved {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.help-status-badge.unsolved {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.help-thread-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.4;
  word-break: break-word;
  transition: color 0.15s ease;
}
.help-thread-snippet {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}
.help-snippet-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  background: #e2e8f0;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}
.help-snippet-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.help-thread-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
  font-size: 11.5px;
  color: #8590a6;
}
.help-thread-action-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
/* 知乎式蓝色解答气泡 */
.help-zhihu-reply-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(2, 132, 199, 0.08);
  color: var(--accent, #0284c7);
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.help-thread-card:hover .help-zhihu-reply-pill {
  background: rgba(2, 132, 199, 0.16);
}
.help-zhihu-last-reply {
  color: #64748b;
  font-size: 11.5px;
}
.help-zhihu-last-reply b {
  color: #334155;
  font-weight: 600;
}
.help-zhihu-view-btn {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
  transition: color 0.15s ease;
  flex-shrink: 0;
}
.help-thread-card:hover .help-zhihu-view-btn {
  color: var(--accent, #0284c7);
}

@media (max-width: 640px) {
  .help-thread-card {
    padding: 10px 12px;
    gap: 5px;
  }
  .help-thread-title {
    font-size: 13.5px;
  }
  .help-thread-meta-left {
    gap: 6px;
    font-size: 11px;
  }
  .help-topic-pill {
    font-size: 11px;
    padding: 1px 5px;
  }
  .help-zhihu-last-reply {
    display: none;
  }
}

/* 详情独立页面 */
.help-detail-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 4px 100px;
}
.help-main-card {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.help-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 8px;
}
.help-main-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.help-main-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.help-main-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text, #1e293b);
  line-height: 1.55;
  margin-bottom: 16px;
  white-space: pre-wrap;
}
.help-q-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.help-q-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.help-q-box-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text, #1e293b);
  margin-bottom: 12px;
}
.help-q-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
.help-q-opt {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13.5px;
}
.help-q-opt.is-ans {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 600;
}
.help-q-explain-toggle {
  cursor: pointer;
  padding: 8px 12px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: var(--accent, #0284c7);
  font-weight: 600;
  margin-top: 8px;
  display: inline-block;
}
.help-q-explain-content {
  margin-top: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
}

/* 最佳解答卡片 */
.help-best-answer-card {
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border: 2px solid #fbbf24;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.15);
}
.help-best-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.help-best-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #92400e;
  font-size: 14px;
}
.help-best-text {
  font-size: 15px;
  line-height: 1.65;
  color: #1e293b;
  white-space: pre-wrap;
}

/* 楼层回复区 */
.help-floors-sec {
  margin-top: 20px;
}
.help-floors-head {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text, #1e293b);
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-floor-card {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color 0.15s;
}
.help-floor-card.is-best {
  border-color: #fbbf24;
}
.help-floor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.help-floor-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #334155);
}
.help-floor-index {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}
.help-floor-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text, #1e293b);
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.help-floor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}

/* 底部回复固定区 */
.help-bottom-reply-dock {
  position: sticky;
  bottom: 12px;
  z-index: 90;
  margin-top: 20px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.help-reply-textarea {
  width: 100%;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.help-reply-textarea:focus {
  border-color: var(--accent, #0284c7);
}
.help-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

/* 发起求助弹窗 */
.create-help-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.create-help-modal {
  background: #fff;
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}
.create-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  font-size: 16px;
  font-weight: 700;
}
.create-help-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.create-help-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}

/* ============ 版本检查更新弹窗 ============ */
.update-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.update-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
  border: 1px solid var(--line, #e2e8f0);
}

.update-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.update-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0f172a);
}

.update-title-icon {
  font-size: 18px;
}

.update-modal-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--muted, #94a3b8);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.update-modal-close:hover {
  background: #f1f5f9;
  color: var(--ink, #0f172a);
}

.update-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-version-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 12px 14px;
}

.version-banner-left .app-name {
  font-size: 14px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
}

.version-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ver-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.ver-pill.current {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.ver-pill.latest {
  background: #ffffff;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.ver-pill.warn {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.ver-pill.danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.update-version-banner.has-update {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.version-banner-icon {
  font-size: 28px;
}

.update-upcoming-box {
  background: #fdf4ff;
  border: 1px solid #f0abfc;
  border-radius: 12px;
  padding: 12px 14px;
}

.upcoming-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #86198f;
  margin-bottom: 8px;
}

.upcoming-badge {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fae8ff;
  color: #a21caf;
  border: 1px solid #e879f9;
  margin-left: auto;
}

.upcoming-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.upcoming-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.upcoming-text b {
  display: block;
  font-size: 13px;
  color: #701a75;
  margin-bottom: 2px;
}

.upcoming-text small {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  color: #86198f;
}

.update-log-box {
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
}

.update-log-box b {
  display: block;
  color: var(--ink, #0f172a);
  margin-bottom: 6px;
}

.update-log-box ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted, #475569);
  line-height: 1.6;
}

.update-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}

.update-modal-footer .btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .update-modal-card {
    width: calc(100% - 24px);
    max-width: 420px;
    margin: auto;
    border-radius: 14px;
  }
  .update-modal-head {
    padding: 12px 14px;
  }
  .update-modal-body {
    padding: 12px 14px;
    gap: 10px;
    max-height: calc(75vh - 120px);
  }
  .update-modal-footer {
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: #f8fafc;
  }
  .update-modal-footer .update-btn-download {
    grid-column: 1 / -1;
    width: 100%;
    height: 40px;
    font-size: 13.5px !important;
    font-weight: 600 !important;
  }
  .update-modal-footer .update-btn-reload,
  .update-modal-footer .update-btn-close {
    width: 100%;
    height: 36px;
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
}

/* 安卓 App 壳工程环境特定样式 */
body.is-android-app .footer-app-download-row,
body.is-android-app #footer-app-download {
  display: none !important;
}

/* ============================================================
   每日刷题计划与打卡系统 (v52)
   ============================================================ */

.plan-hero-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(0, 119, 73, 0.07);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

.plan-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-hero-top-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.plan-hero-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.strat-short {
  display: none;
}
.strat-long {
  display: inline;
}

.plan-streak-badge.active {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.plan-hero-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
}

.plan-strategy-tag {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 119, 73, 0.08);
  color: #007749;
  font-weight: 600;
}

.plan-cfg-btn {
  font-size: 12px !important;
  padding: 4px 10px !important;
  border-color: #cbd5e1 !important;
}

.plan-hero-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #334155;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-prog-status b {
  color: #0f172a;
  font-weight: 700;
}

.plan-done-tag {
  color: #059669 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.plan-prog-meta {
  color: #64748b;
  font-size: 12px;
}

.plan-prog-meta b {
  color: #007749;
}

.plan-progress-track {
  height: 9px !important;
  border-radius: 999px !important;
  background: #e2e8f0 !important;
  overflow: hidden;
}

.plan-progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #007749 100%) !important;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.plan-progress-fill.completed {
  background: linear-gradient(90deg, #059669 0%, #047857 100%) !important;
}

.plan-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.plan-hero-advice {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  background: rgba(2, 132, 199, 0.05);
  border: 1px solid rgba(2, 132, 199, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  box-sizing: border-box;
}

.plan-hero-advice b {
  color: #0284c7;
}

.plan-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-act-btn {
  font-weight: 600 !important;
}

.pulse-glow {
  box-shadow: 0 0 0 0 rgba(0, 119, 73, 0.4);
  animation: planPulse 2s infinite;
}

@keyframes planPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 119, 73, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(0, 119, 73, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 119, 73, 0); }
}

/* 科目页内专属计划横幅 */
.subj-plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 119, 73, 0.05);
  border: 1px dashed #86efac;
  border-radius: 10px;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.spb-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spb-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #007749;
  background: #dcfce7;
  padding: 2px 8px;
  border-radius: 6px;
}

.spb-text {
  font-size: 13px;
  color: #334155;
}

.spb-text b {
  color: #0f172a;
}

.spb-actions {
  display: flex;
  align-items: center;
}

.spb-btn {
  white-space: nowrap;
}

/* 顶部练习指示器 */
.plan-top-badge {
  background: #007749 !important;
  color: #fff !important;
  font-weight: 600;
}
.plan-qhead-badge {
  background: #007749 !important;
  color: #fff !important;
  font-size: 11px !important;
  padding: 1px 7px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  letter-spacing: 0.2px;
}

/* 计划完成结算弹窗与结算卡片 */
.plan-finish-card {
  text-align: center;
  padding: 18px 14px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  border-radius: 12px;
}

.plan-complete-overlay {
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.plan-complete-modal {
  max-width: 460px;
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
  animation: modalPop 0.25s ease-out;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.plan-complete-icon {
  font-size: 46px;
  margin-bottom: 6px;
}

.plan-complete-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #0f172a;
}

.plan-complete-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 18px;
}

.plan-complete-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.plan-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.pm-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.pm-val.good {
  color: #059669;
}

.pm-val.hot {
  color: #d97706;
}

.pm-lbl {
  font-size: 12px;
  color: #64748b;
}

.plan-complete-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.plan-complete-actions .btn {
  flex: 1;
}

/* 计划设置弹窗 */
.plan-target-modal {
  max-width: 520px;
}

.plan-setting-row {
  margin-bottom: 16px;
}

.plan-field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.plan-preset-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.plan-chip-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  transition: all 0.15s ease;
}

.plan-chip-btn small {
  font-size: 11px;
  font-weight: normal;
  color: #64748b;
  margin-top: 2px;
}

.plan-chip-btn:hover {
  border-color: #007749;
  background: #f0fdf4;
}

.plan-chip-btn.active {
  border-color: #007749;
  background: #dcfce7;
  color: #007749;
}

.plan-advice-callout {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
}

.pac-title {
  font-size: 13px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 4px;
}

.pac-desc {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.plan-strat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-strat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.plan-strat-item:hover {
  background: #f8fafc;
}

.plan-strat-item input[type="radio"] {
  margin-top: 3px;
}

.psi-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.psi-text b {
  font-size: 13.5px;
  color: #1e293b;
}

.psi-text small {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* 统计页计划概览与打卡日历矩阵 */
.stat-plan-overview-card {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 14px;
}

.stat-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-plan-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-plan-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-plan-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spc-label {
  font-size: 12px;
  color: #64748b;
}

.spc-val {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.spc-val.good {
  color: #059669;
}

.stat-plan-calendar-strip {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.spc-strip-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.spc-strip-days {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.spc-day-col {
  flex: 1;
  min-width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  gap: 2px;
}

.spc-day-col.done {
  background: #dcfce7;
  border-color: #86efac;
}

.spc-day-col.done .spc-day-num {
  color: #047857;
  font-weight: 700;
}

.spc-day-col.done .spc-day-dot {
  color: #047857;
  font-weight: bold;
}

.spc-day-col.partial {
  background: #fef9c3;
  border-color: #fde047;
}

.spc-day-col.today {
  box-shadow: 0 0 0 2px #007749;
}

.spc-day-num {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.spc-day-dot {
  font-size: 12px;
  color: #94a3b8;
}

.spc-day-date {
  font-size: 11px;
  color: #64748b;
}

/* 计划提醒药丸徽章 */
.plan-reminder-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all .2s ease;
  user-select: none;
}
.plan-reminder-tag:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.plan-reminder-tag.active {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

/* 站内柔性提醒悬浮条 */
.plan-inapp-reminder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #007749;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.plan-inapp-reminder-bar .pir-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.plan-inapp-reminder-bar .pir-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.plan-inapp-reminder-bar .pir-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.plan-inapp-reminder-bar .pir-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}
.plan-inapp-reminder-bar .pir-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  margin-top: 1px;
}
.plan-inapp-reminder-bar .pir-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.plan-inapp-reminder-bar .pir-go-btn {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
  border-radius: 8px;
}
.plan-inapp-reminder-bar .pir-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.plan-inapp-reminder-bar .pir-close-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #475569;
}

/* 提醒设置弹窗内部组件 */
.plan-reminder-setting-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
}
.plan-reminder-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.plan-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  font-weight: 600;
  user-select: none;
}
.plan-switch-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #007749;
  cursor: pointer;
}
.plan-time-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.plan-time-chip {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .15s;
}
.plan-time-chip small {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
}
.plan-time-chip:hover {
  border-color: #007749;
  background: #f0fdf4;
}
.plan-time-chip.active {
  border-color: #007749;
  background: #007749;
  color: #fff;
}
.plan-time-chip.active small {
  color: #dcfce7;
}
.plan-time-input {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 13px;
  color: #1e293b;
  height: 30px;
  box-sizing: border-box;
}

/* 提醒方式订阅卡片 */
.plan-notify-methods-card {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}
.pnm-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}
.pnm-btn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.pnm-cal-btn {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border-color: #86efac !important;
  font-weight: 600 !important;
  text-align: left;
  justify-content: flex-start;
  padding: 7px 10px !important;
}
.pnm-cal-btn:hover {
  background: #dcfce7 !important;
}
.pnm-notif-btn, .pnm-test-btn {
  text-align: left;
  justify-content: flex-start;
  padding: 6px 10px !important;
  font-size: 12px !important;
}
.pnm-tip {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #64748b;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 6px;
}

/* 移动端深度优化 */
@media (max-width: 640px) {
  .plan-hero-card {
    padding: 14px 14px;
    gap: 12px;
    border-radius: 14px;
  }
  .plan-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }
  .plan-hero-top-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
  }
  .plan-hero-badge-row {
    gap: 6px;
  }
  .plan-streak-badge {
    font-size: 11px;
    padding: 2px 8px;
  }
  .plan-strategy-tag {
    font-size: 11px;
    padding: 2px 6px;
  }
  .plan-hero-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 2px;
  }
  .plan-cfg-btn {
    font-size: 11.5px !important;
    padding: 3px 8px !important;
    flex-shrink: 0;
    height: 26px !important;
    line-height: 20px !important;
  }
  .plan-progress-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .plan-prog-status {
    font-size: 13px;
  }
  .plan-prog-meta {
    font-size: 11.5px;
    color: #64748b;
  }
  .plan-hero-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .plan-hero-advice {
    background: rgba(2, 132, 199, 0.07);
    border: 1px solid rgba(2, 132, 199, 0.18);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11.5px;
    line-height: 1.4;
    color: #334155;
    box-sizing: border-box;
  }
  .plan-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 100%;
  }
  .plan-hero-actions .plan-act-primary {
    width: 100%;
    height: 42px;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 119, 73, 0.22);
  }
  .plan-hero-actions .plan-act-secondary {
    width: 100%;
    height: 34px;
    font-size: 12.5px !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
  }
  .subj-plan-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 9px;
    margin-bottom: 10px;
  }
  .subj-plan-banner .spb-left {
    font-size: 12.5px;
    line-height: 1.4;
  }
  .subj-plan-banner .spb-btn {
    width: 100%;
    height: 36px;
    font-size: 13px !important;
    border-radius: 8px;
    justify-content: center;
  }
  .plan-target-modal {
    max-width: 94vw;
    margin: auto;
    border-radius: 14px;
  }
  .plan-target-modal .exam-target-head {
    padding: 11px 14px;
  }
  .plan-target-modal .exam-target-body {
    padding: 12px 14px;
    max-height: calc(82vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
  }
  .plan-target-modal .exam-target-foot {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
  }
  .plan-target-modal .exam-target-foot .btn {
    flex: 1;
    height: 38px;
    font-size: 13px;
  }
  .plan-preset-chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }
  .plan-chip-btn {
    padding: 7px 4px;
    font-size: 13px;
  }
  .plan-advice-callout {
    padding: 9px 11px;
    font-size: 11.5px;
    margin-top: 8px;
  }
  .plan-strat-item {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 8px;
  }
  .psi-text b {
    font-size: 12.5px;
  }
  .psi-text small {
    font-size: 11px;
  }
  .plan-complete-modal {
    width: calc(100% - 24px);
    max-width: 360px;
    padding: 20px 15px;
    border-radius: 16px;
  }
  .plan-complete-icon {
    font-size: 40px;
    margin-bottom: 4px;
  }
  .plan-complete-head h3 {
    font-size: 16.5px;
  }
  .plan-complete-sub {
    font-size: 12px;
    margin-bottom: 14px;
  }
  .plan-complete-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 15px;
  }
  .plan-metric-box {
    padding: 8px 6px;
  }
  .pm-val {
    font-size: 18px;
  }
  .pm-lbl {
    font-size: 11px;
  }
  .plan-complete-actions {
    flex-direction: column;
    gap: 8px;
  }
  .plan-complete-actions .btn {
    width: 100%;
    height: 40px;
    font-size: 13.5px;
    border-radius: 10px;
  }
  .stat-plan-overview-card {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 12px;
  }
  .stat-plan-kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
    margin-bottom: 12px;
  }
  .stat-plan-chip {
    padding: 8px 10px;
    border-radius: 8px;
  }
  .spc-val {
    font-size: 15px;
  }
  .spc-day-col {
    min-width: 40px;
    padding: 5px 3px;
    border-radius: 7px;
  }
  .spc-day-num {
    font-size: 12px;
  }
  .spc-day-dot {
    font-size: 11px;
  }
  .spc-day-date {
    font-size: 10px;
  }
  .plan-reminder-tag {
    font-size: 11px;
    padding: 2px 6px;
  }
  .plan-inapp-reminder-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 10px;
    margin-bottom: 10px;
  }
  .plan-inapp-reminder-bar .pir-left {
    gap: 8px;
  }
  .plan-inapp-reminder-bar .pir-icon {
    font-size: 18px;
  }
  .plan-inapp-reminder-bar .pir-title {
    font-size: 13px;
  }
  .plan-inapp-reminder-bar .pir-desc {
    font-size: 11.5px;
  }
  .plan-inapp-reminder-bar .pir-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
  .plan-inapp-reminder-bar .pir-go-btn {
    flex: 1;
    height: 32px;
    font-size: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .plan-reminder-setting-box {
    padding: 10px 11px;
  }
  .plan-time-chip-row {
    gap: 5px;
  }
  .plan-time-chip {
    padding: 4px 7px;
    font-size: 12px;
  }
  .plan-time-chip small {
    font-size: 10px;
  }
  .plan-time-input {
    width: 95px;
    font-size: 12px;
    height: 28px;
  }
  .pnm-btn-grid button {
    height: 36px;
    font-size: 12px !important;
    display: flex;
    align-items: center;
  }
}

.plan-app-exclusive-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
}
.plan-web-app-notice-card {
  padding: 13px 14px;
  background: var(--bg-soft, #f8fafc);
  border-radius: 10px;
  border: 1px dashed var(--line, #cbd5e1);
}
.pwan-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pwan-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted, #64748b);
  margin-bottom: 10px;
}
.pwan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pwan-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  font-size: 12.5px !important;
  padding: 6px 14px !important;
}

/* ---------------- 首页紧凑型科目网格（解决主页过长） ---------------- */
.home-subj-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  margin-bottom: 12px;
}
.home-subj-header-row h2 {
  margin: 0 0 2px;
  font-size: 18px;
}
.home-subj-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.home-subj-compact-card {
  padding: 13px 15px !important;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--card, #fff);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.home-subj-compact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-color: #007749;
}
.hscc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hscc-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.hscc-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.hscc-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hscc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
}
.hscc-badge.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.hscc-badge.warn {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.hscc-badge.empty {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}
.hscc-progress {
  height: 5px !important;
  margin: 1px 0 0 !important;
  background: #e2e8f0;
  border-radius: 999px;
}
.hscc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--muted, #64748b);
  margin-top: 1px;
}
.hscc-foot {
  display: flex;
  justify-content: flex-end;
  border-top: 1px dashed var(--line, #f1f5f9);
  padding-top: 6px;
  margin-top: 1px;
}
.hscc-enter-hint {
  font-size: 11.5px;
  color: #007749;
  font-weight: 600;
}

/* ---------------- 每日刷题计划中心（七科分开独立专区） ---------------- */
.plan-page-hero {
  padding: 18px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  box-shadow: 0 4px 16px rgba(0, 119, 73, 0.05);
  margin-bottom: 18px;
}
.pph-head .pph-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pph-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pph-title-wrap h2 {
  margin: 0;
  font-size: 19px;
}
.pph-sub {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #475569;
}
.pph-progress-box {
  margin: 14px 0;
  padding: 11px 13px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.pph-prog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 6px;
}
.pph-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.plan-subj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}
.plan-subj-card {
  padding: 15px 17px !important;
  border-radius: 13px;
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.plan-subj-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-color: #cbd5e1;
}
.plan-subj-card.subj-has-progress {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}
.psc-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.psc-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}
.psc-title-wrap h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}
.psc-icon {
  font-size: 20px;
}
.psc-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}
.psc-today-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  border: 1px solid #a7f3d0;
}
.psc-today-badge.empty {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
}
.psc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 10px;
  background: #f8fafc;
  padding: 7px 8px;
  border-radius: 9px;
}
.psc-kpi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pki-lbl {
  font-size: 10px;
  color: #64748b;
}
.pki-val {
  font-size: 12.5px;
  color: #1e293b;
  margin-top: 2px;
}
.pki-val.bad {
  color: #dc2626;
}
.psc-sub-meta {
  font-size: 11.5px;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.psc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}
.psc-btn {
  font-size: 11.5px !important;
  padding: 5px 10px !important;
  border-radius: 7px;
}

@media (max-width: 640px) {
  .home-subj-compact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .plan-subj-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .psc-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
  }
}

/* ==========================================================================
   每日备考计划设置弹窗与移动端打卡闹钟卡片优化
   ========================================================================== */
.plan-target-modal {
  max-width: 520px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: min(88vh, 680px);
  border-radius: 18px;
  background: var(--card, #ffffff);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.plan-target-modal .exam-target-body {
  padding: 16px 20px;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.plan-setting-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-field-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1e293b);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 题量预设标签 */
.plan-preset-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.plan-chip-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  background: var(--bg-soft, #f8fafc);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #334155);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 48px;
}

.plan-chip-btn small {
  font-size: 10.5px;
  font-weight: normal;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

.plan-chip-btn:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.plan-chip-btn.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.plan-chip-btn.active small {
  color: #2563eb;
}

/* 策略选择 */
.plan-strat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-strat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line, #e2e8f0);
  background: var(--bg-soft, #f8fafc);
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-strat-item:hover {
  border-color: #94a3b8;
}

.plan-strat-item input[type="radio"] {
  margin-top: 3px;
  accent-color: #2563eb;
}

.plan-strat-item input[type="radio"]:checked ~ .psi-text b {
  color: #1d4ed8;
}

.psi-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.psi-text b {
  font-size: 13.5px;
  color: var(--text, #1e293b);
}

.psi-text small {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  line-height: 1.4;
}

/* 智能推荐 callout */
.plan-advice-callout {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 11px 14px;
}

.pac-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 4px;
}

.pac-desc {
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
}

/* 每日备考提醒与打卡闹钟卡片 (APP & Web) */
.plan-reminder-setting-box {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.plan-reminder-setting-box.is-enabled {
  border-color: #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.plan-reminder-setting-box.web-mode {
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* 旧版 APK 警告横幅 */
.plan-old-apk-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 12px;
  margin-bottom: 12px;
}

.poab-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.poab-content {
  flex: 1;
}

.poab-title {
  font-size: 13px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 3px;
}

.poab-desc {
  font-size: 12px;
  color: #78350f;
  line-height: 1.45;
  margin-bottom: 8px;
}

.poab-btn {
  background: #d97706 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700;
}

/* 提醒卡片头部 */
.plan-reminder-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prhr-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.prhr-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.prhr-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prhr-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #1e293b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prhr-sub {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* 现代滑动开关 (iOS / Android Material Toggle) */
.plan-switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.plan-switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.plan-switch-slider {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.25s ease;
}

.plan-switch-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plan-switch-toggle input:checked + .plan-switch-slider {
  background-color: #10b981;
}

.plan-switch-toggle input:checked + .plan-switch-slider::after {
  transform: translateX(20px);
}

.plan-switch-text {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  min-width: 28px;
}

.plan-switch-toggle input:checked ~ .plan-switch-text {
  color: #059669;
}

/* 时间选择区块 */
.plan-time-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}

.pts-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.plan-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.plan-time-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.plan-time-chip:hover {
  border-color: #10b981;
  background: #f0fdf4;
}

.plan-time-chip.active {
  border-color: #059669;
  background: #ecfdf5;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.15);
}

.ptc-icon {
  font-size: 14px;
  line-height: 1;
}

.ptc-time {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 2px;
}

.plan-time-chip.active .ptc-time {
  color: #047857;
}

.ptc-desc {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

.plan-time-chip.active .ptc-desc {
  color: #059669;
  font-weight: 600;
}

.plan-custom-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.pctr-label {
  font-size: 12px;
  color: #475569;
}

.plan-time-input {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  outline: none;
}

.plan-time-input:focus {
  border-color: #10b981;
}

/* 原生通道状态卡片与操作区 */
.plan-native-status-card {
  margin-top: 11px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
}

.pnsc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.pnsc-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
}

.pnsc-info {
  font-size: 11px;
  color: #64748b;
}

.pnsc-desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 10px;
}

.pnsc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pnsc-test-btn {
  width: 100%;
  padding: 9px 14px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
}

.pnsc-test-btn:active {
  transform: translateY(1px);
}

.pnsc-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pnsc-sub-actions .btn {
  padding: 7px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  text-align: center;
  white-space: nowrap;
}

/* 网页端提示卡片 */
.plan-app-exclusive-badge {
  font-size: 11px;
  font-weight: 700;
  color: #4338ca;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-web-app-notice-card {
  margin-top: 10px;
  padding: 11px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
}

.pwan-desc {
  font-size: 12px;
  color: #1e3a8a;
  line-height: 1.5;
  margin-bottom: 10px;
}

.pwan-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pwan-dl-btn {
  width: 100%;
  text-align: center;
  font-weight: 700;
  padding: 9px 12px !important;
}

/* 移动端窄屏特别优化 (<= 480px) */
@media (max-width: 480px) {
  .plan-target-modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 16px;
    margin: 0;
  }
  .plan-target-modal .exam-target-body {
    padding: 12px 14px;
    gap: 11px;
  }
  .plan-preset-chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .plan-time-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .plan-time-chip {
    padding: 8px 4px;
  }
  .pnsc-sub-actions {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .prhr-title {
    font-size: 13.5px;
  }
}

/* ==========================================================================
   主页及二级页全套移动端响应式深度优化 (Mobile Optimization)
   ========================================================================== */

/* 1. 二级页：各科目学习中心完整版 (#/subjects) */
.subject-hub-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.subject-hub-card:hover {
  border-color: #007749;
  box-shadow: 0 4px 16px rgba(0, 119, 73, 0.08);
}

.subject-hub-top {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subject-hub-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted, #64748b);
  flex-wrap: wrap;
  gap: 6px;
}

.hub-action-dock {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  border-top: 1px solid var(--line, #f1f5f9);
  padding-top: 12px;
}

.hub-act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  min-height: 38px;
  box-sizing: border-box;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--bg-soft, #f8fafc);
  color: var(--text, #334155);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hub-act-btn:active {
  transform: scale(0.97);
}

.hub-act-btn.primary {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 700;
}

.hub-act-btn.success {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.hub-act-btn.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.hub-act-btn.ghost {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: var(--primary, #007749);
}

/* 2. 二级页：每日刷题计划中心 (#/plan) 移动端优化 */
@media (max-width: 640px) {
  .plan-page-hero {
    padding: 14px 15px !important;
    border-radius: 12px !important;
  }
  .pph-head .pph-title-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .pph-title-row > div:last-child {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
  }
  .pph-title-row > div:last-child .btn {
    flex: 1 !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 8px 6px !important;
    font-size: 12px !important;
    min-height: 38px !important;
  }
  .pph-progress-box {
    margin: 10px 0 !important;
    padding: 10px 12px !important;
  }
  .pph-prog-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
  .pph-actions-row {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .pph-actions-row .btn {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* 七科独立计划卡片优化 */
  .plan-subj-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .plan-subj-card {
    padding: 13px 14px !important;
    border-radius: 12px !important;
  }
  .psc-actions {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .psc-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 38px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 7px 6px !important;
    box-sizing: border-box !important;
    border-radius: 8px !important;
  }

  /* 各科学习中心 (hub) 移动端卡片布局 */
  .hub-action-dock {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 7px !important;
  }
  .hub-act-btn {
    min-height: 38px !important;
    font-size: 12px !important;
  }
  .subject-hub-meta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
}

/* 3. 主页 (#/) 移动端专属深度优化 */
@media (max-width: 640px) {
  /* 备考倒计时挂件 (移动端超紧凑微型化，高度降至 ~48px) */
  .countdown-hero-card {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 7px 11px !important;
    border-radius: 11px !important;
    margin-bottom: 8px !important;
    gap: 8px !important;
  }
  .countdown-hero-card::after {
    display: none !important;
  }
  .countdown-hero-left {
    flex: 1 !important;
    min-width: 0 !important;
    gap: 2px !important;
  }
  .countdown-badge {
    display: inline-flex !important;
    font-size: 9.5px !important;
    padding: 1px 5px !important;
    border-radius: 4px !important;
    margin-bottom: 1px !important;
    line-height: 1.2 !important;
  }
  .countdown-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
  }
  .countdown-sub {
    font-size: 10px !important;
    color: #94a3b8 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .countdown-slogan {
    display: none !important;
  }
  .countdown-hero-right {
    width: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
  }
  .countdown-digits {
    display: flex !important;
    gap: 4px !important;
  }
  .countdown-num-box {
    padding: 2px 5px !important;
    min-width: 32px !important;
    border-radius: 6px !important;
    gap: 0 !important;
  }
  .countdown-num {
    font-size: 14px !important;
    line-height: 1.1 !important;
  }
  .countdown-unit {
    font-size: 8.5px !important;
    line-height: 1 !important;
  }
  .countdown-edit-btn {
    padding: 2px 5px !important;
    font-size: 11px !important;
    min-height: 25px !important;
    height: 25px !important;
    border-radius: 6px !important;
    line-height: 1 !important;
  }
  .c-edit-text {
    display: none !important;
  }

  /* 每日计划卡片 (移动端超紧凑微型纯状态展示 ~58px) */
  .plan-hero-card {
    padding: 6px 10px !important;
    border-radius: 10px !important;
    gap: 4px !important;
    margin-bottom: 8px !important;
  }
  .plan-hero-top {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }
  .plan-hero-top-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    min-width: 0 !important;
    flex: 1 !important;
    gap: 4px !important;
  }
  .plan-hero-title {
    font-size: 11.5px !important;
    margin: 0 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
  }
  .plan-hero-badge-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
  }
  .badge-long,
  .strat-long,
  .rem-text,
  .cfg-text,
  .adv-long {
    display: none !important;
  }
  .strat-short {
    display: inline !important;
  }
  .plan-streak-badge,
  .plan-strategy-tag,
  .plan-reminder-tag {
    font-size: 9px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  .plan-hero-setting-btn {
    width: auto !important;
    display: inline-flex !important;
    gap: 0 !important;
    flex-shrink: 0 !important;
  }
  .plan-hero-setting-btn .plan-cfg-btn {
    flex: none !important;
    padding: 1px 4px !important;
    font-size: 11px !important;
    min-height: 22px !important;
    height: 22px !important;
    border-radius: 5px !important;
    line-height: 1 !important;
  }
  .plan-progress-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }
  .plan-prog-status {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  .plan-prog-meta {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    color: #64748b !important;
  }
  .plan-progress-track {
    height: 3px !important;
    margin: 2px 0 0 !important;
  }
  .plan-hero-advice {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 2px 6px !important;
    font-size: 9.5px !important;
    border-radius: 5px !important;
    line-height: 1.25 !important;
    background: rgba(2, 132, 199, 0.05) !important;
    border: 1px solid rgba(2, 132, 199, 0.12) !important;
    color: #334155 !important;
  }

  /* 主页考纲大纲导引条与科目专属考纲横幅 (移动端深度紧凑适配) */
  .home-exam-scope-bar,
  .hy-scope-banner {
    padding: 10px 12px !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .home-exam-scope-left,
  .hsb-left {
    width: 100% !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .home-exam-scope-icon,
  .hsb-icon {
    font-size: 22px !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
  }
  .home-exam-scope-title,
  .hsb-title {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }
  .home-exam-scope-desc,
  .hsb-desc {
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
  .home-exam-scope-actions,
  .hsb-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
  }
  .home-exam-scope-actions .btn,
  .home-exam-scope-btn,
  .hsb-actions .btn,
  .hsb-btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    height: 35px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
  }
  .doc-downloads-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .doc-download-item {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .doc-download-item .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .doc-download-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .doc-download-card .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 主页 KPI 状态条 (移动端微型紧凑化) */
  .home-kpi-bar {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }
  .kpi-chip {
    padding: 6px 9px !important;
    border-radius: 9px !important;
    gap: 1px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  }
  .kpi-chip-label {
    font-size: 10.5px !important;
    line-height: 1.25 !important;
  }
  .kpi-chip-val {
    font-size: 14.5px !important;
    line-height: 1.25 !important;
  }
  .kpi-chip-val small {
    font-size: 10px !important;
  }

  /* 主页科目入口标题与进入全部按钮 */
  .home-subj-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
  }
  .home-subj-more-btn {
    display: none !important;
  }

  /* 主页紧凑科目卡片 (移动端双列紧凑小卡片) */
  .home-subj-compact-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }
  .home-subj-compact-card {
    padding: 8px 10px !important;
    border-radius: 10px !important;
    gap: 4px !important;
  }
  .hscc-head {
    gap: 4px !important;
  }
  .hscc-title-wrap {
    gap: 5px !important;
    min-width: 0 !important;
  }
  .hscc-icon {
    font-size: 15px !important;
  }
  .hscc-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
  }
  .hscc-badge {
    font-size: 9.5px !important;
    padding: 1px 5px !important;
    border-radius: 6px !important;
  }
  .hscc-progress {
    height: 3.5px !important;
    margin: 2px 0 1px !important;
  }
  .hscc-meta {
    font-size: 10px !important;
    gap: 2px 4px !important;
    flex-wrap: wrap !important;
  }
  .hscc-foot {
    display: none !important;
  }
}

/* 4. 二级页：科目详情页 (#/subject/:sid) 移动端优化 */
@media (max-width: 640px) {
  .subj-compact-hero {
    padding: 11px 12px !important;
  }
  .subj-compact-title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .subj-compact-title-row h2 {
    font-size: 17px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .subj-track-badge {
    font-size: 11px !important;
    padding: 2px 7px !important;
    flex-shrink: 0 !important;
  }
  .subj-compact-kpis {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    font-size: 11.5px !important;
    margin-top: 4px !important;
  }
  .subj-compact-filter {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding-bottom: 2px !important;
  }
  .subj-compact-filter::-webkit-scrollbar {
    display: none !important;
  }
  .subj-filter-group {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  .subj-chip,
  .type-pill {
    padding: 6px 12px !important;
    font-size: 12px !important;
    min-height: 32px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    border-radius: 999px !important;
  }
  .subj-chip.active,
  .type-pill.active {
    background: linear-gradient(135deg, var(--primary, #007749) 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(0, 119, 73, 0.35) !important;
  }
  .subj-chip.active .pill-count,
  .type-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
  }
  .subj-modes-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .subj-modes-title-row b {
    font-size: 13.5px !important;
  }
  .subj-modes-sub-hint {
    display: none !important;
  }
  .subj-style-toggle {
    display: inline-flex !important;
    gap: 4px !important;
    width: auto !important;
  }
  .subj-style-btn {
    padding: 4px 8px !important;
    font-size: 11.5px !important;
    min-height: 28px !important;
    border-radius: 6px !important;
  }
  .subj-plan-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 8px 10px !important;
    margin-bottom: 8px !important;
    border-radius: 8px !important;
  }
  .spb-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
    font-size: 11.5px !important;
  }
  .spb-actions {
    width: 100% !important;
  }
  .spb-actions .btn {
    width: 100% !important;
    min-height: 32px !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
  }

  /* 4模式移动端横向精简卡片布局 (覆盖旧式纵向大卡片) */
  .subj-modes-grid {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }
  .subj-mode-item {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
    min-height: 48px !important;
    border-radius: 9px !important;
    gap: 6px !important;
  }
  .smi-main {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
  }
  .smi-badge {
    width: 26px !important;
    height: 26px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }
  .smi-info {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .smi-info b {
    font-size: 13px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
  }
  .smi-info small {
    font-size: 10.5px !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--muted) !important;
    max-width: 160px !important;
    line-height: 1.3 !important;
  }
  .smi-actions {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    width: auto !important;
  }
  .smi-actions .smi-btn {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }
  .smi-actions .smi-btn.ghost {
    min-width: unset !important;
    padding: 5px 6px !important;
  }

  /* 备考工具 4 列图标停靠坞 Dock 布局 */
  .subj-tools-card {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
  .subj-tools-head {
    margin-bottom: 8px !important;
  }
  .subj-tools-head b {
    font-size: 12.5px !important;
  }
  .subj-tools-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
  }
  .subj-tool-btn {
    padding: 6px 2px !important;
    border-radius: 8px !important;
  }
  .stb-icon {
    font-size: 17px !important;
    margin-bottom: 2px !important;
  }
  .subj-tool-btn b {
    font-size: 11.5px !important;
    white-space: nowrap !important;
    display: block !important;
  }
  .subj-tool-btn small {
    display: none !important;
  }
  .empty-tag {
    display: none !important;
  }
  .subj-exam-hist {
    font-size: 11px !important;
    gap: 4px !important;
  }
  .exam-hist-chip {
    font-size: 10.5px !important;
    padding: 1px 6px !important;
  }

  /* 5. 题库检索页 (#/search) 移动端优化 */
  .search-box-card {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    border-radius: 10px !important;
  }
  .search-box {
    margin-bottom: 8px !important;
  }
  .search-box .search-box-input,
  .search-box input {
    font-size: 13.5px !important;
    padding: 7px 12px 7px 32px !important;
    border-radius: 8px !important;
    height: 36px !important;
  }
  .search-filter-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 6px !important;
  }
  .search-filter-select {
    width: 100% !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    border-radius: 7px !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }
  .search-filter-btn {
    font-size: 11.5px !important;
    padding: 6px 4px !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 7px !important;
    white-space: nowrap !important;
  }
  .tag-banner-card {
    padding: 10px 12px !important;
    gap: 6px !important;
  }
  .tag-banner-actions {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
  }
  .tag-banner-actions .btn {
    flex: 1 !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    text-align: center !important;
    justify-content: center !important;
  }
  .tag-filter-card {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
  .search-section-title {
    font-size: 13px !important;
    margin: 10px 0 8px !important;
    flex-wrap: wrap !important;
  }
  .tag-cloud {
    gap: 5px !important;
  }
  .tag-chip {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 999px !important;
  }
  .result-item {
    padding: 9px 2px !important;
  }
  .result-item .rq {
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
  }
  .result-item .rmeta {
    font-size: 11px !important;
    margin-top: 3px !important;
    line-height: 1.35 !important;
  }
  .result-note-snippet {
    font-size: 11.5px !important;
    margin-top: 3px !important;
  }

  /* 6. 笔记页 (#/notes) 移动端深度优化 */
  .notes-page-title {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-bottom: 10px !important;
  }
  .notes-page-title span:first-child {
    font-size: 18px !important;
  }
  .notes-header-sub {
    font-size: 11.5px !important;
    line-height: 1.35 !important;
  }
  .notes-filter-card {
    padding: 10px 12px !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
  }
  .notes-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .notes-filter-search {
    width: 100% !important;
  }
  .notes-filter-options {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .notes-filter-options .search-filter-select {
    flex: 1 !important;
    min-width: 0 !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
  .notes-img-toggle-btn,
  .notes-reset-btn {
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 6px 7px !important;
    white-space: nowrap !important;
  }
  .notes-list {
    gap: 10px !important;
  }
  .notes-item-card {
    padding: 11px 12px !important;
    border-radius: 10px !important;
    gap: 9px !important;
  }
  .notes-item-head {
    gap: 5px !important;
    padding-bottom: 7px !important;
  }
  .notes-item-head-left {
    gap: 4px !important;
  }
  .notes-item-title {
    font-size: 13.5px !important;
  }
  .notes-item-time {
    font-size: 11px !important;
  }
  .notes-item-q-box {
    font-size: 13px !important;
    padding: 7px 10px !important;
    line-height: 1.45 !important;
  }
  .notes-item-text-box {
    font-size: 13px !important;
    padding: 8px 10px !important;
    line-height: 1.5 !important;
  }
  .notes-thumb {
    width: 58px !important;
    height: 58px !important;
    border-radius: 6px !important;
  }
  .notes-item-foot {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 7px !important;
    padding-top: 4px !important;
  }
  .notes-item-foot .hint {
    font-size: 11px !important;
  }
  .notes-item-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin-left: 0 !important;
  }
  .notes-item-actions .btn {
    justify-content: center !important;
    text-align: center !important;
    font-size: 11.5px !important;
    padding: 6px 2px !important;
    white-space: nowrap !important;
    border-radius: 6px !important;
}

/* 4. 极致超窄屏 (<= 360px，如 iPhone SE/低分屏设备) */
@media (max-width: 360px) {
  .home-exam-scope-title,
  .hsb-title {
    font-size: 12px !important;
  }
  .home-exam-scope-actions .btn,
  .home-exam-scope-btn,
  .hsb-actions .btn,
  .hsb-btn {
    font-size: 11px !important;
    padding: 0 4px !important;
  }
}


/* 专科不考科目置灰与提示样式 */
.home-subj-compact-card.subj-not-in-track {
  opacity: 0.76;
  background: #f8fafc !important;
  border: 1px dashed #cbd5e1 !important;
}
.home-subj-compact-card.subj-not-in-track:hover {
  opacity: 1;
}
