/* Erlebnis-Engine, Grunddesign vE Bildungsexzellenz.
   Kundenfarben kommen als --primaer und --akzent aus dem Template. */
:root {
  --primaer: #085DA3;
  --akzent: #811484;
  --gold: #D4AF37;
  --teal: #005F5F;
  --teal-hell: #5FB8B3;
  --nacht: #0B1322;
  --nacht-2: color-mix(in srgb, var(--nacht) 88%, #6E86B8);
  --nacht-3: color-mix(in srgb, var(--nacht) 78%, #6E86B8);
  --linie: color-mix(in srgb, var(--nacht) 62%, #6E86B8);
  --text: #EEF2FA;
  --text-leise: #A7B3CC;
  --gut: var(--teal-hell);
  --warn: #E0A43A;
  --fehler: #E07A7A;
  --hell: #F5F7FB;
  --hell-2: #FFFFFF;
  --hell-linie: #DCE2EE;
  --hell-text: #16213A;
  --hell-leise: #5B6782;
  --schrift: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ------------------------------------------------ Spielfläche (dunkel) */
.spiel {
  background: radial-gradient(1200px 600px at 80% -10%, color-mix(in srgb, var(--akzent) 28%, transparent), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--primaer) 30%, transparent), transparent 60%),
              var(--nacht);
  color: var(--text);
  min-height: 100vh;
}
.rahmen { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }

.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marke { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marke img { height: 32px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.marke span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uhr {
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700;
  font-size: 28px; letter-spacing: .02em; color: var(--gold);
}
.uhr.knapp { color: var(--fehler); }

.leiste { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--nacht-2); border: 1px solid var(--linie); border-radius: 999px;
  padding: 4px 12px; font-size: 14px; color: var(--text-leise); font-variant-numeric: tabular-nums;
}
.chip b { color: var(--text); font-weight: 600; }

.pfad { display: flex; gap: 6px; }
.pfad i { flex: 1; height: 6px; border-radius: 3px; background: var(--nacht-3); }
.pfad i.ok { background: var(--gold); }
.pfad i.jetzt { background: color-mix(in srgb, var(--gold) 45%, var(--nacht-3)); }

.karte {
  background: color-mix(in srgb, var(--nacht-2) 92%, transparent);
  border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px;
}
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-leise); margin: 0 0 6px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 22px; }

.guide { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.figur {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primaer), var(--akzent));
  display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 55%, transparent);
}
.sprechblase { white-space: pre-line; }
.sprechblase .wer { font-weight: 600; color: var(--gold); display: block; margin-bottom: 2px; font-size: 14px; }

.aufgabe { border-left: 3px solid var(--gold); padding-left: 14px; white-space: pre-line; }

.eingabe { display: flex; gap: 8px; flex-wrap: wrap; }
.eingabe input, .eingabe textarea {
  flex: 1 1 220px; min-width: 0; background: var(--nacht); color: var(--text);
  border: 1px solid var(--linie); border-radius: 10px; padding: 12px 14px; font-size: 18px;
}
.eingabe input:focus, .eingabe textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.eingabe input.code { font-family: var(--mono); letter-spacing: .15em; text-transform: uppercase; }

.knopf {
  border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 600; cursor: pointer;
  background: var(--gold); color: #1a1405; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.knopf:hover { filter: brightness(1.06); }
.knopf:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.knopf.zweit { background: transparent; color: var(--text); border: 1px solid var(--linie); }
.knopf:disabled { opacity: .5; cursor: not-allowed; }

.rueckmeldung { min-height: 1.5em; font-weight: 600; }
.rueckmeldung.gut { color: var(--gut); }
.rueckmeldung.schlecht { color: var(--fehler); }

.hinweise { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hinweis { background: var(--nacht); border: 1px dashed var(--linie); border-radius: 10px; padding: 10px 12px; white-space: pre-line; }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; margin-bottom: 10px; }
.chat .msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-line; }
.chat .team { align-self: flex-end; background: color-mix(in srgb, var(--primaer) 55%, var(--nacht-3)); }
.chat .figur-msg { align-self: flex-start; background: var(--nacht-3); }

