/* 共享样式 - 内容页 */
:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #4f46e5;
  --primary-light: #eef2ff;
  --warn: #f59e0b;
  --warn-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #f0fdf4;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;
  --blue: #3b82f6;
  --blue-light: #eff6ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

/* 返回 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 12px;
}
.back-link:hover { color: var(--primary); }

/* 面包屑 */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .current { color: var(--ink); font-weight: 500; }

/* 标题卡片 */
.header-card {
  background: var(--card);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.subject-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 8px;
}
.header-card h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.header-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.header-meta span::before {
  content: "·";
  margin-right: 6px;
  color: #d1d5db;
}
.header-meta span:first-child::before { display: none; }

/* 功能行 */
.action-row {
  background: var(--card);
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
}
.action-item { display: flex; align-items: center; gap: 6px; }
.action-label { color: var(--muted); }
.progress-mini {
  width: 100px; height: 6px;
  background: #f3f4f6; border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
}
.status-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  font-size: 12px;
}
.status-switch button {
  padding: 4px 10px; border: none;
  background: #fff; cursor: pointer; color: var(--muted);
}
.status-switch button.active { background: var(--primary); color: #fff; }
.tag-sm {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 12px; font-weight: 500;
  cursor: pointer;
}
.tag-star { background: var(--warn-light); color: #b45309; }
.tag-mistake { background: var(--danger-light); color: #b91c1c; }
.tag-recite { background: var(--primary-light); color: var(--primary); }
.tag-practice { background: var(--success-light); color: #047857; }
.tag-highfreq { background: var(--purple-light); color: #6d28d9; }
.video-sm { color: var(--primary); text-decoration: none; }
.add-link { color: var(--muted); cursor: pointer; font-size: 12px; margin-left: 4px; }

/* 模块/章节导航 */
.module-nav {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.module-nav-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.module-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.module-item:hover { background: #f9fafb; }
.module-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}
.module-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
}
.module-item.done .module-dot { background: var(--success); }
.module-item.doing .module-dot { background: var(--primary); }
.module-item .module-name { flex: 1; }
.module-item .module-count {
  font-size: 12px;
  color: var(--muted);
}

/* 章节横向导航（已废弃，使用下拉选择器） */
.section-nav {
  display: none;
}

/* ===== 章节下拉选择器（全端统一） ===== */
.chapter-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}
.chapter-select:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chapter-select:active { background: var(--primary-light); }
.chapter-select .arrow {
  transition: transform 0.2s;
  font-size: 12px;
  color: var(--muted);
}
.chapter-select.open .arrow { transform: rotate(180deg); }

.chapter-dropdown {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}
.chapter-dropdown.open { display: block; }
.chapter-dropdown a {
  display: block;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.chapter-dropdown a:last-child { border-bottom: none; }
.chapter-dropdown a:hover { background: var(--primary-light); }
.chapter-dropdown a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

/* 内容卡片 */
.content-card {
  background: var(--card);
  border-radius: 12px;
  padding: 22px 22px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  display: none;
}
.content-card.active { display: block; }

.content-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

.content-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
  color: var(--ink);
  position: relative;
  padding-left: 12px;
}
.content-card h3::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.content-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--primary);
}

p { margin-bottom: 8px; }
strong { font-weight: 600; }

.key {
  background: #fef3c7;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}
.key-primary {
  background: var(--primary-light);
  color: var(--primary);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}

ul { list-style: none; margin-bottom: 10px; padding-left: 0; }
ul li {
  padding: 3px 0 3px 18px;
  position: relative;
}
ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 5px; height: 5px;
  background: var(--primary);
  border-radius: 50%;
}

/* 表格 */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 10px 0;
}
th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--primary);
  font-weight: 600;
  background: var(--primary-light);
  font-size: 13px;
}
td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }

