/* ============================================================
 * 语文个人中心 v2.0 · 学情驾驶舱样式
 * ============================================================
 * 覆盖 P0-M1 至 P0-M5 全部样式
 * 配合 yuwen_profile_v2.js 使用
 * ============================================================ */

/* ── CSS 变量 ── */
:root {
  --bg: #f6f8fa;
  --card-bg: #ffffff;
  --text: #1a2332;
  --text-muted: #6b7a8f;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f0f2f5;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --accent-dark: #1e40af;
  --green: #16a34a;
  --green-light: #dcfce7;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --red: #dc2626;
  --red-light: #fef2f2;
  --purple: #7c3aed;
  --gold: #b8860b;
  --gold-light: #fef9e7;
  --shadow: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --transition: all .25s ease;
}

/* ── 知识地图容器 ── */
.knowledge-map {
  position: relative;
}

/* 搜索框 */
.km-search {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 12px;
}
.km-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--card-bg);
  transition: var(--transition);
  outline: none;
}
.km-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.km-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* 骨架屏 */
.km-skeleton {
  padding: 8px 0;
}
.km-skeleton .sk-item {
  height: 20px;
  background: linear-gradient(90deg, var(--border-light) 25%, #e8ecf0 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 10px;
}
.km-skeleton .sk-item:nth-child(1) { width: 60%; }
.km-skeleton .sk-item:nth-child(2) { width: 85%; }
.km-skeleton .sk-item:nth-child(3) { width: 45%; }
.km-skeleton .sk-item:nth-child(4) { width: 75%; }
.km-skeleton .sk-item:nth-child(5) { width: 55%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 错误状态 */
.km-error {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.km-error .retry-btn {
  margin-top: 12px;
  padding: 8px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
}

/* 树节点 */
.km-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 层标签 */
.km-layer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.km-layer::before, .km-layer::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.km-layer .arrow {
  font-size: 14px;
  color: var(--accent);
}

/* 板块头 */
.km-board-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 4px 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  user-select: none;
}
.km-board-header:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.km-board-header .board-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.km-board-header .board-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}
.km-board-header .board-mastery {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
}
.km-board-header .board-toggle {
  font-size: 12px;
  color: var(--text-muted);
  transition: var(--transition);
}
.km-board-header.expanded .board-toggle {
  transform: rotate(180deg);
}

/* 子板块 */
.km-sub-board {
  padding-left: 20px;
  margin: 2px 0;
}
.km-sub-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  font-weight: 500;
}
.km-sub-header:hover {
  background: var(--border-light);
}
.km-sub-header .sub-icon {
  font-size: 16px;
}
.km-sub-header .sub-name {
  flex: 1;
  color: var(--text);
}
.km-sub-header .sub-mastery {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 8px;
}

/* 考点节点 */
.km-points {
  list-style: none;
  padding: 4px 0 4px 24px;
  margin: 0;
}
.km-point {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
}
.km-point:hover {
  background: var(--border-light);
}
.km-point .point-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
}
.km-point .point-name {
  flex: 1;
  color: var(--text);
}
.km-point .point-practice-count {
  font-size: 11px;
  color: var(--text-muted);
}
.km-point .point-level-label {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
}

/* 考点详情弹窗 (modal) */
.km-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}
@media (min-width: 640px) {
  .km-modal-overlay {
    align-items: center;
  }
}
.km-modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  animation: slideUp .25s ease;
}
@media (min-width: 640px) {
  .km-modal {
    border-radius: var(--radius-lg);
    max-width: 420px;
  }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); } to { transform: translateY(0); } }

.km-modal .modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}
.km-modal .modal-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}
.km-modal .modal-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.km-modal .modal-detail-row .label {
  color: var(--text-muted);
}
.km-modal .modal-detail-row .value {
  font-weight: 500;
}
.km-modal .modal-cta {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.km-modal .modal-cta:hover {
  background: var(--accent-dark);
}

/* 新手指引 */
.km-onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.km-onboarding {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  animation: fadeIn .3s ease;
}
.km-onboarding .step-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.km-onboarding h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.km-onboarding p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.km-onboarding .step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.km-onboarding .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}
.km-onboarding .step-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}
.km-onboarding .btn-next {
  padding: 10px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.km-onboarding .btn-next:hover {
  background: var(--accent-dark);
}

/* 状态筛选按钮 */
.km-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.km-filter-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  background: var(--card-bg);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.km-filter-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}
.km-filter-btn:hover {
  border-color: var(--accent);
}

/* 色盲辅助图标 */
.dot-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.dot-icon .shape {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 8px;
  color: #fff;
  font-weight: 700;
}

/* 年级联动 */
.km-grade-selector {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.km-grade-selector select {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--card-bg);
  outline: none;
}

/* 五板块画像 */
.radar-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.radar-wrapper .radar-target-label {
  position: absolute;
  right: -10px;
  top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--card-bg);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px dashed var(--border);
}

/* 身份卡 */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.profile-card .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.profile-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card .avatar .avatar-frame {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  pointer-events: none;
}
.profile-card .avatar .avatar-frame.gold { border-color: var(--gold); }
.profile-card .avatar .avatar-frame.flame { border-color: var(--orange); }