.banner {
  background: color-mix(in srgb, var(--gold) 16%, var(--nacht-2)); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 12px 16px;
}
.banner .von { font-size: 13px; color: var(--gold); font-weight: 600; }

.mitte { text-align: center; }
.gross { font-size: 40px; font-weight: 800; }
.leise { color: var(--text-leise); font-size: 15px; }
.fehlertext { color: var(--fehler); font-weight: 600; }

.teamwahl { display: flex; flex-direction: column; gap: 8px; }
.teamwahl button {
  text-align: left; background: var(--nacht); color: var(--text); border: 1px solid var(--linie);
  border-radius: 10px; padding: 12px 14px; cursor: pointer;
}
.teamwahl button:hover { border-color: var(--gold); }

.ziel { text-align: center; padding: 28px 18px; }
.ziel .pokal { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* ------------------------------------------------ Cockpit (hell) */
.leitstand { background: var(--hell); color: var(--hell-text); min-height: 100vh; }
.leitstand .rahmen { max-width: 1240px; }
.leitstand .karte { background: var(--hell-2); border-color: var(--hell-linie); }
.leitstand .leise, .leitstand .eyebrow { color: var(--hell-leise); }
.leitstand .knopf { background: var(--primaer); color: #fff; }
.leitstand .knopf.zweit { background: #fff; color: var(--hell-text); border-color: var(--hell-linie); }
.leitstand .knopf.gefahr { background: var(--fehler); color: #fff; }
.leitstand .uhr { color: var(--primaer); font-size: 34px; }
.leitstand .uhr.knapp { color: var(--fehler); }
.leitstand input, .leitstand select, .leitstand textarea {
  border: 1px solid var(--hell-linie); border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--hell-text);
}
.raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); gap: 16px; }
@media (max-width: 900px) { .raster { grid-template-columns: 1fr; } }
.tabelle-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
.leitstand td:last-child { white-space: nowrap; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--hell-linie); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--hell-leise); font-weight: 600; }
td.zahl { font-variant-numeric: tabular-nums; text-align: right; }
.balken { height: 8px; background: var(--hell-linie); border-radius: 4px; overflow: hidden; min-width: 80px; }
.balken i { display: block; height: 100%; background: var(--primaer); }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.status.vorbereitet { background: #E8EDF7; color: var(--hell-leise); }
.status.laeuft { background: #DDEEEE; color: var(--teal); }
.status.pausiert { background: #FBEFD7; color: #8A5A07; }
.status.beendet { background: #EDE3F2; color: var(--akzent); }
.pill-warten { background: #FBEFD7; color: #8A5A07; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.steuerung { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.protokoll { list-style: none; margin: 0; padding: 0; font-size: 14px; max-height: 420px; overflow-y: auto; }
.protokoll li { padding: 6px 0; border-bottom: 1px solid var(--hell-linie); }
.protokoll time { font-family: var(--mono); color: var(--hell-leise); font-size: 12px; margin-right: 6px; }
.formular { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.formular label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--hell-leise); }
.links { display: flex; flex-direction: column; gap: 6px; font-size: 14px; word-break: break-all; }

/* ------------------------------------------------ Grossbild */
.grossbild .rahmen { max-width: 1400px; padding: 40px 48px; gap: 28px; }
.grossbild .uhr { font-size: clamp(64px, 11vw, 160px); line-height: 1; }
.grossbild h1 { font-size: clamp(28px, 3.4vw, 48px); }
.gb-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .gb-raster { grid-template-columns: 1fr; } }
.rang { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rang li {
  display: grid; grid-template-columns: 56px 1fr auto auto; gap: 18px; align-items: center;
  background: var(--nacht-2); border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 20px;
  font-size: clamp(18px, 1.8vw, 28px);
}
.rang .platz { font-family: var(--mono); font-weight: 800; color: var(--text-leise); }
.rang li:first-child { border-color: var(--gold); }
.rang li:first-child .platz { color: var(--gold); }
.rang .punkte { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.mini-pfad { display: flex; gap: 4px; }
.mini-pfad i { width: 18px; height: 8px; border-radius: 3px; background: var(--nacht-3); }
.mini-pfad i.ok { background: var(--gold); }
.qr-box { background: #fff; border-radius: var(--radius); padding: 16px; text-align: center; color: var(--hell-text); }
.qr-box img { width: 100%; max-width: 260px; height: auto; }
.qr-box .code { font-family: var(--mono); font-size: 34px; font-weight: 800; letter-spacing: .2em; }

@media (prefers-reduced-motion: no-preference) {
  .neu { animation: auf .4s ease-out; }
  @keyframes auf { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ------------------------------------------------ Bausteine (Erweiterung) */
.optionen { display: flex; flex-direction: column; gap: 8px; }
.optionen button {
  text-align: left; background: var(--nacht); color: var(--text); border: 1px solid var(--linie);
  border-radius: 10px; padding: 12px 14px; cursor: pointer;
}
.optionen button:hover, .optionen button.gewaehlt { border-color: var(--gold); }
.optionen button.gewaehlt { background: color-mix(in srgb, var(--gold) 14%, var(--nacht)); }
.zuordnung { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.zuordnung select, .spiel select {
  background: var(--nacht); color: var(--text); border: 1px solid var(--linie); border-radius: 8px; padding: 9px 10px; max-width: 100%;
}
.legende { font-size: 14px; color: var(--text-leise); display: flex; flex-direction: column; gap: 2px; margin: 4px 0 10px; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; min-height: 44px; }
.slots span {
  min-width: 80px; padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--linie); text-align: center;
}
.slots span.voll { border-style: solid; border-color: var(--gold); }
.chips-wahl { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-wahl button { background: var(--nacht-3); color: var(--text); border: 1px solid var(--linie); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.chips-wahl button:disabled { opacity: .35; cursor: default; }
.gefunden { display: flex; gap: 6px; flex-wrap: wrap; }
.gefunden span { background: color-mix(in srgb, var(--gut) 20%, var(--nacht-2)); border: 1px solid var(--gut); border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.rollen-tab { width: 100%; border-collapse: collapse; font-size: 15px; }
.rollen-tab th, .rollen-tab td { border-bottom: 1px solid var(--linie); padding: 8px 6px; text-align: left; vertical-align: top; color: var(--text); }
.rollen-tab th { color: var(--text-leise); }
.rollen-tab input { width: 100%; min-width: 120px; background: var(--nacht); color: var(--text); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; }
.inventar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fragment { font-family: var(--mono); font-weight: 800; letter-spacing: .15em; background: var(--gold); color: #1a1405; border-radius: 6px; padding: 2px 8px; }
.fragment-gross { font-family: var(--mono); font-size: 44px; font-weight: 800; letter-spacing: .25em; color: var(--gold); text-align: center; margin: 8px 0; }
.station-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.videorahmen { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.videorahmen iframe, .videorahmen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vollbild-video { position: fixed; inset: 0; background: #000; z-index: 50; display: flex; align-items: center; justify-content: center; }
.vollbild-video .videorahmen { width: min(100vw, 177.78vh); border-radius: 0; }

/* ------------------------------------------------ Navigation und Redaktion */
.hauptnav {
  display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--hell-2); border-bottom: 1px solid var(--hell-linie); font-size: 15px;
}
.hauptnav a { text-decoration: none; color: var(--hell-text); padding: 6px 2px; border-bottom: 2px solid transparent; }
.hauptnav a[aria-current="page"] { border-bottom-color: var(--primaer); font-weight: 600; }
.hauptnav-marke { font-weight: 700; color: var(--primaer); margin-right: 8px; }
.hauptnav .leise-link { color: var(--hell-leise); font-size: 14px; }
.nav-knopf { background: none; border: 0; color: var(--hell-leise); cursor: pointer; font-size: 14px; padding: 6px 2px; }
.rahmen.breit { max-width: 1320px; }
.meldung { background: #DDEEEE; color: var(--teal); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.meldung.error { background: #FBE3E3; color: #9B2C2C; }
.editor { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.baum { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.baum-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.baum-liste.eingerueckt { margin: 2px 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--hell-linie); }
.baum-eintrag {
  display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 8px;
  text-decoration: none; color: var(--hell-text); font-size: 15px;
}
.baum-eintrag span { font-size: 12px; color: var(--hell-leise); }
.baum-eintrag:hover { background: var(--hell); }
.baum-eintrag.aktiv { background: color-mix(in srgb, var(--primaer) 12%, #fff); box-shadow: inset 3px 0 0 var(--primaer); }
.baum-eintrag.klein { font-size: 14px; }
.baum-eintrag.station b { color: var(--akzent); }
.plus { background: none; border: 1px dashed var(--hell-linie); color: var(--hell-leise); border-radius: 8px; padding: 6px 10px; margin: 4px 0; cursor: pointer; font-size: 13px; width: 100%; text-align: left; }
.plus:hover { border-color: var(--primaer); color: var(--primaer); }
.bearbeiten h3 { font-size: 22px; margin-bottom: 4px; }
.formblock { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.formblock fieldset { border: 1px solid var(--hell-linie); border-radius: 12px; padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.formblock legend { font-weight: 700; padding: 0 6px; color: var(--primaer); }
.feld { display: flex; flex-direction: column; gap: 4px; }
.feld label { font-weight: 600; font-size: 14px; }
.feld small { color: var(--hell-leise); font-size: 13px; }
.feld input:not([type=checkbox]), .feld select, .feld textarea { width: 100%; }
.feld textarea { min-height: 2.6em; resize: vertical; line-height: 1.45; }
.feld-check { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.feld-check small { flex-basis: 100%; }
.feldreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.bausteinhilfe { background: color-mix(in srgb, var(--primaer) 7%, #fff); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.bausteinhilfe span { color: var(--hell-leise); }
.speicherleiste { position: sticky; bottom: 0; background: var(--hell-2); padding: 12px 0; border-top: 1px solid var(--hell-linie); }
.gefahrzone { margin-top: 24px; padding-top: 14px; border-top: 1px dashed var(--hell-linie); }
.klein-knopf { padding: 7px 12px; font-size: 14px; }
.spielkarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.spielkarte { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--hell-text); }
.spielkarte:hover { border-color: var(--primaer); }
.routen select, .routen input { min-width: 130px; }

/* Bestätigung nach einem gelösten Schritt */
.erfolg {
  background: var(--teal); color: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px;
  border-left: 4px solid var(--gold); font-weight: 600;
}
.klein-text { font-size: 14px; margin: -4px 0 10px; }
.videovorschau { width: 100%; max-width: 480px; border-radius: 10px; background: #000; }
.fehlertext { color: #9B2C2C !important; }

/* ------------------------------------------------ Ablauf als Grafik */
.reiter { display: flex; gap: 6px; margin: 4px 0 14px; border-bottom: 1px solid var(--hell-linie); }
.reiter a { text-decoration: none; padding: 9px 14px; color: var(--hell-leise); border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 600; }
.reiter a[aria-current="page"] { color: var(--primaer); border-bottom-color: var(--primaer); }
.ablauf-intro { max-width: 760px; }
.plus-muster { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primaer); color: #fff; font-weight: 700; font-size: 14px; }
.legende-fluss { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--hell-leise); margin: 8px 0 18px; }
.legende-fluss i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--k); }
.kat-knopf { --k: var(--gold); }
.kat-eingabe { --k: var(--primaer); }
.kat-leitung { --k: var(--akzent); }
.kat-ki { --k: var(--teal); }
.fluss { display: flex; flex-direction: column; align-items: center; padding-bottom: 40px; }
.knoten {
  --k: var(--hell-linie);
  width: min(560px, 100%); display: flex; flex-direction: column; gap: 3px;
  background: #fff; border: 1px solid var(--hell-linie); border-left: 6px solid var(--k); border-radius: 12px;
  padding: 12px 16px; text-decoration: none; color: var(--hell-text);
  box-shadow: 0 1px 2px rgba(16, 33, 58, .05); transition: transform .12s, box-shadow .12s;
}
a.knoten:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(16, 33, 58, .10); border-color: var(--k); }
.knoten b { font-size: 16px; }
.knoten-typ { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--hell-leise); }
.knoten-text { font-size: 14px; color: var(--hell-leise); line-height: 1.4; }
.knoten-aktion { font-size: 13px; font-weight: 600; color: var(--hell-text); }
.knoten.rand { --k: var(--hell-text); background: var(--hell); }
.knoten.ziel-knoten { --k: var(--gold); }
.knoten.automatisch { --k: #B9C3D6; background: var(--hell); border-style: dashed; border-left-style: solid; }
.knoten.stationskopf { --k: var(--teal); background: color-mix(in srgb, var(--teal) 8%, #fff); }
.einfuegen { display: flex; flex-direction: column; align-items: center; }
.verbindung { display: block; width: 2px; height: 12px; background: #C5CEDF; }
.plus-rund {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid #C5CEDF; background: #fff; color: var(--hell-leise);
  font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.plus-rund:hover, .plus-rund:focus-visible { background: var(--primaer); border-color: var(--primaer); color: #fff; outline: none; }
.plus-gross { background: #fff; border: 2px dashed #C5CEDF; color: var(--hell-leise); border-radius: 12px; padding: 12px 18px; font-weight: 600; cursor: pointer; width: 100%; }
.plus-gross:hover { border-color: var(--primaer); color: var(--primaer); }
.stationsblock { width: 100%; border: 2px solid color-mix(in srgb, var(--teal) 35%, #fff); background: color-mix(in srgb, var(--teal) 4%, #fff); border-radius: 16px; padding: 16px; }
.stationsblock-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.stationsblock-kopf > div { display: flex; flex-direction: column; gap: 2px; }
.routen-chips { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.routen-chips li { background: #fff; border: 1px solid var(--hell-linie); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.bahnen { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.bahn { display: flex; flex-direction: column; align-items: center; }
.bahn .knoten { width: 100%; }
.bahn-neu { align-self: stretch; display: flex; }
.bahn-neu .plus-gross { min-height: 90px; }
.typwahl { border: 0; border-radius: 16px; padding: 0; width: min(760px, calc(100vw - 32px)); color: var(--hell-text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.typwahl::backdrop { background: rgba(11, 19, 34, .55); }
.typwahl form { padding: 20px; }
.typwahl-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.typwahl-kopf h3 { margin: 0; font-size: 20px; }
.typen { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.typ {
  --k: var(--primaer);
  text-align: left; background: #fff; border: 1px solid var(--hell-linie); border-top: 4px solid var(--k);
  border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--hell-text);
}
.typ:hover, .typ:focus-visible { border-color: var(--k); box-shadow: 0 4px 14px rgba(16,33,58,.12); outline: none; }
.typ span { font-size: 13px; color: var(--hell-leise); line-height: 1.4; }
.baum-eintrag.ablauf-link { background: color-mix(in srgb, var(--primaer) 8%, #fff); margin-bottom: 4px; }
.neu-hinweis { background: color-mix(in srgb, var(--gold) 18%, #fff); border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 14px; margin: 10px 0 4px; }
.vorschau { background: var(--nacht); color: var(--text); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.vorschau .eyebrow { color: var(--text-leise); margin: 0; }
.vorschau h4 { margin: 0; font-size: 18px; }
.vorschau .v-figur { display: flex; gap: 10px; }
.vorschau .v-figur i { flex: none; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--primaer), var(--akzent)); display: grid; place-items: center; font-style: normal; font-weight: 700; }
.vorschau .v-figur small { display: block; color: var(--gold); font-weight: 600; }
.vorschau .v-aufgabe { border-left: 3px solid var(--gold); padding-left: 10px; }
.vorschau .v-knopf { background: var(--gold); color: #1a1405; border-radius: 10px; padding: 10px 14px; font-weight: 700; align-self: flex-start; }
.vorschau .v-eingabe { border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; color: var(--text-leise); }
.vorschau .v-leise { color: var(--text-leise); font-size: 14px; }

/* Fortschritt entlang der Stationen */
.pfad.mit-stationen { display: block; }
.stationspfad { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; }
.stationspfad > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stationspfad .balken { display: block; height: 8px; border-radius: 999px; background: var(--nacht-3); overflow: hidden; }
.stationspfad .balken span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .4s; }
.stationspfad .jetzt .balken { box-shadow: 0 0 0 1px var(--gold); }
.stationspfad small { font-size: 12px; color: var(--text-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stationspfad .jetzt small { color: var(--text); font-weight: 600; }
.stationspfad .fertig small { color: var(--gold); }
/* Medien in einem Schritt */
.medium { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.medium video, .medium img { width: 100%; border-radius: 10px; background: #000; max-height: 70vh; object-fit: contain; }
.medium small { color: var(--text-leise); font-size: 14px; }
/* Testhilfe */
.testhilfe { margin-top: 18px; padding: 12px 14px; border: 1px dashed var(--gold); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 15px; color: var(--text-leise); }
.testhilfe b { color: var(--gold); }
.medium-marke { font-style: normal; background: var(--teal); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 6px; letter-spacing: .05em; }
.vorschau .v-medium { background: var(--nacht-3); border: 1px dashed var(--linie); border-radius: 10px; padding: 18px 12px; text-align: center; color: var(--text-leise); font-size: 14px; }
/* Kunden und Design */
.farbpunkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.logovorschau { max-height: 60px; max-width: 220px; align-self: flex-start; background: #fff; border: 1px solid var(--hell-linie); border-radius: 8px; padding: 6px; }
.feld input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.designvorschau {
  --nacht-2: color-mix(in srgb, var(--nacht) 88%, #6E86B8); --nacht-3: color-mix(in srgb, var(--nacht) 78%, #6E86B8);
  background: radial-gradient(500px 260px at 90% -20%, color-mix(in srgb, var(--akzent) 35%, transparent), transparent 60%), var(--nacht);
  color: #EEF2FA; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-width: 520px;
}
.dv-kopf { display: flex; justify-content: space-between; font-weight: 600; }
.dv-uhr { color: var(--gold); font-family: var(--mono); font-size: 22px; }
.dv-pfad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.dv-pfad i { display: block; height: 6px; border-radius: 3px; background: var(--gold); box-shadow: inset 0 0 0 99px transparent; }
.dv-pfad i[style*="width:0"] { background: var(--nacht-3); width: 100% !important; }
.dv-pfad i[style*="40%"] { background: linear-gradient(90deg, var(--gold) 40%, var(--nacht-3) 40%); width: 100% !important; }
.dv-karte { background: var(--nacht-2); border-radius: 12px; padding: 12px; display: flex; gap: 10px; }
.dv-karte small { display: block; color: var(--gold); font-weight: 600; }
.dv-figur { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--primaer), var(--akzent)); }
.dv-knopf { align-self: flex-start; background: var(--gold); color: #1a1405; font-weight: 700; border-radius: 10px; padding: 10px 14px; }
/* Ziehen und Ablegen im Ablauf: das Layout bleibt beim Ziehen stabil */
[data-ziehen] { cursor: grab; }
.knoten.wird-gezogen, .ziehgriff.wird-gezogen { opacity: .4; }
.einfuegen .ablage { display: none; }
body.zieht .plus-rund { border-style: dashed; border-color: var(--primaer); color: var(--primaer); }
.einfuegen.drueber .plus-rund { width: min(560px, 90vw); border-radius: 8px; background: var(--primaer); color: #fff; font-size: 0; }
.einfuegen.drueber .plus-rund::after { content: "Hier ablegen"; font-size: 13px; }
/* Routen als Grafik */
.routenliste { display: flex; flex-direction: column; gap: 12px; }
.route-karte { background: #fff; border: 1px solid var(--hell-linie); border-left: 6px solid var(--teal); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.route-kopf { display: flex; gap: 10px; align-items: center; }
.route-kopf input { font-weight: 700; max-width: 260px; }
.route-band { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.route-start { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--hell-leise); font-weight: 700; }
.pfeil { color: #A9B4C9; }
.route-chip {
  display: inline-flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--teal) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--teal) 35%, #fff); border-radius: 10px; padding: 7px 8px 7px 10px; cursor: grab; font-weight: 600; font-size: 14px;
}
.route-chip small { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 11px; }
.route-chip button { border: 0; background: none; color: var(--hell-leise); cursor: pointer; font-size: 16px; padding: 0 2px; }
.route-chip.drueber { outline: 2px dashed var(--primaer); outline-offset: 2px; }
.route-chip.wird-gezogen { opacity: .4; }
.route-fehlt { margin: 0; font-size: 13px; color: var(--hell-leise); }
.chip-plus { border: 1px dashed #C5CEDF; background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.routen-aktionen { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.zwischentitel { font-size: 18px; margin: 8px 0; }
table.zeitplan { border-collapse: collapse; width: 100%; background: #fff; border-radius: 10px; overflow: hidden; }
table.zeitplan th, table.zeitplan td { padding: 8px 12px; border-bottom: 1px solid var(--hell-linie); text-align: left; font-size: 14px; }
table.zeitplan td.konflikt { background: #FBE3E3; color: #9B2C2C; font-weight: 700; }
.warnung { color: #9B2C2C !important; font-weight: 600; }

/* Akzentfarbe des Kunden im Spiel sichtbar machen */
.spiel { --akzent-hell: color-mix(in srgb, var(--akzent) 60%, #fff); --primaer-hell: color-mix(in srgb, var(--primaer) 55%, #fff); }
.spiel .karte { border-top: 3px solid var(--akzent); }
.spiel .karte.ziel { border-top-color: var(--gold); }
.spiel .eyebrow { color: var(--akzent-hell); }
.spiel .sprechblase .wer { color: var(--akzent-hell); }
.spiel .figur { border-color: var(--akzent-hell); background: linear-gradient(135deg, var(--primaer), var(--akzent)); }
.spiel .aufgabe { border-left-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 10%, transparent); padding: 10px 14px; border-radius: 0 10px 10px 0; }
.spiel .chip { border-color: color-mix(in srgb, var(--akzent) 45%, var(--linie)); }
.spiel .knopf.zweit { border-color: var(--akzent-hell); }
.spiel .stationspfad .jetzt small { color: var(--akzent-hell); }
.spiel .banner:not(#testleiste) { border-color: var(--akzent); }
.spiel .msg.team { background: color-mix(in srgb, var(--akzent) 30%, var(--nacht-2)); }
.spiel input:focus, .spiel textarea:focus, .spiel select:focus { outline: 2px solid var(--akzent-hell); outline-offset: 1px; }
/* Filter in der Spieleliste */
.filter { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.filter-kopf { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-kopf input[type=search] { flex: 1 1 260px; }
.filtergruppe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filtergruppe > span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--hell-leise); font-weight: 700; min-width: 110px; }
.filter-chip { border: 1px solid var(--hell-linie); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; cursor: pointer; color: var(--hell-text); }
.filter-chip.an { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.spielkarte-kopf { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.marken { display: flex; flex-wrap: wrap; gap: 4px; }
.marke-chip { font-size: 12px; background: var(--hell); border: 1px solid var(--hell-linie); border-radius: 6px; padding: 1px 7px; color: var(--hell-leise); }
/* KI-Assistenz */
.ki-panel { border-color: color-mix(in srgb, var(--akzent) 35%, #fff) !important; background: color-mix(in srgb, var(--akzent) 4%, #fff); }
.ki-panel legend { color: var(--akzent) !important; }
.ki-zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ki-mini { align-self: flex-start; margin-top: -2px; border: 1px solid color-mix(in srgb, var(--akzent) 40%, #fff); color: var(--akzent); background: #fff; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ki-mini:hover { background: var(--akzent); color: #fff; }
.ki-neu { background: #FFF8DB !important; }
.ki-feedback-zeile { display: flex; justify-content: flex-end; margin: -6px 0 6px; }
.feedback-text { white-space: pre-line; line-height: 1.6; }
.entwurf-raster { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .entwurf-raster { grid-template-columns: 1fr; } }
.e-liste { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.e-schritt { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.e-aufgabe { color: var(--hell-leise); }
.e-loesung { color: var(--teal); font-weight: 600; font-size: 13px; }
.e-medien { color: var(--akzent); font-size: 13px; }
.e-stationen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.e-station { border: 1px solid var(--hell-linie); border-left: 5px solid var(--teal); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
#e-inhalt h4 { margin: 18px 0 6px; color: var(--primaer); }
