/* ==========================================================================
   cmschule Mindmap - Gedanken-Netz & Mindmap
   Tool-spezifische Styles & nahtlose Integration in das cmschule Design-System
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --line: #cbd5e1;
  --accent: #2e7d32;
  --accent-light: #e8f5e9;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-tool: 12px;
}

/* Themes */
body.theme-light {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #1e293b;
  --line: #cbd5e1;
  --accent: #2e7d32;
  --accent-light: #e8f5e9;
}

body.theme-nature {
  --bg: #f0f7ed;
  --card: #ffffff;
  --ink: #1e331b;
  --line: #cde0c5;
  --accent: #388e3c;
  --accent-light: #e0f2e1;
}

body.theme-ocean {
  --bg: #eff6fc;
  --card: #ffffff;
  --ink: #0f273d;
  --line: #c8dfef;
  --accent: #0284c7;
  --accent-light: #e0f2fe;
}

body.theme-dark {
  --bg: #0f172a;
  --card: #1e293b;
  --ink: #f8fafc;
  --line: #334155;
  --accent: #4ade80;
  --accent-light: #166534;
  --shadow: 0 12px 30px rgba(0,0,0,.5);
}

/* Tool Layout Wrapper */
.tool-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted, #64748b);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--primary, #2563eb);
}

/* Header Bar */
.tool-header-bar {
  background: var(--card-bg, #ffffff);
  padding: 16px 20px;
  border-radius: var(--radius-tool);
  border: 1px solid var(--border-color, #cbd5e1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.tool-header-bar h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 800;
  color: var(--text-color, #0f172a);
}

.tool-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.tool-header-actions .btn {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
}

/* Badge Privacy Chip in Topbar */
.badge-privacy-chip {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.badge-privacy-chip:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}


/* Workspace & App Container (Maximaler Platz für Canvas) */
.mindmap-container {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-tool);
  box-shadow: var(--shadow);
  height: calc(100vh - 205px);
  min-height: 640px;
  display: flex;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

#app {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Floating Exit Fullscreen Button */
.btn-exit-fullscreen {
  display: none;
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 120;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-exit-fullscreen:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* Fullscreen Mode */
body.is-fullscreen {
  overflow: hidden !important;
}

body.is-fullscreen #header-placeholder,
body.is-fullscreen .back-link,
body.is-fullscreen .tool-header-bar,
body.is-fullscreen .mindmap-quick-banner,
body.is-fullscreen #footer-placeholder {
  display: none !important;
}

body.is-fullscreen .content-page {
  padding: 0 !important;
}

body.is-fullscreen .tool-wrap {
  max-width: 100vw !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100vh !important;
}

body.is-fullscreen .mindmap-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  z-index: 9999;
}

body.is-fullscreen .btn-exit-fullscreen {
  display: flex;
}

/* Sidebar Toolbar */
#toolbar {
  width: 240px;
  min-width: 240px;
  border-right: 1px solid var(--line);
  background: var(--card);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  z-index: 10;
}

.toolbar-brand {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.toolbar-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toolbar-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.6;
}

.btn-row {
  display: flex;
  gap: 6px;
}

.btn-flex {
  flex: 1;
}

/* Toolbar Buttons */
.btn {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-danger-soft {
  color: #dc2626;
}

.btn-danger-soft:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.theme-select {
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Hints */
.hints {
  margin-top: auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--accent-light);
  font-size: 12px;
}

.hints-title {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.hints-text {
  color: var(--ink);
  opacity: 0.9;
  line-height: 1.4;
}

/* Canvas Area */
#canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  touch-action: none;
  background-image: radial-gradient(circle, rgba(148, 163, 184, 0.35) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.theme-dark #canvas {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
}

#drawLayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

#canvas.drawing-on #drawLayer {
  pointer-events: auto;
  cursor: crosshair;
}

#canvas.drawing-on.tool-eraser #drawLayer {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21'/%3E%3Cpath d='M22 21H7'/%3E%3Cpath d='m5 11 9 9'/%3E%3C/svg%3E") 4 20, cell;
}

#canvas.drawing-on.tool-highlighter #drawLayer {
  cursor: crosshair;
}

#canvas.drawing-on .node {
  pointer-events: none;
}

/* Links SVG (Paths & Lines) */
#links {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

path.link,
line.link {
  stroke: var(--accent);
  stroke-width: 2.4;
  fill: none;
  opacity: 0.9;
  stroke-linecap: round;
  transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

path.link-hit,
line.link-hit {
  stroke: transparent;
  stroke-width: 24;
  fill: none;
  cursor: pointer;
  pointer-events: stroke;
}

path.link-hit:hover + path.link,
line.link-hit:hover + line.link {
  stroke: #dc2626 !important;
  stroke-width: 3.8 !important;
}

/* ==========================================================================
   Schwebende Zeichenleiste (Floating Canvas Toolbar)
   ========================================================================== */
.draw-floating-bar {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.16), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  user-select: none;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
}
.draw-floating-bar::-webkit-scrollbar {
  display: none;
}

