/* ===================================================================
   Schaubild-Visualisierer — styles
   =================================================================== */

:root {
  --accent: #874efe;
  --accent-soft: color-mix(in oklab, var(--accent) 14%, white);
  --accent-ring: color-mix(in oklab, var(--accent) 35%, white);

  --ink: #111418;
  --ink-2: #3a3f47;
  --muted: #6b7280;
  --line: #d6d6d6;
  --line-2: #e8e8e8;
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-row-a: #ebebeb;
  --bg-row-b: #d6d6d6;

  --node-bg: #ffffff;
  --node-border: #111418;
  --node-radius: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.05);
  --shadow-md: 0 6px 24px rgba(15, 17, 21, 0.08), 0 2px 6px rgba(15, 17, 21, 0.05);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; }

/* ===================================================================
   App shell
   =================================================================== */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.app > .titlebar,
.app > .view-tabs { flex: none; }
.app > [data-view-panel] { flex: 1; min-height: 0; }
.app [hidden] { display: none !important; }

/* Swimlanes als eigener Tab: Kopfzeile (wie geführte Ansichten) + Main-Split */
.canvas-view {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  background: var(--bg-elev);
}
.canvas-head {
  padding: 22px 24px 0;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg-elev);
}
.canvas-head .gv-heading { margin-bottom: 14px; }
.canvas-export { display: inline-flex; gap: 2px; }
.tagsbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 14px;
  overflow-x: auto;
}
.tagsbar-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.tagsbar-list { display: flex; gap: 6px; }

/* Schaubild-spezifische Bedienelemente nur im Schaubild-Tab */
body:not([data-view="schaubild"]) .canvas-only { display: none !important; }

/* ----------- Schaubild-Titel (in der Titlebar links) ----------- */
.schaubild-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1, #111418);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.schaubild-title[hidden] { display: none; }

/* ----------- Header ----------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-2);
  z-index: 10;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}
.topbar::-webkit-scrollbar { height: 6px; }
.topbar::-webkit-scrollbar-thumb { background: #d6d6d6; border-radius: 3px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand .brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: grid; place-items: center;
  color: white;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
}
.brand small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  margin-left: 2px;
}

.topbar-actions {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.topbar-spacer { flex: 1; min-width: 16px; flex-shrink: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 60ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn:hover { background: #f3f4f6; border-color: #c2c5ca; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 14px; height: 14px; }

.btn-primary {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.btn-primary:hover { background: #000; border-color: #000; }

.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(0.95); }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f3f4f6; }

.btn.is-active {
  outline: 2px solid var(--accent-ring);
  outline-offset: 1px;
}

.tag-pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms ease;
  flex-shrink: 0;
}
.tag-pill:hover { background: #f3f4f6; }
.tag-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

/* divider */
.tb-divider {
  width: 1px;
  height: 22px;
  background: var(--line-2);
  flex-shrink: 0;
}

/* Zoom slider */
.zoom {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.zoom input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  outline: none;
}
.zoom input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.zoom input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
}
.zoom-val { min-width: 36px; text-align: right; }

/* ===================================================================
   Main split: graph (left) | info panel (right)
   =================================================================== */

.main {
  display: grid;
  grid-template-columns: 1fr 0;
  transition: grid-template-columns 280ms cubic-bezier(.2,.7,.2,1);
  overflow: hidden;
  min-height: 0;
}
.main.has-info {
  grid-template-columns: 1fr 420px;
}
.main.tour-mode.has-info {
  grid-template-columns: 1fr minmax(420px, 33vw);
}
.main.tour-mode .node { cursor: default; }
.main.tour-mode .node:hover {
  box-shadow: none;
  transform: none;
  border-color: var(--node-border);
}

/* ---------- Graph viewport ---------- */

.graph-wrap {
  position: relative;
  overflow: auto;
  background: var(--bg-elev);
  min-width: 0;
  min-height: 0;
  cursor: grab;
}

.graph-stage {
  position: relative;
  transform-origin: 0 0;
  width: max-content;
  min-width: 100%;
  min-height: 100%;
}

/* Layer rows */
.layer-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 130px;
  padding: 18px 28px 18px 130px;
  border-bottom: 1px dashed #b6b6b6;
}
.layer-row:last-child { border-bottom: none; }
.layer-row.bg-a { background: var(--bg-row-a); }
.layer-row.bg-b { background: var(--bg-row-b); }

.info-section.info-section-spaced { margin-top: 28px; }

/* Schaubild node highlighted from list-hover */
.node.is-list-hover {
  border-color: var(--accent) !important;
  background: color-mix(in oklab, var(--accent) 14%, white) !important;
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 35%, transparent), 0 12px 28px rgba(108, 79, 232, 0.35) !important;
  transform: translateY(-2px) scale(1.03);
  z-index: 5 !important;
}
.node.is-list-hover .num {
  background: var(--accent) !important;
}

.layer-label {
  position: absolute;
  left: 24px;
  top: 22px;
  width: 140px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  letter-spacing: 0.01em;
  line-height: 1.25;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.layer-track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 80px;
}

/* Node */
.node {
  position: absolute;
  background: var(--node-bg);
  border: 1px solid #d4d7dc;
  border-radius: 10px;
  padding: 10px 16px 10px 16px;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  text-align: left;
  transition:
    box-shadow 160ms ease,
    transform 160ms cubic-bezier(.2,.7,.2,1),
    border-color 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}
.node.no-desc {
  justify-content: center;
  text-align: center;
}

.node .node-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.node .label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.node .desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink-2, #5a6068);
  letter-spacing: 0;
}