.profile-card .info {
  flex: 1;
}
.profile-card .info .name {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-card .info .name .edit-btn {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
}
.profile-card .info .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-card .info .rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
}
.profile-card .right {
  text-align: right;
}
.profile-card .right .member-badge {
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}
.profile-card .right .member-badge.vip {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid #e8d5a0;
}
.profile-card .right .member-badge.trial {
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid #f0c060;
}
.profile-card .right .member-badge.none {
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* 总览指标卡 */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
}
.overview-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}
.overview-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.overview-card .icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.overview-card .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.overview-card .label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Tab 导航 */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 0;
}
.tab-nav .tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-nav .tab:hover {
  color: var(--accent);
}
.tab-nav .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-nav .tab .tab-icon {
  margin-right: 6px;
}
@media (max-width: 640px) {
  .tab-nav .tab { padding: 10px 12px; font-size: 13px; }
  .tab-nav .tab .tab-text { display: none; }
  .tab-nav .tab .tab-icon { margin-right: 0; }
  .tab-nav .tab.active .tab-text { display: inline; }
}

/* Tab 内容 */
.tab-content {
  display: none;
  animation: fadeIn .25s ease;
}
.tab-content.active {
  display: block;
}

/* 今日交叉训练 */
.cross-training-card {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%);
  border: 1px solid var(--accent-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.cross-training-card .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cross-training-card .items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 640px) {
  .cross-training-card .items { grid-template-columns: 1fr; }
}
.cross-training-card .item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.cross-training-card .item .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 6px;
}
.cross-training-card .item .tag.a { background: var(--red-light); color: var(--red); }
.cross-training-card .item .tag.b { background: #fef3c7; color: #b45309; }
.cross-training-card .item .tag.c { background: var(--green-light); color: var(--green); }
.cross-training-card .item .name {
  font-size: 13px;
  font-weight: 500;
}
.cross-training-card .item .desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.cross-training-card .btn-start {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.cross-training-card .btn-start:hover {
  background: var(--accent-dark);
}

/* 成长激励 */
.growth-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.growth-header .rank-section {
  flex: 1;
}
.growth-header .rank-section .rank-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}
.growth-header .rank-section .rank-progress {
  margin-top: 8px;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.growth-header .rank-section .rank-progress .fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #4ade80);
  transition: width .8s ease;
}
.growth-header .rank-section .rank-next {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.growth-header .xp-section {
  text-align: center;
  min-width: 100px;
}
.growth-header .xp-section .xp-value {
  font-size: 22px;
  font-weight: 700;
}
.growth-header .xp-section .xp-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* 勋章墙 */
.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.badge-item {
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.badge-item:hover {
  box-shadow: var(--shadow);
}
.badge-item .badge-icon {
  font-size: 28px;
  margin-bottom: 4px;
}
.badge-item .badge-name {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}
.badge-item.locked {
  opacity: .4;
  filter: grayscale(1);
}
.badge-item.locked .badge-name {
  color: var(--text-light);
}

/* 每日任务 */
.daily-quests {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.daily-quests .quest-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.daily-quests .quest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.daily-quests .quest-item:last-child {
  border-bottom: none;
}
.daily-quests .quest-check {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}
.daily-quests .quest-check.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.daily-quests .quest-info {
  flex: 1;
}
.daily-quests .quest-info .name {
  font-size: 13px;
  font-weight: 500;
}
.daily-quests .quest-info .reward {
  font-size: 11px;
  color: var(--text-muted);
}
.daily-quests .quest-reward-badge {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 8px;
  background: var(--gold-light);
  color: var(--gold);
  font-weight: 500;
}

/* 打卡日历 */
.checkin-calendar {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.checkin-calendar .cal-month {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.checkin-calendar .cal-month .month-label {
  font-size: 14px;
  font-weight: 600;
}
.checkin-calendar .cal-month .streak {
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}
.checkin-calendar .cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}
.checkin-calendar .cal-weekdays .wd {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
}
.checkin-calendar .cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.checkin-calendar .cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  transition: var(--transition);
  cursor: pointer;
}
.checkin-calendar .cal-day.checked {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}
.checkin-calendar .cal-day.today {
  border: 2px solid var(--accent);
  font-weight: 600;
}
.checkin-calendar .cal-day.missed {
  background: var(--border-light);
  color: var(--text-muted);
}
.checkin-calendar .cal-day.future {
  color: var(--text-light);
}
.checkin-calendar .cal-day .makeup {
  font-size: 8px;
  color: var(--orange);
  position: absolute;
  margin-top: 14px;
}

/* 学习进度条（P0 阶·段综合掌握度） */
.mastery-ring {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mastery-ring .ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
}
.mastery-ring .ring svg {
  transform: rotate(-90deg);
}
.mastery-ring .ring .bg {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 4;
}
.mastery-ring .ring .fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}
.mastery-ring .ring .center-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .5;
}
.empty-state .empty-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}
.empty-state .empty-desc {
  font-size: 13px;
}
.empty-state .empty-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
}

/* 加载状态 */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.loading-spinner .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 通用组件 */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* 色盲辅助图例 */
.legend-bar {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.legend-bar .item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.legend-bar .item .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* 古诗文课内/课外区分 */
.km-point .tag-nei { background: #dbeafe; color: #1d4ed8; font-size: 10px; padding: 1px 5px; border-radius: 4px; }
.km-point .tag-wai { background: #f3e8ff; color: #7c3aed; font-size: 10px; padding: 1px 5px; border-radius: 4px; }