/* NEXUS GRAPH – schwebende Bedienelemente über der Bühne.
   Dunkles, halbtransparentes Glas mit feiner Kristall-Oberkante, Krypton-Blau als einziger Akzent.
   Kein Element hier bildet einen Stapelkontext um das Logo (mix-blend-mode: screen im Präsentationstitel). */

.inhalt.voll > .ansicht { height: 100%; }

.nx {
  --glas: rgba(7, 12, 21, 0.66);
  --glas-hell: rgba(14, 22, 36, 0.78);
  --glas-kante: rgba(121, 191, 255, 0.14);
  --glas-licht: inset 0 1px 0 rgba(184, 217, 255, 0.12);
  position: relative; height: 100%; min-height: 440px; overflow: hidden;
  background: #020306; color: var(--ink-2); font-size: 13px;
}
.nx.vollbild, .nx:fullscreen { height: 100vh; }
.nx-buehne { position: absolute; inset: 0; }
.nx-leinwand canvas { position: absolute; inset: 0; display: block; touch-action: none; outline: none; cursor: move; }
.nx-tip {
  position: absolute; left: 0; top: 0; pointer-events: none; max-width: 320px;
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--ink);
  background: rgba(6, 11, 20, 0.92); border: 1px solid var(--glas-kante); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Glas-Grundform für alle schwebenden Teile */