.node:hover {
  box-shadow: var(--shadow-sm);
  border-color: #8b9098;
}
.node.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-md);
}
.node.is-tour-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 6px var(--accent-ring), var(--shadow-md);
  animation: tourPulse 1.6s ease-in-out infinite;
}
/* Ancestor on the active path — softer than is-selected */
.node.is-on-path {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, white);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 22%, white), var(--shadow-sm);
}
.node.is-on-path .num {
  background: var(--accent);
}
@keyframes tourPulse {
  0%,100% { box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-md); }
  50%     { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 18%, transparent), var(--shadow-md); }
}

.node.is-tagged {
  border-color: var(--ink);
  background: #eef0f2;
  box-shadow: 0 0 0 3px rgba(17, 20, 24, 0.12);
}
.node.is-dimmed {
  opacity: 0.32;
  filter: saturate(0.6);
}

/* numbered badge */
.node .num {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.node.is-selected .num,
.node.is-tour-active .num {
  background: var(--accent);
}
.node.is-tagged .num { background: var(--ink); }

/* expand chevron — bottom of node when has children */
.node .expander {
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 1.5px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  pointer-events: none; /* clicks bubble to node */
  transition: background 160ms ease, color 160ms ease;
}
.node.is-expanded .expander {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

/* SVG connector layer */
.connectors {
  position: absolute;
  left: 0; top: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.connectors path {
  fill: none;
  stroke: #9ba0a6;
  stroke-width: 1.2;
}
.connectors circle {
  fill: white;
  stroke: #9ba0a6;
  stroke-width: 1.5;
}
.connectors path.is-highlight {
  stroke: var(--accent);
  stroke-dasharray: 4 4;
}
/* Connector along the active selection path */
.connectors path.on-path {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: none;
}
.connectors circle.on-path {
  stroke: var(--accent);
  fill: var(--accent);
}

/* Sit nodes above connectors */
.layer-track .node { z-index: 2; }

/* ===================================================================
   Right info panel
   =================================================================== */

.info-panel {
  background: var(--bg-elev);
  border-left: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.info-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
}
.info-head .info-kind {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.info-head .spacer { flex: 1; }
.info-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--muted);
}
.info-close:hover { background: #f3f4f6; color: var(--ink); }

.info-body {
  padding: 8px 22px 24px;
  overflow: auto;
  flex: 1;
}

.info-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 14px 0 4px;
  line-height: 1.2;
}
.info-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

.info-section {
  margin-top: 18px;
}
.info-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
  font-family: var(--font-mono);
}
.info-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.kv-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  font-size: 13px;
}
.kv-grid dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  align-self: center;
}
.kv-grid dd {
  margin: 0;
  color: var(--ink);
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  font-size: 12px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.chip .swatch {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--chip-color, #ccc);
}

.tag-node-list {
  margin: 0; padding: 0; list-style: none;
}
.tag-node-list li {
  display: block;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13px;
  cursor: pointer;
  transition: background 120ms ease;
  border-radius: 6px;
  margin-left: -8px;
  margin-right: -8px;
}
.tag-node-list li:hover { background: #f7f7f9; }
.tag-node-list li:last-child { border-bottom: none; }
.tag-node-list .node-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}
.tag-node-list .node-layer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  align-self: center;
}
.tag-node-list .node-desc {
  grid-column: 1 / -1;
  color: var(--ink-2);
  line-height: 1.45;
}

/* Tour controls */
.tour-controls {
  border-top: 1px solid var(--line-2);
  padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
}
.tour-controls .progress {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.tour-step-bar {
  height: 3px;
  background: var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.tour-step-bar > div {
  height: 100%;
  background: var(--accent);
  transition: width 220ms ease;
}

/* ===================================================================
   Toasts / empty state
   =================================================================== */

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: var(--muted);
  font-size: 13px;
}
.empty-state .es-card {
  background: white;
  border: 1px dashed var(--line);
  padding: 26px 30px;
  border-radius: 14px;
  pointer-events: auto;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.empty-state .es-card h3 {
  font-size: 16px; margin: 0 0 6px; color: var(--ink);
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 8px);
  background: var(--ink);
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms ease, opacity 200ms ease;
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===================================================================
   Responsive — info panel goes below
   =================================================================== */

@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; grid-template-rows: 1fr 0; }
  .main.has-info {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 50vh;
  }
  .info-panel { border-left: none; border-top: 1px solid var(--line-2); }

  .topbar { gap: 8px; padding: 10px 12px; }
  .brand small { display: none; }
  .zoom input[type=range] { width: 80px; }
}

/* Accessibility */
.node:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* hidden file input */
.hidden-file { display: none; }

/* ===================================================================
   Welcome panel — initial onboarding with typewriter effect
   =================================================================== */
.welcome-body { padding-bottom: 40px; }
.welcome-title { font-size: 22px; }
.welcome-sub { color: var(--ink-2); }

.welcome-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.welcome-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fcfcfd;
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}
.welcome-list li.tw-active {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 5%, white);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.welcome-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-top: 1px;
}
.welcome-list li.tw-active .welcome-marker {
  background: var(--accent);
}
.welcome-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.welcome-hint {
  margin-top: 22px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f4f6;
  color: var(--ink-2);
  font-size: 12.5px;
  font-style: italic;
}

/* Typewriter cursor */
[data-tw] { position: relative; }
[data-tw].tw-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: tw-blink 600ms steps(1) infinite;
}
@keyframes tw-blink {
  50% { opacity: 0; }
}

/* Spotlight pulse on UI controls referenced in welcome lines.
   Continuous, slow pulse — applied while a welcome line is being typed,
   removed once it's done. */
