/* 単元マップ（map.md）。すべてのセレクタを .mc- で始める。色は theme.css のトークン、定義は web/DESIGN.md */

/* ---------- 単元マップ（map.md） ---------- */
.mc-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  margin: 1em 0;
  font-size: 0.85em;
}
.mc-map-legend__dot {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.35em;
  border: 1px solid;
  border-radius: 50%;
}
/* 板はダークでも白のまま（グラフ枠と同じ扱い） */
.mc-map {
  position: relative;
  min-height: 50em;
  padding: 2em;
  overflow-x: auto;
  background: var(--mc-plate-bg);
  border: 1px solid var(--mc-plate-line);
  border-radius: 0.75em;
}
.mc-map__edges {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
.mc-map__grid {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4em;
  min-width: max-content;
}
.mc-map__col {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 16em;
}
.mc-map__grade {
  margin-bottom: 1em;
  padding-bottom: 0.5em;
  font-weight: 700;
  text-align: center;
  color: var(--mc-math-axis);
  border-bottom: 2px solid var(--mc-plate-line);
}
.mc-map__node {
  padding: 0.75em;
  font-size: 0.9em;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  background: var(--mc-plate-bg);
  border: 1px solid;
  border-radius: 0.5em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mc-map__node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.mc-map__edge {
  fill: none;
  stroke: var(--mc-math-aux);
  stroke-width: 2px;
  transition: stroke 0.2s ease, stroke-width 0.2s ease;
}
.mc-map__edge.is-highlighted {
  stroke: var(--mc-math-curve);
  stroke-width: 3px;
}
.mc-map__edge.is-dimmed {
  opacity: 0.2;
}
.mc-map__arrow {
  fill: var(--mc-math-aux);
}
.mc-map__arrow--highlighted {
  fill: var(--mc-math-curve);
}
/* カテゴリの色（代数・幾何・解析・確率統計）。凡例の点と単元の枠で共有する */
.mc-map [data-cat="algebra"],
.mc-map-legend [data-cat="algebra"] {
  color: var(--mc-cat-algebra-ink);
  background: var(--mc-cat-algebra-bg);
  border-color: var(--mc-cat-algebra-line);
}
.mc-map [data-cat="geometry"],
.mc-map-legend [data-cat="geometry"] {
  color: var(--mc-cat-geometry-ink);
  background: var(--mc-cat-geometry-bg);
  border-color: var(--mc-cat-geometry-line);
}
.mc-map [data-cat="analysis"],
.mc-map-legend [data-cat="analysis"] {
  color: var(--mc-cat-analysis-ink);
  background: var(--mc-cat-analysis-bg);
  border-color: var(--mc-cat-analysis-line);
}
.mc-map [data-cat="stats"],
.mc-map-legend [data-cat="stats"] {
  color: var(--mc-cat-stats-ink);
  background: var(--mc-cat-stats-bg);
  border-color: var(--mc-cat-stats-line);
}