.draw-bar-section {
  display: flex;
  align-items: center;
  gap: 4px;
}

.draw-bar-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 3px;
  flex-shrink: 0;
}

/* Werkzeuge (Stift, Marker, Radierer) */
.draw-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.draw-tool-btn:hover {
  background: var(--bg);
}
.draw-tool-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
.draw-btn-icon {
  font-size: 14px;
  line-height: 1;
}
.draw-btn-text {
  font-size: 12.5px;
}

/* 6 didaktische Farben */
.draw-colors-section {
  display: flex;
  align-items: center;
  gap: 6px;
}
.draw-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: var(--c);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  outline: none;
}
.draw-color-btn:hover {
  transform: scale(1.15);
}
.draw-color-btn.active {
  transform: scale(1.22);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c);
}

/* 3 Strichstärken */
.draw-sizes-section {
  display: flex;
  align-items: center;
  gap: 3px;
}
.draw-size-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.draw-size-btn:hover {
  background: var(--bg);
}
.draw-size-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
}

.draw-dot {
  background: var(--ink);
  border-radius: 50%;
  display: block;
}
.dot-thin { width: 3px; height: 3px; }
.dot-medium { width: 6px; height: 6px; }
.dot-thick { width: 10px; height: 10px; }

/* Aktionen (Undo, Safe Clear, Done) */
.draw-action-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.draw-action-btn:hover {
  background: var(--bg);
}
.draw-action-btn.btn-danger-subtle:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.draw-action-btn.btn-draw-done {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  padding: 6px 13px;
  font-size: 12.5px;
}
.draw-action-btn.btn-draw-done:hover {
  filter: brightness(1.1);
}

/* Nodes Base */
.node {
  position: absolute;
  min-width: 130px;
  max-width: 250px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  user-select: none;
  touch-action: none;
  word-wrap: break-word;
  cursor: grab;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.node:active {
  cursor: grabbing;
}

.node .title {
  font-weight: 700;
  font-size: 14px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
  color: var(--ink);
  line-height: 1.35;
}

.node .icon {
  font-size: 16px;
  line-height: 1;
}

.node .note {
  font-size: 12px;
  color: var(--ink);
  opacity: 0.85;
  margin-top: 6px;
  white-space: pre-wrap;
  line-height: 1.35;
}

/* Datenschutz- & Konzept-Banner (100% lokal) */
.privacy-concept-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-tool);
  padding: 12px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.privacy-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.privacy-text {
  flex: 1;
  font-size: 13px;
  color: #166534;
  line-height: 1.5;
}

.privacy-text strong {
  color: #14532d;
}

.privacy-text code {
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: #166534;
}

.privacy-learn-more {
  white-space: nowrap;
  font-size: 12.5px;
  padding: 7px 14px;
  font-weight: 700;
  border-color: #86efac;
  color: #15803d;
  background: #ffffff;
  text-decoration: none;
}

.privacy-learn-more:hover {
  background: #dcfce7;
  border-color: #4ade80;
  color: #14532d;
}