@keyframes spotlight-pulse {
  0%, 100% { box-shadow: 0 0 0 0   color-mix(in oklab, var(--accent) 55%, transparent); }
  50%      { box-shadow: 0 0 0 10px color-mix(in oklab, var(--accent) 0%,  transparent); }
}
.is-spotlight {
  position: relative;
  border-radius: 10px;
  animation: spotlight-pulse 3200ms ease-in-out infinite;
  z-index: 5;
}
/* Node-level spotlight: keep the rounding the node already has */
.nodes-layer .node.is-spotlight {
  border-radius: var(--node-radius);
}

/* ========== MODUL-FOOTER ========== */
.module-footer {
  position: fixed;
  bottom: 10px;
  left: 12px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.module-footer a {
  color: rgba(0,0,0,0.55);
  text-decoration: none;
  padding: 3px 2px;
  transition: color 120ms ease;
}

.module-footer a:hover {
  color: rgba(0,0,0,0.88);
}

.module-footer-sep {
  color: rgba(0,0,0,0.22);
}

/* ===================================================================
   Ansichts-Tabs: schlichte Textreiter mit Unterstrich
   =================================================================== */
.view-tabs {
  display: flex;
  gap: 28px;
  padding: 0 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-2);
  overflow-x: auto;
}
.view-tab {
  position: relative;
  flex: none;
  padding: 13px 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.view-tab:hover { color: var(--ink); }
.view-tab.is-active { color: var(--ink); font-weight: 600; }
.view-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.view-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===================================================================
   Geführte Ansichten — gemeinsame Bausteine
   =================================================================== */
.guide-view {
  overflow: auto;
  padding: 22px 24px 64px;
  background: var(--bg-elev);
}
.guide-view button { font-family: inherit; }
/* Grundfarbe für Knöpfe ohne Spezifität (:where), damit aktive Zustände wie
   .gv-filter.is-active oder .btn-primary ihre weiße Schrift behalten */
:where(.guide-view) :where(button) { color: var(--ink); }

.gv-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.gv-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.gv-hint { font-size: 13px; color: var(--muted); }
.gv-heading-controls { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Geführte Tour durch die Nutzerreise: breite Erklärspalte rechts */
.gv-workspace.is-tour { grid-template-columns: minmax(0, 1fr) minmax(400px, 34vw); }
.gv-tour-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 150px);
  border: 1px solid var(--accent-ring);
  border-radius: 14px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.gv-tour-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--line-2);
  background: var(--accent-soft);
}
.gv-tour-kicker {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: color-mix(in oklab, var(--accent) 65%, black);
}
.gv-tour-head .info-close { font-size: 18px; line-height: 1; color: var(--ink-2); }
.gv-tour-body {
  flex: 1;
  overflow: auto;
  padding: 22px 22px 18px;
  animation: gvTourIn 260ms cubic-bezier(.2,.7,.2,1);
}
@keyframes gvTourIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.gv-tour-badge {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.gv-tour-badge.is-intro { background: var(--ink); box-shadow: 0 0 0 5px #eceef1; }
.gv-tour-title { margin: 16px 0 6px; font-size: 23px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.gv-tour-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.gv-tour-text { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }
.gv-tour-section { margin-top: 22px; }
.gv-tour-section h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.gv-tour-cap {
  padding: 12px 14px;
  border: 1px solid #e2e4e8;
  border-radius: 10px;
  background: #fafafa;
}
.gv-tour-cap + .gv-tour-cap { margin-top: 8px; }
.gv-tour-cap.is-on { border-color: var(--accent); background: var(--accent-soft); }
.gv-tour-cap-name {
  padding: 0;
  border: 0;
  background: none;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.gv-tour-cap-name:hover { text-decoration: underline; }
.gv-tour-cap-desc { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.gv-tour-cap .gv-chip-list { margin-top: 9px; }
.gv-chip.is-on { border-color: var(--accent); background: var(--accent-soft); }
.gv-tour-picked { padding: 12px 14px; border-left: 3px solid var(--accent); background: #fbfaff; border-radius: 0 8px 8px 0; }
.gv-tour-picked h4 { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.gv-tour-picked p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.gv-tour-next {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.gv-tour-next:hover { border-color: var(--accent); background: var(--accent-soft); }
.gv-tour-next-label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.gv-tour-next-name { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.gv-tour-next-arrow { color: var(--accent); font-weight: 600; }
.gv-tour-done {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f8f3;
  color: #1f6b3a;
  font-size: 13.5px;
  font-weight: 500;
}
.gv-tour-steps { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.gv-tour-steplink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.gv-tour-steplink:hover { background: #f3f4f6; }
.gv-tour-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
  background: var(--bg-elev);
}
.gv-tour-progress {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
/* Stepper während der Tour: bereits besuchte Schritte */
.gv-step.is-done .gv-step-num { border-color: var(--accent); color: color-mix(in oklab, var(--accent) 70%, black); }
.gv-step.is-done::before { border-top-color: var(--accent-ring); }
.gv-step.is-active .gv-step-num { box-shadow: 0 0 0 4px #eceef1; }

.gv-segmented {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
}
.gv-segmented button {
  border: 0;
  background: transparent;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink-2);
}
.gv-segmented button.is-active { background: var(--ink); color: white; }

.gv-empty, .gv-empty-inline {
  color: var(--muted);
  font-size: 13px;
}
.gv-empty {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}

/* Knoten-Buttons: dezente Rahmen, Auswahl lila */
.gv-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  background: var(--bg-elev);
  text-align: left;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.gv-node:hover { border-color: #b9bdc4; }
.gv-node.is-cap {
  justify-content: center;
  min-height: 46px;
  background: #fafafa;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.gv-node.is-leaf { min-height: 38px; font-size: 14px; font-weight: 400; }
.gv-node.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.gv-node-label { min-width: 0; }
.gv-node-note {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.gv-node:focus-visible,
.gv-step:focus-visible,
.gv-focus-root:focus-visible,
.gv-chip:focus-visible,
.gv-card-head:focus-visible,
.gv-usage-row:focus-visible,
.gv-trace-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.gv-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-elev);
  font-size: 12.5px;
  line-height: 1.3;
  cursor: pointer;
}
.gv-chip:hover { border-color: var(--ink); }

/* Tags: neutrale Chips */
.gv-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  line-height: 1.4;
}
.gv-tag.is-toggle { cursor: pointer; }
.gv-tag.is-toggle:hover { border-color: var(--ink); }
.gv-tag.is-on { background: var(--ink); border-color: var(--ink); color: white; }

.gv-link {
  padding: 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.gv-link:hover { text-decoration: underline; }

/* ===================================================================
   Gesamtarchitektur
   =================================================================== */

/* Schrittleiste als Stepper: Punkte auf einer Linie */
.gv-stepper {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(104px, 1fr);
  overflow-x: auto;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}
.gv-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 6px;
  border: 0;
  background: none;
  text-align: center;
  cursor: pointer;
}
/* Verbindungslinie zum Nachbarn (von Mitte zu Mitte) */
.gv-step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0; right: 0;
  border-top: 2px solid var(--line);
  z-index: 0;
}
.gv-step.is-first::before { left: 50%; }
.gv-step.is-last::before { right: 50%; }
.gv-step.is-first.is-last::before { display: none; }
.gv-step-num {
  position: relative;
  z-index: 1;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1.5px solid #b8bcc2;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  transition: border-color 120ms ease, color 120ms ease;
}
.gv-step-name { font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.gv-step:hover .gv-step-num { border-color: var(--ink); color: var(--ink); }
.gv-step.is-active .gv-step-num { background: var(--ink); border-color: var(--ink); color: white; }
.gv-step.is-active .gv-step-name { color: var(--ink); font-weight: 600; }
.gv-step-add .gv-step-num { border-style: dashed; }

.gv-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}
.gv-panel { min-width: 0; }

/* Fokusbaum: Schritt oben, Fähigkeiten nebeneinander, Lösungen darunter */
.gv-focus { padding: 4px 0 24px; overflow-x: auto; }
.gv-focus-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}
.gv-focus-root:hover .gv-focus-title { text-decoration: underline; text-underline-offset: 3px; }
.gv-focus-root.is-selected .gv-focus-title { color: color-mix(in oklab, var(--accent) 70%, black); }
.gv-focus-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; text-align: center; }
.gv-focus-sub { font-size: 13.5px; color: var(--muted); text-align: center; }
.gv-focus-stem { width: 0; height: 18px; margin: 6px auto 0; border-left: 1.2px solid #9ba0a6; }

.gv-branches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--branch-count, 1), minmax(220px, 1fr));
  gap: 40px;
  padding-top: 18px;
}
/* waagerechte Linie zwischen den Mitten der äußeren Fähigkeiten */
.gv-branches.has-multiple::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc((100% - (var(--branch-count) - 1) * 40px) / var(--branch-count) / 2);
  right: calc((100% - (var(--branch-count) - 1) * 40px) / var(--branch-count) / 2);
  border-top: 1.2px solid #9ba0a6;
}
.gv-branch { position: relative; min-width: 0; }
/* senkrechte Linie mittig auf die Fähigkeit */
.gv-branch::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  height: 18px;
  border-left: 1.2px solid #9ba0a6;
}
/* Lösungen: jede Zeile zeichnet ihr eigenes Linienstück (├ bzw. └),
   damit die Linie genau beim letzten Element endet. */
.gv-leaf-tree {
  --gap: 8px;
  --mid: 19px;   /* halbe Zeilenhöhe */
  --lead: 10px;  /* Abstand zur Fähigkeit */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin: 0 0 0 18px;
  padding: var(--lead) 0 0 16px;
}
.gv-leaf-item { position: relative; }
.gv-leaf-item::before {
  content: "";
  position: absolute;
  left: -16px;
  top: calc(-1 * var(--gap));
  width: 16px;
  height: calc(var(--gap) + var(--mid));
  border-left: 1.2px solid #9ba0a6;
  border-bottom: 1.2px solid #9ba0a6;
}
.gv-leaf-item:first-child::before {
  top: calc(-1 * var(--lead));
  height: calc(var(--lead) + var(--mid));
}
.gv-leaf-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -16px;
  top: var(--mid);
  bottom: 0;
  border-left: 1.2px solid #9ba0a6;
}
.gv-leaf-tree > .gv-empty-inline { font-size: 12px; padding: 6px 0; }

/* Alle Verbindungen */
.gv-all { overflow-x: auto; padding: 4px 0 20px; }
.gv-lanes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 250px;
  gap: 14px;
  width: max-content;
}
.gv-lane {
  padding: 12px;
  border: 1px solid #e2e4e8;
  border-radius: 10px;
  background: var(--bg-elev);
}
.gv-lane.is-current { border-color: var(--ink); }
.gv-lane-role {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.gv-lane .gv-node.is-step { font-weight: 600; background: #fafafa; }
.gv-lane .gv-node.is-cap { justify-content: flex-start; text-align: left; font-size: 13.5px; min-height: 40px; }
.gv-lane-stem { width: 0; height: 14px; margin-left: 20px; border-left: 1.2px solid #9ba0a6; }
.gv-lane-tree { margin-left: 20px; padding-left: 11px; }
.gv-lane-cap { position: relative; margin-bottom: 12px; }
.gv-lane-cap:last-child { margin-bottom: 0; }
/* ├ bzw. └ zur Fähigkeit, Linie endet bei der letzten */
.gv-lane-cap::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 0;
  width: 11px;
  height: 20px;
  border-left: 1.2px solid #9ba0a6;
  border-bottom: 1.2px solid #9ba0a6;
}
.gv-lane-cap:not(:last-child)::after {
  content: "";
  position: absolute;
  left: -11px;
  top: 20px;
  bottom: -12px;
  border-left: 1.2px solid #9ba0a6;
}
.gv-lane-cap .gv-leaf-tree { --gap: 4px; --lead: 6px; }

/* Detailspalte: ohne Kasten, nur Trennlinie */
.gv-detail {
  position: sticky;
  top: 0;
  padding: 2px 0 8px 24px;
  border-left: 1px solid var(--line-2);
}
.gv-detail > .gv-empty-inline { padding: 8px 0; }
.gv-detail-kind {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
}
.gv-detail-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.gv-detail-sub { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.gv-detail-section { margin-top: 20px; }
.gv-detail-section h4 { margin: 0 0 7px; font-size: 12px; font-weight: 500; color: var(--muted); }
.gv-detail-section p { margin: 0; font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.gv-usage-list { display: flex; flex-direction: column; gap: 4px; }
.gv-usage-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 0;
  border: 0;
  background: none;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.gv-usage-row:hover .gv-usage-text { text-decoration: underline; }
.gv-usage-num {
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
}
.gv-usage-text { white-space: pre-wrap; }
.gv-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

/* ===================================================================
   Landkarte
   =================================================================== */
.gv-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gv-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.gv-filter:hover { border-color: var(--ink); }
.gv-filter.is-active { background: var(--ink); border-color: var(--ink); color: white; }
.gv-filter-count { font-family: var(--font-mono); font-size: 11px; opacity: 0.6; }

.gv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.gv-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg-elev);
}
.gv-search:focus-within { border-color: var(--ink); }
.gv-search-icon { color: var(--muted); font-size: 14px; }
.gv-search input {
  flex: 1;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
}
.gv-result-count { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.gv-groups { display: flex; flex-direction: column; gap: 12px; }
.gv-group {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg-elev);
  overflow: hidden;
}
.gv-group-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}
.gv-group-summary::-webkit-details-marker { display: none; }
.gv-group[open] .gv-group-summary { border-bottom: 1px solid var(--line-2); }
.gv-group-order {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}
.gv-group-titles { flex: 1; min-width: 0; }
.gv-group-titles h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.gv-group-titles p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.gv-group-count {
  flex: none;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.gv-group-chevron { flex: none; color: var(--muted); transition: transform 160ms ease; }
.gv-group:not([open]) .gv-group-chevron { transform: rotate(-90deg); }

.gv-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}
.gv-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
  overflow: hidden;
}
.gv-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  background: #f7f7f8;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.gv-card-head:hover { background: #f0f0f2; }
.gv-card-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 14px; }
.gv-usage { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.gv-step-chip {
  padding: 3px 8px;
  border: 1px solid var(--accent-ring);
  border-radius: 6px;
  background: var(--accent-soft);
  color: color-mix(in oklab, var(--accent) 70%, black);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.gv-step-chip:hover { border-color: var(--accent); }

/* ===================================================================
   Komponentenfokus
   =================================================================== */
.gv-comp-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.gv-comp-browser {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 210px);
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg-elev);
}
.gv-comp-browser .gv-search { width: 100%; }
.gv-comp-count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding: 0 4px; }
.gv-comp-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; }
.gv-comp-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  cursor: pointer;
}
.gv-comp-option:hover { background: #f3f4f6; }
.gv-comp-option.is-active { background: var(--ink); color: white; }
.gv-comp-option em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f3f4f6;
  color: var(--ink-2);
  text-align: center;
}
.gv-comp-option.is-active em { background: rgba(255, 255, 255, 0.18); color: white; }