.nx-leiste > *, .nx-panel, .nx-schiene, .nx-karte, .nx-iso, .nx-dock, .nx-dock-pop {
  background: linear-gradient(180deg, rgba(20, 32, 52, 0.42), rgba(6, 10, 18, 0.2)), var(--glas);
  border: 1px solid var(--glas-kante);
  box-shadow: var(--glas-licht), 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

/* ---------- Knöpfe ---------- */
.nx-knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--ink-2);
  font-size: 12.5px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.2s;
}
.nx-knopf:hover:not(:disabled) { background: rgba(121, 191, 255, 0.1); color: var(--ink); }
.nx-knopf:focus-visible, .nx-aktion:focus-visible, .nx-modi button:focus-visible, .nx-sektion-kopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.nx-knopf:disabled { opacity: 0.38; cursor: default; }
.nx-knopf.rund { width: 36px; height: 36px; padding: 0; }
.nx-knopf.mini { width: 28px; height: 28px; padding: 0; }
.nx-knopf.breit { width: 100%; margin-top: 10px; border-color: var(--glas-kante); }
.nx-knopf.primaer { background: var(--chrom); color: #04111f; font-weight: 600; }
.nx-knopf.primaer:hover { background: var(--chrom); filter: brightness(1.06); color: #04111f; }
.nx-knopf.gefahr:hover { color: var(--err); background: rgba(229, 134, 126, 0.1); }
.nx-knopf.an, .nx-knopf[aria-pressed="true"] { color: var(--akzent-hell); background: rgba(121, 191, 255, 0.14); border-color: rgba(121, 191, 255, 0.35); box-shadow: 0 0 18px -6px rgba(121, 191, 255, 0.7); }

/* ---------- Toolbar ---------- */
.nx-leiste {
  position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px;
  pointer-events: none; overflow-x: auto; scrollbar-width: none;
}
.nx-leiste::-webkit-scrollbar { display: none; }
.nx-leiste > * { pointer-events: auto; flex: none; border-radius: 999px; }
.nx-marke { display: flex; align-items: baseline; gap: 10px; height: 40px; padding: 0 16px; align-content: center; flex-wrap: wrap; }
.nx-marke b { font: 11px var(--display); letter-spacing: 0.28em; color: var(--akzent-hell); line-height: 40px; }
.nx-marke span { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; line-height: 40px; }
.nx-gruppe { display: flex; gap: 2px; padding: 2px; }
.nx-modi { display: flex; gap: 2px; padding: 3px; }
.nx-modi button {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; border: 0;
  background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: color 0.15s, background 0.2s;
}
.nx-modi button:hover { color: var(--ink); }
.nx-modi button.an { background: var(--chrom); color: #04111f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 18px -10px rgba(121, 191, 255, 0.9); }
.nx-suche { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 14px; min-width: 200px; flex: 1 1 220px !important; max-width: 340px; color: var(--muted); }
.nx-suche input { flex: 1; min-width: 0; height: 30px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; color: var(--ink); font-size: 13px; outline: none; }
.nx-suche kbd { font-size: 11px; color: var(--faint); border: 1px solid var(--glas-kante); border-radius: 6px; padding: 1px 6px; }
.nx-preset-knopf {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; color: var(--ink-2); font-size: 12.5px; cursor: pointer;
  max-width: 230px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.nx-preset-knopf span { overflow: hidden; text-overflow: ellipsis; }
.nx-preset-knopf:hover { color: var(--ink); }

/* ---------- Panel ---------- */
.nx-panel {
  position: absolute; top: 64px; right: 12px; bottom: 12px; width: 324px; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 20px; padding: 6px 6px 12px; scrollbar-width: thin; scrollbar-color: rgba(121, 191, 255, 0.25) transparent;
  animation: nx-rein 0.24s var(--ease);
}
@keyframes nx-rein { from { opacity: 0; transform: translateX(10px); } }
.nx-panel-kopf { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 14px; }
.nx-panel-kopf b { font: 10px var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }
.nx-sektion { border-top: 1px solid rgba(121, 191, 255, 0.08); }
.nx-sektion-kopf {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; padding: 0 12px; border: 0; background: transparent;
  color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; border-radius: 12px;
}
.nx-sektion-kopf:hover { color: var(--ink); background: rgba(121, 191, 255, 0.05); }
.nx-sektion-kopf > span { flex: 1; text-align: left; }
.nx-sektion-kopf .icon { color: var(--akzent); }
.nx-pfeil { transition: transform 0.2s var(--ease); color: var(--faint) !important; }
.nx-sektion.auf .nx-pfeil { transform: rotate(90deg); }
.nx-sektion-inhalt { display: none; padding: 2px 8px 12px; }
.nx-sektion.auf .nx-sektion-inhalt { display: block; animation: erscheinen 0.2s var(--ease); }
.nx-panel h4 { display: flex; justify-content: space-between; margin: 14px 6px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nx-panel h4 span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); }
.nx-hilfe { margin: 8px 6px 0; color: var(--faint); font-size: 11.5px; line-height: 1.5; }
.nx-leer { color: var(--faint); font-size: 12px; margin: 4px 6px; }

.nx-liste { display: grid; gap: 1px; }
.nx-liste[hidden] { display: none; }
.nx-unter-kopf {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; margin-top: 10px; padding: 0 8px;
  border: 0; border-top: 1px solid rgba(121, 191, 255, 0.08); background: transparent; color: var(--muted); cursor: pointer;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.nx-unter-kopf span { flex: 1; text-align: left; }
.nx-unter-kopf em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--faint); }
.nx-unter-kopf:hover { color: var(--ink); }
.nx-unter-kopf[aria-expanded="true"] .nx-pfeil { transform: rotate(90deg); }
.nx-schalter-zeile { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 6px 0 8px; border-radius: 10px; cursor: pointer; }
.nx-schalter-zeile.klein { min-height: 30px; }
.nx-schalter-zeile:hover { background: rgba(121, 191, 255, 0.06); }
.nx-schalter-zeile .nx-name { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-schalter-zeile.klein .nx-name { font-size: 12.5px; }
.nx-zahl { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.nx-punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--f, var(--akzent)); box-shadow: 0 0 10px -1px var(--f, var(--akzent)); }
.nx-punkt.gross { width: 12px; height: 12px; }
.nx-schalter-zeile:has(input:not(:checked)) .nx-punkt { opacity: 0.3; box-shadow: none; }
.nx-schalter-zeile:has(input:not(:checked)) .nx-name { color: var(--muted); }

.nx-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nx-layout-karte {
  display: grid; justify-items: start; gap: 2px; padding: 10px; border-radius: 14px; border: 1px solid rgba(121, 191, 255, 0.1);
  background: rgba(13, 20, 32, 0.6); color: var(--muted); text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.2s;
}
.nx-layout-karte .icon { width: 20px; height: 20px; margin-bottom: 4px; color: var(--ink-2); }
.nx-layout-karte em { font-style: normal; font-size: 9.5px; letter-spacing: 0.14em; color: var(--faint); }
.nx-layout-karte b { color: var(--ink); font-size: 12.5px; }
.nx-layout-karte span { font-size: 10.5px; line-height: 1.35; }
.nx-layout-karte:hover { border-color: rgba(121, 191, 255, 0.3); }
.nx-layout-karte.an { border-color: rgba(121, 191, 255, 0.55); background: rgba(121, 191, 255, 0.1); box-shadow: 0 0 22px -10px rgba(121, 191, 255, 0.9), var(--glas-licht); }
.nx-layout-karte.an .icon { color: var(--akzent-hell); }

.nx-aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.nx-aktion {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent;
  background: rgba(13, 20, 32, 0.55); color: var(--ink-2); font-size: 11.5px; text-align: left; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.nx-aktion .icon { color: var(--akzent); }
.nx-aktion:hover:not(:disabled) { border-color: rgba(121, 191, 255, 0.3); color: var(--ink); }
.nx-aktion:disabled { opacity: 0.35; cursor: default; }
.nx-aktion[aria-pressed="true"] { border-color: rgba(121, 191, 255, 0.5); background: rgba(121, 191, 255, 0.12); color: var(--akzent-hell); }

.nx-regler { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 7px 6px; }
.nx-regler .nx-name { color: var(--ink-2); font-size: 12.5px; }
.nx-regler output { color: var(--akzent-hell); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.nx-regler input[type=range] {
  grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; cursor: pointer;
}
.nx-regler input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--akzent) var(--wert, 50%), rgba(121, 191, 255, 0.14) var(--wert, 50%)); }
.nx-regler input[type=range]::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(121, 191, 255, 0.14); }
.nx-regler input[type=range]::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--akzent); }
.nx-regler input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #e8f3ff;
  box-shadow: 0 0 0 3px rgba(121, 191, 255, 0.25), 0 0 14px rgba(121, 191, 255, 0.6);
}
.nx-regler input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #e8f3ff; box-shadow: 0 0 0 3px rgba(121, 191, 255, 0.25); }
.nx-regler input[type=range]:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 6px; }

