/* ===========================================================
   学习区 · 思维导图页 独立样式（依赖 study.css 的主题变量）
   =========================================================== */

.mm-grid { display: grid; grid-template-columns: 268px 1fr; gap: 20px; padding-top: 20px; }

/* ---------- 左侧章节目录 ---------- */
.mm-chapter-nav { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 220px); overflow-y: auto; padding-right: 4px; }
.mm-ch-item {
  display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left;
  padding: 9px 12px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: #a8a8a8; font-size: 13px; font-family: inherit;
  transition: .15s; width: 100%;
}
.mm-ch-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.mm-ch-item.active {
  color: #fff; background: var(--sc, rgba(201,169,110,.16));
  border-color: var(--sc-b, rgba(201,169,110,.45));
}
.mm-ch-item .mi-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-ch-item .mi-c { flex: none; font-size: 11px; color: #707070; }
.mm-ch-item.active .mi-c { color: rgba(255,255,255,.75); }

/* ---------- 右侧画布 ---------- */
.mm-content { min-width: 0; }
.mm-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.mm-head h2 { margin: 0; font-size: 19px; color: #f5f5f5; letter-spacing: 1px; }
.mm-head-tools { margin-left: auto; display: flex; gap: 8px; }
.mm-head-tools button {
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer; font-size: 12.5px;
  color: #b8b8b8; background: #1b1b1b; border: 1px solid rgba(255,255,255,.1);
  font-family: inherit; transition: .15s;
}
.mm-head-tools button:hover { color: #fff; border-color: rgba(201,169,110,.5); }

.mm-canvas-wrap {
  background: #121212; border: 1px solid rgba(255,255,255,.08); border-radius: 16px;
  padding: 14px; overflow: auto; min-height: 420px;
  -webkit-overflow-scrolling: touch;
}
#mapSvg { display: block; }  /* 宽度由 width 属性决定，画布固定尺寸靠容器滑动查看 */

.mm-swipe-hint {
  font-size: 12px; color: #c9a96e; opacity: .85; margin: -6px 0 10px;
  display: flex; align-items: center; gap: 6px;
}

.mm-empty { text-align: center; color: #6f6f6f; font-size: 13.5px; padding: 60px 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .mm-grid { grid-template-columns: 1fr; }
  .mm-chapter-nav { max-height: 200px; flex-direction: row; flex-wrap: wrap; }
  .mm-ch-item { width: auto; }
  .mm-head-tools button { height: 30px; padding: 0 10px; font-size: 12px; }
}