.gv-comp-detail {
  min-width: 0;
  padding: 20px 22px 22px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg-elev);
}
.gv-comp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.gv-comp-head h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.gv-comp-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.gv-comp-pill {
  flex: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.gv-comp-desc { margin: 14px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }

.gv-trace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.15fr);
  gap: 8px;
  margin: 18px 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.gv-trace-head span:last-child { grid-column: 3; }
.gv-trace-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1.15fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.gv-trace-node {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
  text-align: left;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.gv-trace-node:hover { border-color: var(--ink); }
.gv-trace-node.is-cap { border-color: var(--accent-ring); background: var(--accent-soft); }
.gv-trace-node.is-cap:hover { border-color: var(--accent); }
.gv-trace-domain { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.gv-trace-arrow { position: relative; height: 0; border-top: 1.5px solid #9ba0a6; }
.gv-trace-arrow::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -5.5px;
  border-left: 6px solid #9ba0a6;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}
.gv-target {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: var(--bg-elev);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.gv-target::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -19px;
  height: 17px;
  border-left: 1.5px solid #9ba0a6;
}
.gv-note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f4f4f6;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ===================================================================
   Responsive — geführte Ansichten
   =================================================================== */
@media (max-width: 1100px) {
  .gv-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .view-tabs { gap: 20px; padding: 0 16px; }
  .guide-view { padding: 16px 16px 64px; }
  .gv-heading { flex-wrap: wrap; }
  .gv-heading-controls { margin-left: 0; flex-wrap: wrap; }
  .gv-workspace.is-tour { grid-template-columns: 1fr; }
  .gv-tour-panel { position: static; max-height: none; }
  .gv-workspace,
  .gv-comp-workspace { grid-template-columns: 1fr; }
  .gv-detail, .gv-comp-browser { position: static; }
  .gv-detail { padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line-2); }
  .gv-comp-browser { max-height: 280px; }
  .gv-toolbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 560px) {
  .gv-trace-head, .gv-trace-row { grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 5px; }
  .gv-trace-node { font-size: 12.5px; padding: 8px 10px; }
  .gv-cards { grid-template-columns: 1fr; padding: 12px; }
}

/* ===================================================================
   Bearbeiten im Visualisierer
   =================================================================== */
.draft-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}
.draft-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.btn:disabled { opacity: 0.4; cursor: default; }
.gv-btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* Bearbeiten-Modus: dezente Markierung der Arbeitsfläche */
body.is-editing .guide-view { background: color-mix(in oklab, var(--accent) 3%, var(--bg)); }
body.is-editing .gv-panel,
body.is-editing .gv-detail { border-color: var(--accent-ring); }

.gv-step-add .gv-step-name { color: var(--muted); }
.gv-step-add:hover .gv-step-name { color: var(--ink); }

.gv-adder { width: 100%; }
.gv-add-btn {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.gv-add-btn:hover { border-color: var(--ink); color: var(--ink); }
.gv-branch.is-adder .gv-add-btn { min-height: 46px; text-align: center; }
.gv-add-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--accent-ring);
  border-radius: 10px;
  background: var(--bg-elev);
}
.gv-add-actions { display: flex; gap: 6px; }