.nx-presets { display: grid; gap: 4px; }
.nx-preset { display: flex; align-items: center; gap: 4px; border-radius: 12px; border: 1px solid transparent; background: rgba(13, 20, 32, 0.55); }
.nx-preset.aktiv { border-color: rgba(121, 191, 255, 0.45); background: rgba(121, 191, 255, 0.09); }
.nx-preset-wahl { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 8px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink-2); }
.nx-preset-wahl b { font-size: 12.5px; color: var(--ink); letter-spacing: 0.02em; }
.nx-preset-wahl span { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-preset-aktionen { display: flex; padding-right: 4px; }
.nx-preset-form { display: flex; gap: 6px; margin-top: 10px; }
.nx-preset-form input { flex: 1; min-width: 0; height: 32px; border-radius: 999px !important; padding: 0 14px !important; }

/* ---------- Kamera-Schiene, Hinweis, Auswahl ---------- */
.nx-schiene { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 2px; padding: 3px; border-radius: 22px; }
.nx-iso {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 4px 0 16px; border-radius: 999px; border-color: rgba(121, 191, 255, 0.4) !important; color: var(--akzent-hell); font-size: 12.5px; white-space: nowrap;
}
.nx-karte {
  position: absolute; left: 64px; bottom: 12px; width: min(400px, calc(100% - 88px)); border-radius: 20px; padding: 14px;
  display: grid; gap: 10px; animation: erscheinen 0.2s var(--ease);
}
.nx-karte-kopf { display: flex; align-items: center; gap: 12px; }
.nx-karte-kopf > div { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nx-karte-kopf b { color: var(--ink); font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-karte-kopf span { color: var(--muted); font-size: 12px; }
.nx-info { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 12px; }
.nx-info dt { color: var(--faint); }
.nx-info dd { margin: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-info dd.nx-schmerz { color: #ff9a8c; }
.nx-nachbarn { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-nachbarn span { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: rgba(13, 20, 32, 0.7); border: 1px solid rgba(121, 191, 255, 0.1); font-size: 11.5px; }
.nx-karte-aktionen { display: flex; flex-wrap: wrap; gap: 4px; }
.nx-karte-aktionen .nx-knopf { border-color: rgba(121, 191, 255, 0.14); height: 30px; padding: 0 11px; font-size: 12px; }

/* ---------- Präsentation ---------- */
.nx.praes .nx-leiste, .nx.praes .nx-panel, .nx.praes .nx-schiene, .nx.praes .nx-karte, .nx.praes .nx-iso { display: none; }
.nx-praes-ebene { position: absolute; inset: 0; pointer-events: none; }
.nx-praes-ebene > * { pointer-events: auto; }
.nx-praes-titel { position: absolute; top: 30px; left: 36px; display: grid; gap: 10px; pointer-events: none; animation: erscheinen 0.6s var(--ease); }
.nx-praes-titel img { width: 220px; height: auto; mix-blend-mode: screen; }
.nx-praes-titel span { font: 9.5px var(--display); letter-spacing: 0.34em; text-transform: uppercase; color: var(--muted); }
.nx-praes-caption {
  position: absolute; left: 50%; bottom: 108px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px;
  pointer-events: none; text-align: center; max-width: 80%; animation: erscheinen 0.35s var(--ease);
}
.nx-praes-caption span { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.nx-praes-caption b { font: 22px var(--display); letter-spacing: 0.08em; color: var(--ink); text-shadow: 0 0 30px rgba(121, 191, 255, 0.5); }
.nx-dock {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 5px; border-radius: 999px; max-width: calc(100% - 24px);
}
.nx-dock .nx-knopf { height: 36px; }
.nx-trenner { width: 1px; height: 22px; background: var(--glas-kante); flex: none; }
.nx-dock-pop {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 32px));
  max-height: 46vh; overflow-y: auto; border-radius: 20px; padding: 12px; display: flex; flex-wrap: wrap; gap: 6px;
}
.nx-dock-pop[hidden] { display: none; }
.nx-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(121, 191, 255, 0.12); background: rgba(13, 20, 32, 0.6); color: var(--muted); font-size: 12px;
}
.nx-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--f); opacity: 0.4; }
.nx-chip span { color: var(--faint); font-size: 11px; }
.nx-chip.an { color: var(--ink); border-color: rgba(121, 191, 255, 0.35); }
.nx-chip.an i { opacity: 1; box-shadow: 0 0 8px var(--f); }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 900px) {
  .nx-leiste { flex-wrap: wrap; overflow: visible; left: 8px; right: 8px; top: 8px; gap: 6px; }
  .nx-marke, .nx-modi button span, .nx-preset-knopf span, .nx-suche kbd { display: none; }
  .nx-modi button { padding: 0 11px; }
  /* Zeile 1: Layout, Bereiche, Ansicht; Zeile 2: Suche und Presets */
  .nx-modi { order: 1; }
  .nx-gruppe { order: 2; }
  .nx-suche { order: 4; flex: 1 1 200px !important; max-width: none; min-width: 0; }
  .nx-preset-knopf { order: 5; width: 40px; padding: 0; justify-content: center; }
  .nx-leiste [data-bereich="presets"] { display: none; }
  .nx-knopf.rund { width: 34px; height: 34px; }
  .nx-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 60%; border-radius: 22px; animation-name: nx-hoch; }
  @keyframes nx-hoch { from { opacity: 0; transform: translateY(14px); } }
  .nx.panel-offen .nx-karte, .nx.panel-offen .nx-schiene { display: none; }
  .nx-karte { left: 60px; right: 8px; width: auto; bottom: 8px; padding: 12px; }
  .nx-schiene { left: 8px; bottom: 8px; }
  .nx-iso { top: 60px; max-width: calc(100% - 24px); }
  .nx-praes-titel { top: 18px; left: 18px; }
  .nx-praes-titel img { width: 150px; }
  .nx-praes-caption { bottom: 96px; }
  .nx-praes-caption b { font-size: 16px; }
  .nx-dock .nx-knopf span { display: none; }
  .nx-dock .nx-knopf { width: 38px; padding: 0; }
  .nx-suche input { font-size: 16px; }
}
@media (max-width: 520px) {
  .nx-info dt:nth-of-type(n+4), .nx-info dd:nth-of-type(n+4) { display: none; }
  .nx-karte { gap: 8px; }
  .nx-karte-aktionen .nx-knopf span { display: none; }
  .nx-karte-aktionen .nx-knopf { width: 34px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-panel, .nx-karte, .nx-praes-titel, .nx-praes-caption, .nx-sektion.auf .nx-sektion-inhalt { animation: none; }
}
