/* =========================================================================
   Brain – Oberfläche. Zwei Looks aus dem Design:
   „hell“ = A · Notizbuch, „dunkel“ = B · Netz. Farben nur über Variablen.
   ========================================================================= */

/* ---------- Schriften (liegen auf dem Server, nichts von Google) ---------- */
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: normal; font-display: swap; src: url("vendor/fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("vendor/fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("vendor/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-style: normal; font-display: swap; src: url("vendor/fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("vendor/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("vendor/fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("vendor/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 600; font-display: swap; src: url("vendor/fonts/space-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("vendor/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("vendor/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("vendor/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Farben und Schriften je Look ---------- */
:root, :root[data-theme="hell"] {
  color-scheme: light;
  --bg: #f6f5f1; --panel: #ffffff; --panel2: #eef1fb; --line: #e2e0d9; --line2: #d6d3ca;
  --text: #1b1b1a; --muted: #5e5c57; --soft: #e9e7e0;
  --accent: #2a44b8; --accent-text: #ffffff; --link: #2a44b8;
  --warn: #a33a1f; --ok: #1f7a4d; --ok-bg: #e3f2ea; --bad-bg: #f8e4df; --graph: #fbfaf7;
  --c-projekt: #1f84a8; --c-bereich: #b7790c; --c-person: #c24a75; --c-wissen: #6a58cc; --c-ich: #2e8a55;
  --c-quelle: #9a978e; --c-journal: #8a7f6a; --c-archiv: #b0aca2; --c-profil: #1b1b1a; --kante: #d6d3ca;
  --head: "Source Serif 4", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="dunkel"] {
  color-scheme: dark;
  --bg: #0e1116; --panel: #161b22; --panel2: #1a2230; --line: #222a35; --line2: #2b3442;
  --text: #e6e8eb; --muted: #9aa4b2; --soft: #1c2430;
  --accent: #5cc8e8; --accent-text: #0e1116; --link: #7fd6ee;
  --warn: #ff8a73; --ok: #6fcf9e; --ok-bg: #16302a; --bad-bg: #33201c; --graph: #11161d;
  --c-projekt: #5cc8e8; --c-bereich: #f2b544; --c-person: #f28fb0; --c-wissen: #a99cf5; --c-ich: #7ee0a1;
  --c-quelle: #6b7686; --c-journal: #8f8a7a; --c-archiv: #4b5563; --c-profil: #e6e8eb; --kante: #2a3443;
  --head: "Space Grotesk", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--link); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.versteckt { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Kopfleiste ---------- */
.kopf { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.logo { font-family: var(--head); font-size: 24px; font-weight: 700; color: var(--text); text-decoration: none; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav a { white-space: nowrap; min-height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a[aria-current="page"] { background: var(--soft); color: var(--text); font-weight: 600; }
.kopf-rechts { flex: 1 1 260px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.kopf-rechts input[type="search"] { flex: 0 1 260px; min-width: 0; }
.inhalt { max-width: 1320px; margin: 0 auto; padding: 28px 20px 64px; }

/* ---------- Bausteine ---------- */
.knopf { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); font-weight: 600; }
.knopf.zwei { background: var(--panel); color: var(--text); border: 1px solid var(--line2); font-weight: 500; }
.knopf.gross { min-height: 56px; padding: 0 22px; font-size: 17px; border-radius: 12px; }
.knopf.klein { min-height: 36px; padding: 0 12px; font-size: 14px; }
a.knopf { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; align-self: flex-start; }
.knopf:disabled { opacity: 0.5; cursor: default; }
.linkknopf { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; text-align: left; }
.feld { height: 46px; border: 1px solid var(--line2); border-radius: 10px; padding: 0 14px; background: var(--panel); width: 100%; }
.feld.gross { height: 56px; font-size: 19px; border-radius: 12px; }
textarea.feld { height: auto; padding: 12px 14px; resize: vertical; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.karte { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.etikett { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.leise { color: var(--muted); }
.klein { font-size: 13px; color: var(--muted); margin: 0; }
h1 { margin: 0; font-family: var(--head); font-size: clamp(30px, 5vw, 40px); line-height: 1.1; font-weight: 700; }
h2 { margin: 0; font-family: var(--head); font-size: 22px; font-weight: 600; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.stapel { display: flex; flex-direction: column; gap: 22px; }
.zeile { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.balken { height: 10px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.leer { padding: 28px; text-align: center; color: var(--muted); }
.laden { color: var(--muted); padding: 28px 0; }
.fehler-text { color: var(--warn); }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.anmeldung form { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 36px 30px; display: flex; flex-direction: column; gap: 14px; }
.anmeldung h1, .mitte { text-align: center; }
.anmeldung label.merken { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }

/* ---------- Jetzt ---------- */
.eine-sache { border-top: 2px solid var(--text); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.eine-sache p.text { margin: 0; font-family: var(--head); font-size: 26px; line-height: 1.35; }
.eine-sache.erledigt p.text { text-decoration: line-through; color: var(--muted); }
.fokus-zeile { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fokus-zeile .projekt { font-weight: 600; }
.fokus-zeile .schritt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fokus-zeile.offen .schritt { -webkit-line-clamp: unset; }
.tag-zeile { display: flex; gap: 12px; font-size: 15px; line-height: 1.45; padding: 4px 0; }
.tag-zeile .tag { flex: 0 0 110px; font-weight: 600; }
.frist { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.frist .zahl { flex: 0 0 52px; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 600; padding: 2px 0; border-radius: 6px; background: var(--soft); }
.frist .zahl.bald { background: var(--bad-bg); color: var(--warn); }
details > summary { cursor: pointer; font-weight: 600; }

/* ---------- Suche ---------- */
.treffer { text-align: left; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.treffer .titel { font-family: var(--head); font-size: 20px; font-weight: 700; }
.treffer .aus { font-size: 14px; color: var(--muted); }

/* ---------- Notiz ---------- */
.notiz-wrap { display: flex; flex-wrap: wrap; gap: 32px; }
.notiz-wrap article { flex: 999 1 520px; min-width: 0; max-width: 780px; }
.notiz-wrap aside { flex: 1 1 280px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.text { font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; }
.text h2 { margin: 1.6em 0 0.5em; }
.text h3 { font-family: var(--head); font-size: 19px; margin: 1.4em 0 0.4em; }
.text table { border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.text th, .text td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.text blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--line2); color: var(--muted); }
.text img { max-width: 100%; border-radius: 8px; }
.text audio { display: block; width: 100%; max-width: 520px; margin: 6px 0 10px; }
.text code { font-family: var(--mono); font-size: 0.9em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
.text pre { background: var(--soft); padding: 12px; border-radius: 8px; overflow-x: auto; }
.text li.aufgabe { list-style: none; margin-left: -1.2em; display: flex; gap: 8px; }
.text .box { flex: 0 0 16px; height: 16px; margin-top: 5px; border: 2px solid var(--line2); border-radius: 4px; }
.text .box.an { background: var(--ok); border-color: var(--ok); }
.text li.erledigt { color: var(--muted); }
.wl { text-decoration: none; border-bottom: 1px solid currentColor; }
.wl.fehlt { color: var(--muted); border-bottom-style: dashed; }
.verb { font-size: 15px; line-height: 1.4; }
.verb .art { color: var(--muted); }
.verdeckt { position: relative; }
.verdeckt .text { filter: blur(7px); user-select: none; pointer-events: none; }
.verdeckt-person > * { filter: blur(7px); user-select: none; pointer-events: none; }
.verdeckt .decke { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 40px; }

/* ---------- Netz ---------- */
.netz { display: flex; flex-wrap: wrap; gap: 20px; }
.netz .filter { flex: 1 1 200px; max-width: 230px; display: flex; flex-direction: column; gap: 18px; font-size: 14px; }
.netz fieldset { margin: 0; border: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.netz legend { padding: 0; margin-bottom: 8px; }
.netz label { display: flex; gap: 10px; align-items: center; }
.netz input[type="checkbox"], .netz input[type="radio"] { width: 18px; height: 18px; margin: 0; }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.netz .buehne { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.netz canvas { width: 100%; display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--graph); touch-action: none; cursor: grab; }
.zeitreise { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeitreise input { flex: 1 1 200px; accent-color: var(--accent); }
.einstellungen summary { font-size: 15px; }
.kraefte { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.netz .kraefte label { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; font-size: 14px; }
.kraefte input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.kraefte .etikett { margin-top: 4px; }

/* ---------- Menschen ---------- */
.leute { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.leute a { text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.leute a.bald { border-color: var(--accent); background: var(--panel2); }
.leute .name { font-family: var(--head); font-size: 20px; font-weight: 700; }
.person-kopf { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; border-bottom: 2px solid var(--text); padding-bottom: 18px; }
.person-kopf h1 { font-size: clamp(34px, 6vw, 50px); }
.person-kopf .anlass { font-family: var(--head); font-size: 26px; font-weight: 600; text-align: right; }
.punkte label { display: flex; gap: 10px; font-size: 16px; line-height: 1.45; }
.punkte input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 18px; }
.punkte label.an { text-decoration: line-through; color: var(--muted); }
.wissen-zeile { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; }
.wissen-zeile .k { flex: 0 0 92px; font-weight: 600; }

/* ---------- Beziehungsbaum (Menschen → Beziehungen) ---------- */
.baum .baum-buehne { position: relative; height: 68vh; min-height: 420px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--graph); touch-action: none; cursor: grab; }
.baum-welt { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.baum-welt svg { position: absolute; overflow: visible; pointer-events: none; }
.baum-labels { position: absolute; left: 0; top: 0; }
.kreis-box { position: absolute; box-sizing: border-box; border-radius: 18px; border: 1px dashed var(--line2); background: color-mix(in srgb, var(--panel) 55%, var(--graph)); transition: opacity 0.15s; }
.kreis-titel { position: absolute; left: 14px; top: 12px; display: flex; gap: 6px; align-items: center; font: 500 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.mkarte { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 5px 10px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line2); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: opacity 0.15s, border-color 0.15s; }
.mkarte:hover { border-color: var(--accent); }
.mkarte .mname { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkarte .mname .punkt { flex: 0 0 8px; width: 8px; height: 8px; }
.mkarte .mrolle { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkarte .mhinweis { position: absolute; top: -9px; right: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; padding: 1px 7px; border-radius: 999px; background: var(--c-bereich); color: #15120a; font: 600 10px var(--mono); white-space: nowrap; }
.mkarte.du { width: 80px; height: 44px; align-items: center; border: 0; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: 17px; }
.mkarte.gewaehlt { border: 2px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.mkarte.blass, .kreis-box.blass { opacity: 0.28; }
.mkarte.sensibel { border-style: dashed; }
.mk { fill: none; stroke: var(--line2); stroke-width: 1.4; stroke-linecap: round; }
.mk.ast { stroke: var(--line2); stroke-width: 1.3; }
.mk.familie { stroke: var(--c-bereich); stroke-width: 2; }
.mk.partner { stroke: var(--c-person); stroke-width: 2; }
.mk.getrennt { stroke: var(--c-bereich); stroke-dasharray: 6 5; opacity: 0.75; }
.mk.geschwister { stroke: var(--c-bereich); stroke-dasharray: 1 5; stroke-width: 2.6; }
.mk.beste { stroke: var(--c-wissen); stroke-width: 2.2; }
.mk.freund { stroke: var(--muted); stroke-width: 1.3; opacity: 0.7; }
.mk.frueher { stroke: var(--muted); stroke-dasharray: 4 4; opacity: 0.6; }
.mk.kennen { stroke: var(--accent); stroke-dasharray: 5 4; stroke-width: 1.6; }
.mk.aktiv { stroke-width: 2.8; opacity: 1; }
.mk.leise { opacity: 0.15; }
.mk.weg { stroke: var(--accent); stroke-width: 3.4; stroke-dasharray: none; opacity: 1; }
.mlabel { position: absolute; transform: translate(-50%, -50%); padding: 1px 7px; border-radius: 6px; background: var(--graph); font: 500 10.5px var(--mono); color: var(--muted); white-space: nowrap; pointer-events: none; }
.mlabel.weg, .mlabel.kennen { color: var(--accent); }
.mlabel.partner { color: var(--c-person); }
.mlabel.beste { color: var(--c-wissen); }
.mlabel.geschwister, .mlabel.getrennt, .mlabel.familie { color: var(--c-bereich); }
.baum-legende { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.baum-legende > span { display: flex; gap: 6px; align-items: center; }
.strich { display: inline-block; flex: 0 0 20px; width: 20px; height: 0; border-top: 2.5px solid var(--line2); vertical-align: middle; }
.strich.familie { border-top-color: var(--c-bereich); }
.strich.partner { height: 3px; border-top: 2px solid var(--c-person); border-bottom: 2px solid var(--c-person); }
.strich.geschwister { border-top: 3px dotted var(--c-bereich); }
.strich.getrennt { border-top: 2px dashed var(--c-bereich); }
.strich.beste { border-top-color: var(--c-wissen); }
.strich.freund { border-top-color: var(--muted); }
.strich.kennen { border-top: 2px dashed var(--accent); }
.strich.frueher { border-top: 2px dashed var(--muted); }
.baum .verb { display: flex; gap: 10px; align-items: center; }
.baum-weg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.baum-weg li { position: relative; display: flex; gap: 10px; font-size: 15px; }
.baum-weg li:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: -12px; width: 2px; background: var(--accent); }
.wpunkt { flex: 0 0 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.wpunkt.du { background: var(--text); }
.klein-block { display: block; font-size: 13px; line-height: 1.4; }
.baum-hinweise { display: flex; flex-direction: column; gap: 4px; }
.baum-hinweise > span { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--soft); }
.baum-offen { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.klein-feld { height: 38px; font-size: 14px; width: 240px; max-width: 100%; }
.baum .netz-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.baum .netz-leiste .schalter-filter { display: none; }

/* ---------- Lebenslinie ---------- */
.zeitbox { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--graph); padding: 34px 20px 20px; }
.zeitinnen { min-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.spur { display: flex; gap: 12px; align-items: center; }
.spur .name { flex: 0 0 96px; font-size: 14px; font-weight: 600; }
.spur .bahn { flex: 1; position: relative; height: 40px; }
.achse { flex: 1; position: relative; height: 22px; }
.achse span { position: absolute; transform: translateX(-50%); font: 400 12px var(--mono); color: var(--muted); }
.achse .heute { top: -24px; padding: 1px 8px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; }
.heute-linie { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--text); opacity: 0.55; pointer-events: none; }
.stueck { position: absolute; top: 4px; height: 32px; border-radius: 8px; padding: 0 8px; overflow: hidden; white-space: nowrap; text-align: left; font-size: 12px; font-weight: 500; border: 1px solid transparent; }
.stueck.geplant { background: transparent !important; border-style: dashed; }
.stueck[aria-pressed="true"] { border-width: 2px; }

/* ---------- Lebenslinie als Zeitstrom ---------- */
.leben-kopf { justify-content: space-between; align-items: flex-end; }
.leben-zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.leben-zahlen > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.leben-zahlen strong { font-family: var(--head); font-size: 28px; line-height: 1.1; }
.leben-zahlen span { font-size: 13px; color: var(--muted); }
.spur-chip { display: inline-flex; gap: 8px; align-items: center; }
.zoom-leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.zoom-leiste input[type="range"] { flex: 1 1 220px; max-width: 420px; accent-color: var(--accent); }
.zoom-leiste .knopf { min-width: 40px; font-size: 18px; }
.zoom-text { min-width: 74px; }
.zoom-hilfe { flex-basis: 100%; }
.strom-huelle { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--graph); }
.strom { position: relative; padding-bottom: 10px; }
.strom-zeile { position: relative; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.strom-name { position: sticky; left: 0; z-index: 3; display: flex; gap: 8px; align-items: center; width: 120px; height: 34px; padding: 0 12px; box-sizing: border-box;
  background: var(--graph); font-size: 13px; font-weight: 600; border-right: 1px solid var(--line); }
.strom-phasen { height: 40px; }
.strom-phasen .strom-name, .strom-achse .strom-name { color: var(--muted); font-weight: 500; }
.phase { position: absolute; top: 6px; height: 28px; box-sizing: border-box; padding: 0 10px; display: flex; align-items: center; border-radius: 8px;
  background: var(--soft); color: var(--text); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase.b { background: color-mix(in srgb, var(--soft) 55%, var(--graph)); }
.phase.geplant { background: transparent; border: 1.5px dashed var(--line2); color: var(--muted); }
.strom-achse { height: 34px; }
.strom-achse .jahr { position: absolute; top: 6px; transform: translateX(-50%); font: 500 12px var(--mono); color: var(--muted); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.strom-achse .jahr small { font-size: 10px; opacity: 0.75; }
.strom-achse .jahr.zehn { color: var(--text); font-weight: 600; }
.strom-achse .monat { position: absolute; top: 20px; transform: translateX(-50%); font: 400 10px var(--mono); color: var(--muted); opacity: 0.7; }
.strom-spur .strom-name { position: sticky; top: 0; height: 100%; min-height: 50px; align-items: flex-start; padding-top: 14px; }
.strom-spur { min-height: 50px; }
.strom .stueck { position: absolute; height: 30px; border-radius: 8px; padding: 0 9px; border: 1.5px solid transparent; font-size: 12.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; cursor: pointer; }
.strom .stueck.geplant { background: transparent; border-style: dashed; color: var(--muted); }
.strom .stueck.sensibel { border-style: dashed; }
.strom .stueck.an { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.ereignis { position: absolute; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; border: 2px solid; padding: 0; cursor: pointer; }
.ereignis.meilenstein { width: 14px; height: 14px; margin-left: -7px; border-radius: 3px; transform: rotate(45deg); }
.ereignis.sensibel { border-style: dashed; }
.ereignis.an { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); }
.ereignis-text { position: absolute; padding: 0 4px; border: 0; background: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; cursor: pointer; line-height: 17px; }
.ereignis-text:hover, .ereignis-text.an { color: var(--text); font-weight: 600; }
.strom-zukunft { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--soft) 45%, transparent) 10px 20px); pointer-events: none; }
.heute-strich { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; z-index: 2; }
.heute-strich span { position: absolute; top: 9px; left: 6px; z-index: 1; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font: 600 11px var(--mono); }
.leben-detail { min-height: 64px; }
.leben-detail .etikett { display: flex; gap: 4px; align-items: center; }
.leben-info { margin: 0; font-size: 16px; line-height: 1.55; max-width: 760px; }
.leben-in { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.leben-in .linkknopf { font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.leben-titel { margin-top: 10px; }
.leben-jahre { display: flex; flex-direction: column; gap: 14px; }
.jahr-block { display: grid; grid-template-columns: 110px 1fr; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.jahr-block.zukunft { border-style: dashed; background: transparent; }
.jahr-kopf { display: flex; flex-direction: column; gap: 2px; }
.jahr-kopf strong { font-family: var(--head); font-size: 30px; line-height: 1; }
.jahr-kopf span { font-size: 13px; color: var(--muted); }
.jahr-block ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.jahr-eintrag { display: grid; grid-template-columns: 72px 10px 1fr; gap: 10px; align-items: baseline; border-radius: 8px; }
.jahr-eintrag.an { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.jahr-eintrag .punkt { width: 10px; height: 10px; border-radius: 3px; }
.jahr-eintrag .punkt.rund { border-radius: 50%; }
.jahr-eintrag.sensibel .jahr-text strong { text-decoration: underline dashed var(--muted); text-underline-offset: 4px; }
.jahr-zeit { font: 500 12px var(--mono); color: var(--muted); }
.jahr-text { background: none; border: 0; padding: 0; text-align: left; font-size: 15px; line-height: 1.45; cursor: pointer; }
.jahr-text:hover strong { color: var(--link); }
.jahr-info { display: block; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .jahr-block { grid-template-columns: 1fr; gap: 8px; }
  .jahr-kopf { flex-direction: row; gap: 10px; align-items: baseline; }
  .jahr-eintrag { grid-template-columns: 58px 10px 1fr; }
  .strom-name { width: 92px; font-size: 12px; }
}

/* ---------- Lernen ---------- */
.frage-text { margin: 0; font-family: var(--head); font-size: clamp(21px, 3.5vw, 26px); line-height: 1.3; font-weight: 600; }
.option { text-align: left; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line2); background: var(--panel); font-size: 16px; line-height: 1.4; width: 100%; }
.option.richtig { background: var(--ok-bg); border-color: var(--ok); }
.option.falsch { background: var(--bad-bg); border-color: var(--warn); }
.option.aus { color: var(--muted); }
.rueckmeldung { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.rueckmeldung.ok { background: var(--ok-bg); }
.rueckmeldung.nein { background: var(--bad-bg); }
.uhr { font-family: var(--mono); font-size: 18px; }
.uhr.knapp { color: var(--warn); }
.ergebnis-zeile { display: flex; gap: 12px; font-size: 14px; }
.ergebnis-zeile .s { flex: 0 0 64px; font: 600 12px var(--mono); }

/* ---------- Dialog und Meldung ---------- */
dialog { border: 0; border-radius: 16px; padding: 24px; width: min(520px, calc(100% - 32px)); background: var(--panel); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
.dialog-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.meldung { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 500; }

.fuss { max-width: 1320px; margin: 0 auto; padding: 0 20px 40px; display: flex; gap: 8px; justify-content: flex-end; }
.nur-handy { display: none !important; }

/* ---------- Netz am PC: ganzer Bildschirm, Leisten ein- und ausklappbar ---------- */
.netz-leiste { display: none; }
.karte-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.schliessen { font-size: 18px; line-height: 1; color: var(--muted); padding: 4px; }
.netz .rechts { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 900px) {
  body.netz-voll #app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  body.netz-voll .kopf { position: static; }
  body.netz-voll .inhalt { flex: 1; min-height: 0; max-width: none; width: 100%; margin: 0; padding: 0; }
  body.netz-voll .fuss { display: none; }
  body.netz-voll .netz { position: relative; height: 100%; display: block; overflow: hidden; }
  body.netz-voll .netz .buehne { position: absolute; inset: 0; display: block; }
  body.netz-voll .netz canvas { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
  /* Schalter oben auf dem Netz */
  body.netz-voll .netz-leiste { display: flex; gap: 8px; position: absolute; top: 14px; left: 14px; right: 14px; z-index: 3; pointer-events: none; }
  body.netz-voll .netz-leiste .schalter { pointer-events: auto; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
  body.netz-voll .netz-leiste .schalter-kraefte { margin-left: auto; }
  body.netz-voll .netz-leiste .schalter-zeit { position: absolute; left: 50%; transform: translateX(-50%); }
  body.netz-voll .schalter[aria-expanded="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
  /* Linke Leiste: Filter */
  body.netz-voll .netz .filter { position: absolute; z-index: 2; top: 62px; left: 14px; bottom: 14px; width: 240px; max-width: none;
    overflow-y: auto; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); bottom: auto; max-height: calc(100% - 76px); }
  /* Rechte Leiste: Auswahl und Kräfte */
  body.netz-voll .netz .rechts { position: absolute; z-index: 2; top: 62px; right: 14px; width: 330px; max-width: none; max-height: calc(100% - 76px); padding-bottom: 4px; overflow-y: auto; pointer-events: none; }
  body.netz-voll .netz .rechts > * { pointer-events: auto; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
  body.netz-voll .netz .seite.ohne-auswahl { display: none; }
  body.netz-voll .einstellungen > summary { display: none; }
  body.netz-voll .einstellungen .kraefte { margin-top: 0; }
  /* Untere Leiste: Zeitreise */
  body.netz-voll .netz .zeitreise { position: absolute; z-index: 2; bottom: 14px; left: 50%; transform: translateX(-50%); width: min(680px, calc(100% - 28px));
    padding: 10px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); flex-wrap: nowrap; }
  body.netz-voll .netz .zu { display: none !important; }
  body.netz-voll .baum .baum-buehne { position: absolute; inset: 0; height: auto; min-height: 0; border: 0; border-radius: 0; }
  body.netz-voll .baum .netz-leiste { margin: 0; flex-wrap: nowrap; }
  body.netz-voll .baum .netz-leiste .schalter-filter { display: inline-flex; align-items: center; }
  body.netz-voll .baum .leiste-mitte { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: auto; }
  body.netz-voll .baum .leiste-mitte .feld { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
  body.netz-voll .baum .netz-leiste > a.schalter { margin-left: auto; display: inline-flex; align-items: center; }
  body.netz-voll .baum .filter { gap: 16px; }
}
@media (max-width: 640px) {
  .nur-handy { display: flex !important; }
  .nicht-handy { display: none; }
  .kopf { padding: 10px 14px; position: static; display: grid; grid-template-columns: 1fr auto; }
  .kopf .nav { grid-column: 1 / -1; grid-row: 2; }
  .kopf-rechts { flex: none; }
  .kopf-rechts input[type="search"] { display: none; }
  #erfassen-knopf { min-width: 44px; font-size: 20px; }
  .netz .buehne { order: -1; }
  .netz .filter { max-width: none; order: 1; }  /* auf dem Handy: Netz, dann Auswahl, dann Filter */
  .netz .rechts { max-width: none; }
  .inhalt { padding: 20px 14px 56px; }
  .tag-zeile .tag { flex-basis: 84px; }
  .person-kopf .anlass { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Podcast „Nachgehört“ (seit 2026-11-09) ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--muted); font-weight: 500; }
.chip.an { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pod-modul h2 { margin: 0 0 4px; font-family: var(--head); font-size: 20px; }
.pod-zeile { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pod-zeile:first-of-type { border-top: 0; }
.pod-zeile.offen { cursor: default; color: var(--muted); }
.pod-zeile.gehoert .pod-name { color: var(--muted); }
.pod-zeile.aktiv .pod-name { color: var(--accent); }
.pod-play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text); font-size: 18px; display: grid; place-items: center; flex: none; }
.pod-play.aus { background: var(--soft); color: var(--muted); cursor: default; }
.pod-play.gross { width: 60px; height: 60px; font-size: 22px; }
.pod-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pod-name { font-weight: 600; line-height: 1.3; }
.pod-name .etikett { display: inline; }
.pod-balken { height: 4px; border-radius: 2px; background: var(--soft); overflow: hidden; margin-top: 4px; }
.pod-balken-voll { height: 100%; background: var(--accent); border-radius: 2px; }
.pod-notiz { white-space: nowrap; }
.pod-weiter .zeile { align-items: center; }
.mono { font-family: var(--mono); font-size: 13px; }

/* fester Player unten; der Inhalt bekommt unten Platz, damit nichts verdeckt wird */
.pod-leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--panel); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08); }
.pod-leiste > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.pod-kopf { display: flex; gap: 12px; align-items: flex-start; }
.pod-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pod-titel { font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-unter { font-size: 13px; }
.pod-zu { border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 4px; }
.pod-regler { display: block; width: 100%; margin: 8px auto 6px; accent-color: var(--accent); }
.pod-knoepfe { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pod-knoepfe .pod-zeit { margin-left: auto; color: var(--muted); }
body.mit-leiste .inhalt { padding-bottom: 190px; }
body.mit-leiste .fuss { padding-bottom: 170px; }
@media (max-width: 640px) {
  .pod-zeile { grid-template-columns: 44px 1fr; }
  .pod-zeile .pod-notiz { grid-column: 2; justify-self: start; }
  .pod-play { width: 44px; height: 44px; }
  .pod-knoepfe .pod-zeit { width: 100%; margin: 0; text-align: center; }
}