/* Formularfelder */
.gv-field { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.gv-field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.gv-field-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.gv-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
}
textarea.gv-input { min-height: 84px; resize: vertical; }
.gv-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.gv-shared-note {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: color-mix(in oklab, var(--accent) 60%, black);
  font-size: 12.5px;
  line-height: 1.45;
}
.gv-tag-edit { display: flex; flex-direction: column; gap: 8px; }
.gv-tag-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-tag-add { display: flex; gap: 6px; }
.gv-tag-add .gv-input { padding: 5px 9px; font-size: 13px; }
.gv-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.gv-edit-row { display: flex; gap: 6px; }
.gv-edit .gv-detail-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gv-danger {
  padding: 6px 10px;
  border: 1px solid #e3b4b4;
  border-radius: 8px;
  background: var(--bg-elev);
  color: #b42318;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.gv-danger:hover { background: #fdf2f2; border-color: #b42318; }

.gv-icon-btn {
  flex: none;
  width: 28px; height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.gv-icon-btn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink); }
.gv-icon-btn:disabled { opacity: 0.35; cursor: default; }

/* Domänen verwalten (Landkarte) */
.gv-domain-manager {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--accent-ring);
  border-radius: 14px;
  background: var(--bg-elev);
}
.gv-dm-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.gv-dm-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.gv-dm-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.gv-dm-row {
  display: grid;
  grid-template-columns: 30px minmax(140px, 1fr) minmax(160px, 1.6fr) 28px 28px 28px 28px;
  gap: 6px;
  align-items: center;
}
.gv-dm-row .gv-input { padding: 5px 9px; font-size: 13px; }
.gv-dm-usage {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* Karte mit Domänen-Auswahl */
.gv-card-headrow {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-2);
  background: #f7f7f8;
}
.gv-card-headrow .gv-card-head { border-bottom: 0; flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .gv-dm-row { grid-template-columns: 30px 1fr 28px 28px 28px; }
  .gv-dm-row .gv-input:nth-of-type(2), .gv-dm-usage { display: none; }
  .edit-actions .draft-badge { display: none; }
}