@media (max-width: 768px) {
  .privacy-concept-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Kachel-Formen (100% verlässliche Standard-Formen ohne Clipping) */
.node.shape-rect {
  border-radius: 12px;
}

.node.shape-capsule {
  border-radius: 999px;
  padding: 10px 22px;
  text-align: center;
}

.node.shape-capsule .title {
  justify-content: center;
}

.node.shape-note {
  border-radius: 6px;
  border-top: 6px solid var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.node.shape-bubble {
  border-radius: 18px 18px 18px 4px;
  padding: 10px 16px;
}

/* Kachel-Größen (Visuelle Hierarchie: S, M, L) */
.node.size-s {
  min-width: 105px;
  max-width: 190px;
  padding: 6px 10px;
  border-radius: 8px;
}
.node.size-s.shape-capsule {
  border-radius: 999px;
  padding: 6px 14px;
}
.node.size-s .title {
  font-size: 12px;
}
.node.size-s .icon {
  font-size: 13px;
}
.node.size-s .note {
  font-size: 11px;
}

.node.size-m {
  min-width: 140px;
  max-width: 240px;
  padding: 10px 14px;
}

.node.size-l {
  min-width: 180px;
  max-width: 290px;
  padding: 14px 20px;
  border-width: 2.2px;
}
.node.size-l.shape-capsule {
  border-radius: 999px;
  padding: 14px 24px;
}
.node.size-l .title {
  font-size: 16.5px;
  font-weight: 800;
}
.node.size-l .icon {
  font-size: 19px;
}
.node.size-l .note {
  font-size: 13px;
}

/* Node Colors */
.node.c0 { background: #ffffff; }
.node.c1 { background: #eff6ff; border-color: #bfdbfe; }
.node.c2 { background: #f0fdf4; border-color: #bbf7d0; }
.node.c3 { background: #fffbeb; border-color: #fde68a; }
.node.c4 { background: #faf5ff; border-color: #e9d5ff; }

body.theme-dark .node.c0 { background: #1e293b; }
body.theme-dark .node.c1 { background: #1e3a5f; border-color: #2563eb; }
body.theme-dark .node.c2 { background: #143825; border-color: #16a34a; }
body.theme-dark .node.c3 { background: #453214; border-color: #d97706; }
body.theme-dark .node.c4 { background: #3b1e54; border-color: #9333ea; }

.node.selected {
  outline: 2.5px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), 0 8px 20px rgba(0,0,0,0.1);
}

.node.connecting {
  outline: 2.5px dashed var(--accent);
  animation: pulseConnect 1.5s infinite;
}

@keyframes pulseConnect {
  0%, 100% { outline-color: var(--accent); }
  50% { outline-color: transparent; }
}

.node.root {
  border-width: 2.5px;
  border-color: var(--accent);
}

.node.root .title {
  font-size: 15px;
}

/* 1-Klick Ast-Button am Kachelrand */
.node-add-child-handle {
  display: none;
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 15;
  transition: transform 0.15s ease, background 0.15s ease;
}

.node.selected .node-add-child-handle {
  display: flex;
}

.node-add-child-handle:hover {
  transform: translateY(-50%) scale(1.25);
  background: #15803d;
}

/* Toast */
#toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}

#toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#toast.success {
  border-left: 4px solid #16a34a;
}

#toast.error {
  border-left: 4px solid #dc2626;
}

.toast-action-btn {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  transition: background 0.15s ease;
}

.toast-action-btn:hover {
  background: #1e293b;
}

/* Modals: Onboarding, Editor & Clear Confirm */
#onboarding,
#editor,
#clearDrawModal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  padding: 16px;
  z-index: 10001;
}

#onboarding.show,
#editor.show,
#clearDrawModal.show {
  display: flex;
}

.onboarding-card,
.editor-card,
.modal-card {
  width: min(540px, 94vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.modal-card-sm {
  width: min(420px, 94vw);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-weight: 800;
  font-size: 17px;
  margin: 0;
  color: var(--ink);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.modal-close:hover {
  background: var(--bg);
  color: var(--ink);
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.onboarding-title,
.editor-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--ink);
}

.onboarding-steps {
  margin: 0 0 16px 20px;
  padding: 0;
  line-height: 1.6;
  font-size: 14px;
}

.onboarding-steps li {
  margin-bottom: 8px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted, #64748b);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-close-modal:hover {
  color: var(--ink);
  background: var(--bg);
}

.onboarding-feedback-box {
  background: var(--accent-light);
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.8;
  margin-top: 4px;
}

.editor-input,
.editor-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  background: var(--card);
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.editor-input:focus,
.editor-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* Editor Shapes */
.editor-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shape-chip {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.shape-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.shape-chip.active {
  outline: 2px solid var(--accent);
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Editor Size Chips */
.editor-sizes {
  display: flex;
  gap: 8px;
}

.size-chip {
  flex: 1;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all 0.15s ease;
}

.size-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.size-chip.active {
  outline: 2px solid var(--accent);
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.editor-colors,
.editor-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch[data-color="0"] { background: #ffffff; }
.color-swatch[data-color="1"] { background: #eff6ff; border-color: #93c5fd; }
.color-swatch[data-color="2"] { background: #f0fdf4; border-color: #86efac; }
.color-swatch[data-color="3"] { background: #fffbeb; border-color: #fde047; }
.color-swatch[data-color="4"] { background: #faf5ff; border-color: #d8b4fe; }

.color-swatch.active {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.icon-chip {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.1s ease;
}

.icon-chip:hover {
  background: var(--accent-light);
}

.icon-chip.active {
  outline: 2px solid var(--accent);
  background: var(--accent-light);
}

.editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Mobile & Tablet Responsive */
@media (max-width: 860px) {
  .mindmap-container {
    height: 620px;
  }
  #app {
    flex-direction: column;
  }
  #toolbar {
    width: 100%;
    min-width: 0;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .toolbar-group {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .toolbar-label {
    width: 100%;
  }
  .hints {
    display: none;
  }
}

/* Print Styles */
@media print {
  .no-print,
  #header-placeholder,
  #footer-placeholder,
  .back-link,
  .tool-header-bar,
  .mindmap-quick-banner,
  #toolbar,
  .btn-exit-fullscreen,
  .node-add-child-handle {
    display: none !important;
  }
  .tool-wrap,
  .mindmap-container,
  #app,
  #canvas {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
}
