.mindmap-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.mindmap-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--color-border);
}

.mindmap-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mindmap-header p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.mindmap-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── MINDMAP CONTAINER ───────────────────────────── */
#mindmap-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

#mindmap-container svg {
  width: 100%;
  height: 100%;
}

/* ── MARKMAP OVERRIDES ───────────────────────────── */
.markmap-node circle {
  cursor: pointer;
  transition: r 200ms ease;
}

.markmap-node:hover circle { r: 6px; }

.markmap-node text {
  fill: var(--color-text);
  font-family: var(--font-sans);
  font-size: 14px;
}

.markmap-link { stroke: var(--color-border); }

/* Leaf nodes — clickable */
.markmap-node.is-leaf circle {
  fill: var(--color-surface-2);
  stroke-width: 2px;
  cursor: pointer;
}

.markmap-node.is-leaf text {
  cursor: pointer;
}

.markmap-node.is-leaf:hover text {
  text-decoration: underline;
}

/* ── TOOLTIP ─────────────────────────────────────── */
#node-tooltip {
  position: fixed;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 200;
  opacity: 0;
  transition: opacity 150ms ease;
  max-width: 200px;
  box-shadow: var(--shadow);
}

#node-tooltip.visible { opacity: 1; }

/* ── HINT OVERLAY ────────────────────────────────── */
.hint-overlay {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 99px;
  padding: 8px 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 768px) {
  .mindmap-header { padding: 14px 16px 12px; }
  .mindmap-header h1 { font-size: 1.2rem; }
}