/* ===================================================================
   Tab „Modell“ (werkstatt.js) — nur im Bearbeiten-Modus
   =================================================================== */
.view-tab-modell { margin-left: auto; color: color-mix(in oklab, var(--accent) 70%, black); }
.wk {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.wk-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wk-nav-item {
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 13.5px;
  text-align: left;
  color: var(--ink-2);
  cursor: pointer;
}
.wk-nav-item:hover { background: #f3f4f6; color: var(--ink); }
.wk-nav-item.is-active { background: var(--ink); color: white; font-weight: 600; }
.wk-main { min-width: 0; }
.wk-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 14px; }
.wk-head-actions { margin-left: auto; display: flex; gap: 4px; }
.wk-lead { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Gliederung + Formular */
.wk-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.wk-tree { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.wk-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding-right: 8px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  cursor: pointer;
  user-select: none;
}
.wk-row:hover { background: #f7f7f8; }
.wk-row.is-selected { background: var(--accent-soft); }
.wk-row.is-hidden .wk-label { color: var(--muted); font-style: italic; }
.wk-row.is-dragging { opacity: 0.4; }
.wk-row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.wk-row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.wk-row.drop-into { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.wk-handle { flex: none; width: 14px; color: #b8bcc2; cursor: grab; font-size: 12px; text-align: center; }
.wk-row:hover .wk-handle { color: var(--muted); }
.wk-toggle {
  flex: none;
  width: 20px; height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.wk-toggle:hover { background: #e9eaec; color: var(--ink); }
.wk-toggle.is-empty { cursor: default; }
.wk-label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-label .gv-node-label { overflow: hidden; text-overflow: ellipsis; }
.wk-count {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: #eceef1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}
.wk-layer {
  flex: none;
  max-width: 150px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ba0a6;
}
.wk-row-actions { flex: none; width: 24px; display: flex; justify-content: flex-end; }
.wk-icon {
  width: 22px; height: 22px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
}
.wk-row:hover .wk-icon, .wk-row.is-selected .wk-icon, .wk-icon:focus-visible { opacity: 1; }
.wk-icon:hover { border-color: var(--line); color: var(--ink); background: white; }
.wk-add-root {
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}
.wk-add-root:hover { border-color: var(--ink); color: var(--ink); }
.wk-empty { padding: 14px 4px; }
.wk-form { position: sticky; top: 0; }

/* Listen (Ebenen, Tags) */
.wk-panel { max-width: 860px; }
.wk-lock { margin: 0 0 14px; }
.wk-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.wk-list-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}
.wk-layer-row { grid-template-columns: 30px minmax(0, 1fr) 220px 90px 28px; }
.wk-tag-row { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.4fr) 90px 28px 28px 28px; }
.wk-usage { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.wk-add { margin-top: 12px; }
.wk-file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.wk-panel .gv-domain-manager { margin: 0; padding: 0; border: 0; background: none; }

/* Formular: Darstellung */
.gv-edit-look { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.gv-color { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 5px; background: none; cursor: pointer; }

@media (max-width: 1100px) {
  .wk-split { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
  .wk { grid-template-columns: 1fr; gap: 14px; }
  .wk-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .wk-split { grid-template-columns: 1fr; }
  .wk-form { position: static; }
  .wk-layer-row { grid-template-columns: 30px minmax(0, 1fr) 28px; }
  .wk-layer-row select, .wk-layer-row .wk-usage { grid-column: 2; }
  .wk-tag-row { grid-template-columns: 30px minmax(0, 1fr) 28px 28px 28px; }
  .wk-tag-row .gv-input:nth-of-type(2), .wk-tag-row .wk-usage { display: none; }
  .wk-layer { display: none; }
}

/* ===================================================================
   Bearbeitungsleiste am rechten Rand: alle Menüpunkte der Anwendung
   =================================================================== */
.app { padding-right: 68px; }
.embed-mode .app { padding-right: 0; }
.side-rail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 40;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 0 12px;
  border-left: 1px solid var(--line-2);
  background: var(--bg-elev);
}
.rail-btn {
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 6px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.rail-btn:hover { background: #f3f4f6; color: var(--ink); }
.rail-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rail-btn:disabled { opacity: 0.35; cursor: default; background: none; }
.rail-btn.is-active { background: var(--ink); color: white; }
.rail-ic { width: 20px; height: 20px; }
.rail-label { font-size: 10.5px; font-weight: 500; line-height: 1.1; }
.rail-sep { width: 28px; height: 1px; margin: 6px 0; background: var(--line-2); }
.rail-spacer { flex: 1; }
.rail-draft {
  margin-bottom: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: color-mix(in oklab, var(--accent) 65%, black);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.side-rail [hidden] { display: none !important; }

/* ===================================================================
   Tag-Filter (in jeder Ansicht unter der Kopfzeile)
   =================================================================== */
.gv-tagfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: -4px 0 18px;
}
.canvas-head .gv-tagfilter { margin: 0; padding: 0 0 14px; }
.gv-tagfilter-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.gv-tagfilter-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gv-tagfilter-count { font-size: 12.5px; color: var(--muted); }
.gv-tagfilter-clear {
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}
.gv-tagfilter-clear:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .app { padding-right: 0; padding-bottom: 60px; }
  .side-rail {
    top: auto; left: 0;
    width: auto; height: 60px;
    flex-direction: row;
    justify-content: center;
    padding: 0 8px;
    border-left: 0;
    border-top: 1px solid var(--line-2);
    overflow-x: auto;
  }
  .rail-sep { width: 1px; height: 28px; margin: 0 4px; }
  .rail-spacer { flex: 0 0 8px; }
}

/* ===================================================================
   Runde 9: Ansichtswechsel in der Leiste, Tag-Farben, Tour-Hervorhebung,
   Perspektive in der Nutzerreise, Domänen-Kennzeichnung
   =================================================================== */
/* Die Tabs oben entfallen – Ansichten stehen in der Leiste rechts */
.rail-views { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rail-view.is-active { background: #eceef1; color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.rail-view-modell { color: color-mix(in oklab, var(--accent) 70%, black); }
.rail-view-modell.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.rail-label { text-align: center; hyphens: manual; }
@media (max-width: 900px) {
  .rail-views { flex-direction: row; }
  .rail-view.is-active { box-shadow: inset 0 -3px 0 var(--ink); }
}

/* Tags mit Farbe */
.gv-tag { gap: 6px; }
.gv-tag-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--tag-color, #9ba0a6); }
.gv-tag.is-on {
  background: color-mix(in oklab, var(--tag-color, var(--ink)) 16%, white);
  border-color: var(--tag-color, var(--ink));
  color: var(--ink);
}
.gv-tag.is-toggle:hover { border-color: var(--tag-color, var(--ink)); }

/* Treffer des Tag-Filters: in der Tag-Farbe hervorgehoben (alle Ansichten) */
.is-tag-hit {
  border-color: var(--tag-color) !important;
  background: color-mix(in oklab, var(--tag-color) 13%, white) !important;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--tag-color) 30%, white);
}
.gv-step.is-tag-hit { background: none !important; box-shadow: none; }
.gv-step.is-tag-hit .gv-step-num { border-color: var(--tag-color); background: color-mix(in oklab, var(--tag-color) 18%, white); color: var(--ink); }
.gv-focus-root.is-tag-hit { box-shadow: none; }
.node.is-tagged {
  border-color: var(--tag-color, var(--ink));
  background: color-mix(in oklab, var(--tag-color, var(--ink)) 13%, white);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--tag-color, var(--ink)) 25%, white);
}
.node.is-tagged .num { background: var(--tag-color, var(--ink)); }

/* Aktuelle Station der geführten Tour (Akzentfarbe) */
.is-tour-hit {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  box-shadow: 0 0 0 4px var(--accent-ring) !important;
  animation: gvTourPulse 1.8s ease-in-out infinite;
}
@keyframes gvTourPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-ring); }
  50%      { box-shadow: 0 0 0 7px color-mix(in oklab, var(--accent) 18%, transparent); }
}
.gv-step.is-tour-hit { background: none !important; box-shadow: none !important; animation: none; }
.gv-step.is-tour-hit .gv-step-num { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 0 4px var(--accent-ring); }
.gv-focus-root.is-tour-hit { border-radius: 12px; }
.gv-lane.is-tour-hit { animation: none; }
.gv-chip.is-tour-item { border-style: dashed; border-color: var(--accent); }

/* Tour-Karte: Einordnung und Liste der Stationen */
.gv-tour-meta { display: flex; align-items: center; gap: 12px; }
.gv-tour-where { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gv-tour-layer { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.gv-tour-path { font-size: 12.5px; color: var(--ink-2); }
.gv-tour-steplink-text { display: flex; flex-direction: column; min-width: 0; }
.gv-tour-steplink-text small { font-size: 11px; color: var(--muted); }
/* Tour-Karte in den Swimlanes: füllt die rechte Spalte */
.info-panel > .gv-tour-panel { height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; position: static; }

/* Nutzerreise: Perspektive als dezentes Band über dem Stepper */
.gv-journey { overflow-x: auto; margin-bottom: 22px; border-bottom: 1px solid var(--line-2); }
.gv-journey .gv-stepper { overflow: visible; margin-bottom: 0; border-bottom: 0; }
.gv-focus-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* Seitenspalte nur, wenn etwas gewählt ist */
.gv-workspace.no-side { grid-template-columns: minmax(0, 1fr); }

/* Fähigkeiten: Domänen klar gekennzeichnet */
.gv-group-badge {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-family: var(--font-mono);
  line-height: 1.1;
}
.gv-group-badge small { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.gv-group-badge span { font-size: 14px; font-weight: 600; }

/* Swimlanes: gleicher Hintergrund wie die übrigen Ansichten */
.canvas-view, .graph-wrap, .graph-stage, .main { background: var(--bg-elev); }
.layer-row { background: var(--bg-elev) !important; }

/* ===================================================================
   Runde 10: Perspektive als ruhige Zone im Stepper, gegliederte Leiste
   =================================================================== */
/* Perspektive: Fläche statt Linien. Die Zone liegt hinter den Schritten,
   die Beschriftung steht oben in der Zone; andere Perspektiven leicht getönt. */
.gv-journey { padding-bottom: 6px; }
.gv-stepper.has-zones { grid-template-rows: 26px auto; padding-bottom: 0; }
.gv-stepper.has-zones .gv-step { grid-row: 2; z-index: 1; padding-bottom: 14px; }
.gv-zone {
  grid-row: 1 / span 2;
  z-index: 0;
  margin: 0 3px;
  padding: 7px 12px 0;
  border-radius: 14px;
}
.gv-zone.is-other { background: #f0f3f7; }
.gv-zone-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a9099;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gv-zone.is-other .gv-zone-label { color: #4f6178; }
.gv-zone.is-other + .gv-step::before,
.gv-zone.is-other ~ .gv-step::before { z-index: 0; }

/* Tour-Karte: knapp */
.gv-tour-badge.is-sub { background: white; color: var(--accent); border: 1.5px solid var(--accent); box-shadow: none; }
.gv-tour-text { font-size: 15px; line-height: 1.65; color: var(--ink); margin-top: 14px; }

/* Modell → Tags: Sonder-Tag */
.wk-system { margin-top: 28px; }
.wk-subhead { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.wk-system .wk-lead { margin-bottom: 12px; }
.wk-tag-row.is-system { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1.4fr) 90px; }
.wk-tag-icon { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.wk-stations { margin: 12px 0 0; padding: 0 0 0 22px; columns: 2; column-gap: 24px; font-size: 13px; }
.wk-stations li { margin: 0 0 4px; break-inside: avoid; color: var(--muted); }
.wk-station { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.wk-station:hover { text-decoration: underline; }

/* Leiste rechts: drei beschriftete Gruppen mit Luft dazwischen */
.side-rail { gap: 1px; padding-top: 12px; }
.rail-caption {
  margin: 2px 0 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #9ba0a6;
}
.rail-sep { width: 40px; height: 1px; margin: 10px 0 8px; background: var(--line-2); }
.rail-views { gap: 1px; }
@media (max-width: 900px) {
  .rail-caption { display: none; }
  .rail-sep { width: 1px; height: 32px; margin: 0 6px; }
}

/* Perspektive: beide Zonen dezent getönt (Bürger:innen warm, Verwaltung kühl) */
.gv-zone { background: #f8f5ef; }
.gv-zone .gv-zone-label { color: #85704c; }
.gv-zone.is-other { background: #eef2f7; }
.gv-zone.is-other .gv-zone-label { color: #4f6178; }
/* Tour-Station „Perspektive“: Zone farbig unterlegt */
.gv-zone.is-tour-zone {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
  animation: gvZonePulse 1.8s ease-in-out infinite;
}
.gv-zone.is-tour-zone .gv-zone-label { color: color-mix(in oklab, var(--accent) 70%, black); font-weight: 600; }
@keyframes gvZonePulse {
  0%, 100% { box-shadow: inset 0 0 0 1.5px var(--accent); }
  50%      { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 5px color-mix(in oklab, var(--accent) 16%, transparent); }
}
.gv-tour-space { padding: 40px 0; text-align: center; font-size: 13px; color: var(--muted); }