/* 提示框 */
.note {
  padding: 10px 14px;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 14px;
  border-left: 3px solid;
}
.note-title {
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 13px;
}
.note-important {
  background: var(--warn-light);
  border-left-color: var(--warn);
}
.note-important .note-title { color: #b45309; }
.note-warn {
  background: var(--danger-light);
  border-left-color: var(--danger);
}
.note-warn .note-title { color: #b91c1c; }
.note-tip {
  background: var(--primary-light);
  border-left-color: var(--primary);
}
.note-tip .note-title { color: var(--primary); }
.note-memory {
  background: var(--success-light);
  border-left-color: var(--success);
}
.note-memory .note-title { color: #047857; }
.note-key {
  background: #fef2f2;
  border-left-color: #dc2626;
}
.note-key .note-title { color: #dc2626; }

/* 例子 */
.eg {
  font-size: 13px;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid #e5e7eb;
  margin: 4px 0 8px;
}
.eg::before {
  content: "例：";
  font-weight: 500;
  color: #9ca3af;
}

/* 公式块（数学用） */
.formula {
  background: #f9fafb;
  padding: 10px 14px;
  margin: 8px 0;
  border-left: 3px solid var(--success);
  border-radius: 0 6px 6px 0;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 15px;
}

/* 二级结论（数学用） */
.conclusion {
  border: 1px dashed #c4b5fd;
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: 8px;
  background: var(--purple-light);
  font-size: 14px;
}
.conclusion-title {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 13px;
  color: #6d28d9;
}

/* 例题（数学用） */
.example {
  border: 1px solid var(--border);
  padding: 12px 14px;
  margin: 10px 0;
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
}
.example-label {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--primary);
}
.example-answer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #d1d5db;
  color: #4b5563;
  font-size: 13px;
}

/* 方法标签 */
.method-tags {
  margin: 6px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.method-tags span {
  display: inline-block;
  padding: 3px 8px;
  background: var(--blue-light);
  color: #1d4ed8;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* 人物卡片 */
.person-card {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 4px;
  min-width: 180px;
  border: 1px solid var(--border);
}
.person-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.person-info .name { font-weight: 600; font-size: 14px; }
.person-info .contrib { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 底部导航 */
.footer-nav {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.footer-nav .page-info { color: var(--muted); font-size: 13px; }
.nav-btns { display: flex; gap: 10px; }
.nav-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  color: var(--muted);
}
.nav-btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 待完善标记 */
.content-card.incomplete {
  opacity: 0.5;
  position: relative;
}
.content-card.incomplete::after {
  content: "待完善";
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 12px;
  color: var(--muted);
  background: #f3f4f6;
  padding: 2px 10px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .container { padding: 16px 12px 100px; }
  .header-card h1 { font-size: 18px; }
  .content-card { padding: 18px 16px; }
  .action-row { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* 触屏：底部导航固定在屏幕底部 */
  .footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    margin: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  }
  .nav-btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px;
  }
}

/* ===== 数学专属样式 ===== */

/* 公式框 */
.formula {
  background: #f8fafc;
  border-left: 4px solid var(--blue);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-family: 'Times New Roman', serif;
  font-size: 15px;
  line-height: 2;
  color: #1e40af;
}

/* 例题框 */
.example {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 14px 0;
}
.example-label {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-weight: 600;
}
.example-answer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #bbf7d0;
  line-height: 1.9;
  color: #065f46;
}

/* 结论框 */
.conclusion {
  background: var(--purple-light);
  border-left: 4px solid var(--purple);
  padding: 12px 16px;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
  line-height: 1.9;
}
.conclusion-title {
  font-weight: 600;
  color: #6d28d9;
  margin-bottom: 6px;
  font-size: 13px;
}

/* 方法标签 */
.method-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.method-tags span {
  background: #f3f4f6;
  color: #4b5563;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  border: 1px solid #e5e7eb;
}

/* 重点关键词高亮 */
.key {
  background: linear-gradient(transparent 60%, #fef08a 60%);
  font-weight: 500;
  padding: 0 2px;
}

/* 模块导航 */
.module-nav {
  background: var(--card);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.module-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.module-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.module-item:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}
.module-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
}
.module-item.doing .module-dot { background: var(--warn); }
.module-name { color: var(--ink); font-weight: 500; }
.module-count { color: var(--muted); font-size: 12px; }

/* 表格包装 */
.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.table-wrap th,
.table-wrap td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table-wrap th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--ink);
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: #f9fafb; }

/* 小标签（章节标签显示） */
.tag-sm {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  cursor: pointer;
  margin-right: 4px;
}
.tag-star { background: #fef3c7; color: #92400e; }
.tag-mistake { background: #fee2e2; color: #991b1b; }
.tag-recite { background: #dbeafe; color: #1e40af; }
.tag-practice { background: #dcfce7; color: #166534; }
.tag-highfreq { background: #fae8ff; color: #86198f; }
.add-link {
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}
.add-link:hover { text-decoration: underline; }

/* 状态切换按钮 */
.status-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.status-switch button {
  padding: 4px 10px;
  border: none;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
}
.status-switch button.active {
  background: var(--primary);
  color: #fff;
}

/* 进度条mini */
.progress-mini {
  width: 80px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin: 0 6px;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s;
}

/* ===== 弹窗/模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1f2937;
}
.modal-label {
  display: block;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.modal-label:hover { background: #f3f4f6; }
.modal-label input { margin-right: 8px; }
.modal-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  margin-top: 8px;
}
.modal-input:focus { outline: none; border-color: var(--primary); }
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}
.modal-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}
.modal-btn-primary { background: var(--primary); color: #fff; }
.modal-btn-secondary { background: #f3f4f6; color: #6b7280; }
.modal-btn-danger { background: #fee2e2; color: #dc2626; }

/* ===== 通用小按钮 ===== */
.btn-sm {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { opacity: 0.9; color: #fff; }

/* ===== 视频区域 ===== */
.video-list { margin-bottom: 8px; }
.video-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: wrap;
}
.video-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.video-item a:hover { text-decoration: underline; }
.video-note { font-size: 12px; color: #9ca3af; width: 100%; margin-top: 2px; }
.video-date { font-size: 11px; color: #d1d5db; }
.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 14px;
  border-radius: 4px;
}
.btn-icon:hover { background: #f3f4f6; }

/* ===== 笔记批注 ===== */
.annotation-mark {
  background: #fef3c7;
  padding: 2px 0;
  border-radius: 2px;
  cursor: pointer;
}
.annotation-mark:hover { background: #fde68a; }
.annotation-item {
  padding: 10px 12px;
  margin: 8px 0;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
}
.annotation-text { color: #6b7280; font-size: 13px; margin-bottom: 4px; }
.annotation-note { color: #1f2937; font-size: 14px; }

/* ===== 底部笔记操作栏 ===== */
.note-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 0.2s ease;
  min-height: 52px;
  box-sizing: border-box;
}
.note-bottom-bar.show {
  transform: translateY(0);
}
.note-bottom-bar .note-preview {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
  font-size: 13px;
}
.note-bottom-bar .note-btn {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.note-bottom-bar .note-btn:active { opacity: 0.8; }
.note-bottom-bar .note-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.note-bottom-bar .note-close:active { color: #fff; }

/* iPad 分屏模式：底部栏留出 Safe Area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .note-bottom-bar {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
}
.form-group textarea { min-height: 60px; resize: vertical; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== 空状态提示 ===== */
.empty-tip {
  text-align: center;
  color: #9ca3af;
  padding: 16px 0;
  font-size: 14px;
}

/* ===== iPad 分屏适配（500-750px） ===== */
@media (min-width: 501px) and (max-width: 750px) {
  .container { padding: 20px 16px 80px; max-width: 100%; }
  .header-card h1 { font-size: 20px; }
  .content-card { padding: 20px 16px; }
  .content-card h2 { font-size: 17px; }
  .sub-modules { gap: 10px; }
  .sub-module-card { padding: 14px; }
  .sub-module-card .sub-name { font-size: 14px; }
  .sub-module-card .sub-desc { font-size: 12px; }
  .action-row { gap: 10px; flex-wrap: wrap; }
  .modal-box { max-width: 85vw; }
  .chapter-select { max-width: 100%; }
  .note-bottom-bar { min-height: 48px; padding: 8px 14px; }
  .note-bottom-bar .note-preview { font-size: 12px; }
  .note-bottom-bar .note-btn { padding: 7px 14px; font-size: 13px; }
}

/* ===== 手机横屏 / 窄分屏（≤500px） ===== */
@media (max-width: 500px) {
  .container { padding: 12px 10px 90px; }
  .header-card { padding: 16px; }
  .header-card h1 { font-size: 17px; }
  .content-card { padding: 16px 12px; border-radius: 10px; }
  .content-card h2 { font-size: 16px; }
  .content-card h3 { font-size: 15px; }
  .content-card p, .content-card li { font-size: 14px; }
  .sub-modules { grid-template-columns: 1fr; gap: 8px; }
  .sub-module-card { padding: 12px; }
  .chapter-select select { font-size: 14px; padding: 10px 12px; }
  .action-row { flex-direction: column; gap: 8px; }
  .status-btn { padding: 6px 12px; font-size: 13px; }
  .modal-box { max-width: 95vw; padding: 16px; }
  .note-bottom-bar { min-height: 46px; padding: 8px 12px; gap: 6px; }
  .note-bottom-bar .note-preview { font-size: 12px; }
  .note-bottom-bar .note-btn { padding: 6px 12px; font-size: 13px; }
}
