/* JARVIS Lernplattform · App-Rahmen im HUD-Look.
   Bausteine (merk, box, schritt, cmd, prompt, diagramm …) kommen aus bausteine.css (alter Guide). */
:root {
  --bg: #08080a;
  --glow: 0 0 0 1px rgba(238,68,82,.35), 0 0 24px rgba(238,68,82,.28);
  --kopf-h: 64px;
  --breit: 1120px;
  --lesen: 1000px;
}
body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.hud-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(238,68,82,.14), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(238,68,82,.08), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 4px,
    var(--bg);
}
.hud-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Grundaufbau 16:9: linke Leiste · breiter Inhalt · rechte Spalte ---------- */
:root { --leiste: 288px; --rechts: 368px;
  /* Typo-Skala */ --fs-label: 12px; --sperrung: .16em; --fs-klein: 14px; --fs-text: 17px; --fs-titel-s: 20px; --fs-titel-m: 24px; }
.kicker, .hud-tag, .tile .k, .station-text .kicker, .sw-kopf .kicker, .leiste-titel, .pfad-karte .k, .hud-karte .label, .skill .k, .ergebnis .label { font-size: var(--fs-label) !important; letter-spacing: var(--sperrung) !important; text-transform: uppercase; }
.rahmen { display: grid; grid-template-columns: var(--leiste) minmax(0, 1fr) var(--rechts); min-height: 100vh; }
.mobilkopf { display: none; }
.leiste { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 22px 16px 18px; background: rgba(13,13,15,.92); border-right: 1px solid var(--line); scrollbar-width: thin; }
.leiste::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1px; width: 1px; background: linear-gradient(180deg, transparent, rgba(238,68,82,.6), transparent); pointer-events: none; }
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.marke img { width: 124px; height: auto; display: block; }
.marke .jarvis { font: 900 14px/1 var(--f-head); letter-spacing: .32em; color: var(--accent); text-shadow: 0 0 14px rgba(238,68,82,.6); padding-left: 12px; border-left: 1px solid var(--line); }
.suche-feld { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font: 600 15px var(--f-text); cursor: pointer; }
.suche-feld svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.suche-feld kbd { margin-left: auto; font: 600 12px var(--f-mono); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.suche-feld:hover { border-color: var(--accent); color: var(--white); }
.hauptnav { display: grid; gap: 2px; }
.hauptnav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-m); text-decoration: none; color: var(--text); font: 700 15px/1 var(--f-text); }
.hauptnav svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hauptnav a:hover { background: var(--surface-2); color: var(--white); }
.hauptnav a[aria-current="page"] { background: var(--accent-soft); color: var(--white); box-shadow: inset 3px 0 0 var(--accent); }
.hauptnav a[aria-current="page"] svg { stroke: var(--accent); }
.leiste-titel { font: 800 11px/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.leiste-titel span { color: var(--accent); }
.mini-weg { list-style: none; margin: 0; padding: 0; position: relative; }
.mini-weg::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.mini-weg > li > a { position: relative; display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 6px 8px 6px 2px; border-radius: var(--r-m); text-decoration: none; color: var(--text); }
.mini-weg > li > a:hover { background: var(--surface-2); }
.mw-nr { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--line); font: 900 13px/1 var(--f-head); color: var(--white); z-index: 1; }
.mini-weg li.aktuell .mw-nr { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px rgba(238,68,82,.7); }
.mini-weg li.geschafft .mw-nr { background: var(--ok); border-color: var(--ok); color: #062014; }
.mw-text { flex: 1; min-width: 0; }
.mw-name { display: block; font: 800 14px/1.2 var(--f-head); color: var(--white); }
.mw-balken { display: block; height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.mw-balken span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.mini-weg li.geschafft .mw-balken span { background: var(--ok); }
.mw-lektionen { list-style: none; margin: 4px 0 8px 36px; padding: 0; display: grid; gap: 2px; }
.mw-lektionen a { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: var(--r-s); text-decoration: none; color: var(--muted); font-size: 13px; line-height: 1.35; }
.mw-lektionen a:hover { color: var(--white); background: var(--surface-2); }
.mw-lektionen a[aria-current="page"] { color: var(--white); background: var(--accent-soft); }
.mw-haken { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--dim); }
.mw-lektionen li.erledigt .mw-haken { background: var(--ok); border-color: var(--ok); }
.leiste-fuss { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.konto-link { display: block; font-size: 13px; font-weight: 700; padding: 8px 4px; overflow-wrap: anywhere; }
.xp-chip { display: inline-flex; align-items: center; text-decoration: none; }
.xp-chip .lv, .lv-gross { display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font: 900 13px/1 var(--f-head); box-shadow: 0 0 14px rgba(238,68,82,.6); }
.xp-chip .lv { width: 34px; height: 34px; }

/* Rechte Spalte: großzügig, klare Hierarchie (nächster Schritt → Stand → Hilfe) */
.rechts { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 28px; border-left: 1px solid var(--line); background: rgba(13,13,15,.6); scrollbar-width: thin; }
.r-karte { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-l); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.r-karte > * { margin: 0; }
.r-karte > * + * { margin-top: 14px; }
.label, .r-titel { display: block; font: 800 var(--fs-label)/1.2 var(--f-head); letter-spacing: var(--sperrung); text-transform: uppercase; color: var(--accent); }
.r-naechster { border-color: rgba(238,68,82,.55); background: radial-gradient(140% 120% at 0% 0%, rgba(238,68,82,.14), transparent 60%), linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: 0 0 40px rgba(238,68,82,.10); }
.r-kontext { font-size: var(--fs-klein); line-height: 1.4; color: var(--muted); }
.r-karte > .r-kontext { margin-top: 10px; }
.r-lektion { font: 800 var(--fs-titel-s)/1.3 var(--f-head); color: var(--white); text-transform: none; letter-spacing: -.005em; overflow-wrap: anywhere; }
.r-karte > .r-lektion { margin-top: 6px; }
.r-nutzen { font-size: var(--fs-klein); line-height: 1.55; color: var(--text); }
.r-fakten { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.r-fakten li { font: 600 13px/1 var(--f-mono); color: var(--white); background: var(--surface-3); border-radius: var(--r-s); padding: 6px 9px; }
.r-karte > .btn { margin-top: 20px; }
.r-level { display: flex; gap: 16px; align-items: center; }
.r-ring { position: relative; flex: none; width: 72px; height: 72px; display: grid; place-items: center; }
.r-ring svg { position: absolute; inset: 0; width: 72px; height: 72px; transform: rotate(-90deg); }
.r-ring circle { fill: none; stroke-width: 5; }
.r-ring .ring-bg { stroke: var(--surface-3); }
.r-ring .ring { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .6s; filter: drop-shadow(0 0 6px rgba(238,68,82,.7)); }
.r-ring b { font: 900 18px/1 var(--f-head); color: var(--white); }
.r-level-text { min-width: 0; display: grid; gap: 4px; }
.r-level-text strong { font: 800 var(--fs-text)/1.3 var(--f-head); color: var(--white); }
.r-level-text span { font-size: var(--fs-klein); line-height: 1.4; color: var(--muted); }
.r-toc ol { list-style: none; padding: 0; display: grid; gap: 2px; max-height: 36vh; overflow-y: auto; }
.r-toc ol a { display: block; padding: 8px 10px; border-radius: var(--r-s); font-size: var(--fs-klein); color: var(--muted); text-decoration: none; line-height: 1.35; }
.r-toc ol a:hover { color: var(--white); background: var(--surface-3); }
.r-karte > ol + .btn, .r-toc > .btn { white-space: nowrap;  margin-top: 16px; }
.btn.voll { width: 100%; justify-content: center; }
.btn.gross { min-height: 56px; font-size: 17px; padding: 14px 22px; }

/* ---------- Hauptbereich ---------- */
.app-main { min-width: 0; width: 100%; max-width: 1240px; margin: 0 auto; padding: 44px clamp(20px, 3vw, 48px) 40px; }
.app-main h1 { font-size: clamp(32px, 3.6vw, 56px); }
.app-main > header, .app-main > .box, .login, .chat { max-width: 1000px; }
.lektion-body { max-width: none; font-size: 18px; }
.lektion-body > p, .lektion-body > ul, .lektion-body > ol, .lektion-body > h2, .lektion-body > h3, .lektion-body > h4 { max-width: 1000px; }
.lektion-body img, .lektion-body video { max-width: 100%; height: auto; }
.lektion-body [id] { scroll-margin-top: 24px; }
.lektion-body > h1 { font-size: clamp(26px, 3vw, 36px); text-transform: none; margin-top: 40px; }
.lektion { max-width: 100%; }
.lektion-kopf { margin-bottom: 28px; }
.lektion-kopf h1 { text-transform: none; font-size: clamp(32px, 3.4vw, 52px); max-width: 1000px; }
.krumen { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.krumen a { color: var(--muted); }
.status-pill { border-color: rgba(62,207,142,.5) !important; color: var(--ok) !important; }
.status-pill b { color: var(--ok) !important; }
.fassung { font-size: 15px; color: var(--muted); }
.fassung a { font-weight: 700; }
.klein { font-size: 13px !important; }
.btn.klein { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn { border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(238,68,82,.5), 0 8px 28px rgba(238,68,82,.25); }
.btn.ghost { box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: wait; }
/* Prompt-Kopierknopf groß und eindeutig */
.copy.copy-gross { position: static; display: flex; width: 100%; justify-content: center; align-items: center; min-height: 52px; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: var(--accent); color: #fff; font: 800 16px var(--f-head); letter-spacing: .04em; }
.copy.copy-gross:hover { filter: brightness(1.1); }
.copy.copy-gross.done { background: var(--ok); color: #062014; }
.prompt .codewrap pre { padding-right: 18px; }
/* Schnellweg */
.schnellweg { margin: 0 0 40px; padding: 26px; border-radius: var(--r-l); border: 1px solid rgba(238,68,82,.55); background: radial-gradient(120% 160% at 0% 0%, rgba(238,68,82,.16), transparent 60%), var(--surface); box-shadow: 0 0 40px rgba(238,68,82,.12); }
.sw-kopf h2 { margin: 0 0 6px; }
.sw-schritte { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.sw-schritte a { position: relative; display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--text); }
.sw-schritte a:hover { border-color: var(--accent); }
.sw-nr { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--line); font: 900 18px/1 var(--f-head); color: var(--white); }
.sw-text strong { display: block; font: 800 17px/1.3 var(--f-head); color: var(--white); }
.sw-text .d { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }
.sw-schritte li.jetzt a { border-color: var(--accent); box-shadow: var(--glow); }
.sw-schritte li.jetzt .sw-nr { background: var(--accent); border-color: var(--accent); }
.sw-schritte li.jetzt .sw-text .d::before { content: "Jetzt dran · "; color: var(--accent); font-weight: 700; }
.sw-schritte li.erledigt .sw-nr { background: var(--ok); border-color: var(--ok); color: #062014; }
.sw-balken { height: 8px; margin-top: 18px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.sw-balken span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff7a85); transition: width .5s; }
.check-ergebnis .btn { margin-top: 14px; display: flex; width: fit-content; max-width: 100%; white-space: normal; }

/* Bausteine-Ergänzungen */
.merk > div > p { margin: 0; }
.merk > div > p + p { margin-top: 8px; }
.check { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-s); background: var(--ok-soft); font-size: 15px; }
.check > p { margin: 0; display: inline; }
.check::before { content: "✓ Richtig, wenn: "; color: var(--ok); font-weight: 700; }
.tipp { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.tipp > p { margin: 0; display: inline; }
.tipp::before { content: "Profi-Tipp · "; color: var(--warn); font-weight: 700; }
.meta-wrap > ul, .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.meta-wrap > ul > li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.3; color: var(--muted); }
.meta-wrap strong { color: var(--white); }
.pause > div > p { margin: 0; }
.schritte > ol { counter-reset: s; list-style: none; padding: 0; margin: 16px 0; }
.schritte > ol > li { counter-increment: s; position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 14px 16px 14px 56px; margin: 12px 0; }
.schritte > ol > li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 900 13px/1 var(--f-head); }
.schritte > ul { padding-left: 20px; }
.codewrap { border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; margin: 16px 0; }
.cmd .codewrap, .prompt .codewrap .codewrap { border: 0; border-radius: 0; margin: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.profi { border: 1px solid rgba(242,179,75,.35); border-radius: var(--r-m); background: var(--surface); margin: 20px 0; }
.profi > summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700; color: var(--white); display: flex; gap: 10px; align-items: center; min-height: 48px; }
.profi > summary::-webkit-details-marker { display: none; }
.profi > summary::after { content: "+"; margin-left: auto; color: var(--warn); font-size: 20px; }
.profi[open] > summary::after { content: "–"; }
.profi-tag { font: 800 11px/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--warn); border: 1px solid rgba(242,179,75,.5); border-radius: var(--r-s); padding: 4px 7px; }
.profi-body { padding: 0 18px 16px; }
.check-list li.task { display: flex; gap: 12px; align-items: flex-start; }
.hero-visual .hero h1 { text-transform: uppercase; }

/* ---------- Start / Level-Karte ---------- */
.start-hero { max-width: var(--lesen); margin-bottom: 40px; }
.start-hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 30px rgba(238,68,82,.55); }
.pfad-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.weiter { margin-top: 22px; }
.weiter a { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r-l); background: linear-gradient(90deg, rgba(238,68,82,.2), rgba(238,68,82,.04)); border: 1px solid rgba(238,68,82,.5); text-decoration: none; box-shadow: var(--glow); }
.weiter a small { display: block; font: 800 11px/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.weiter a strong { display: block; font: 800 18px/1.25 var(--f-head); }
.weiter a::after { content: "→"; margin-left: auto; font-size: 24px; color: var(--accent); }

.karte { position: relative; margin: 8px 0 56px; }
.weg { list-style: none; margin: 0; padding: 0; position: relative; }
.weg::before { content: ""; position: absolute; top: 20px; bottom: 20px; left: 31px; width: 2px; background: linear-gradient(180deg, var(--accent), rgba(238,68,82,.15)); box-shadow: 0 0 12px rgba(238,68,82,.5); }
.station { position: relative; margin: 0 0 18px; }
.station-link { display: flex; gap: 18px; align-items: center; text-decoration: none; color: var(--text); padding: 10px 14px 10px 0; border-radius: var(--r-l); }
.station-text { flex: 1; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: linear-gradient(180deg, var(--surface-2), var(--surface)); transition: border-color .2s, box-shadow .2s, transform .2s; }
.station-link:hover .station-text { border-color: var(--accent); box-shadow: var(--glow); }
.station-text .kicker { margin-bottom: 6px; }
.station-text strong { display: block; font: 900 clamp(20px, 3vw, 26px)/1.1 var(--f-head); text-transform: uppercase; color: var(--white); }
.station-text .d { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.station-text .stand { display: inline-block; margin-top: 8px; font: 500 12px/1 var(--f-mono); color: var(--white); background: var(--surface-3); border-radius: var(--r-s); padding: 5px 7px; }
.knoten { position: relative; flex: none; width: 64px; height: 64px; display: grid; place-items: center; background: var(--bg); border-radius: 50%; z-index: 1; }
.knoten svg { position: absolute; inset: 0; width: 64px; height: 64px; transform: rotate(-90deg); }
.knoten circle { fill: none; stroke-width: 4; }
.knoten .ring-bg { stroke: var(--surface-3); }
.knoten .ring { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .6s; filter: drop-shadow(0 0 6px rgba(238,68,82,.8)); }
.knoten b { font: 900 22px/1 var(--f-head); color: var(--white); }
.station.aktuell .knoten { box-shadow: 0 0 0 6px rgba(238,68,82,.12), 0 0 30px rgba(238,68,82,.6); animation: puls 2.4s ease-in-out infinite; }
.station.aktuell .station-text { border-color: rgba(238,68,82,.6); }
.station.geschafft .knoten b { color: var(--ok); }
.station.geschafft .ring { stroke: var(--ok); filter: drop-shadow(0 0 6px rgba(62,207,142,.7)); }
@keyframes puls { 50% { box-shadow: 0 0 0 10px rgba(238,68,82,.05), 0 0 40px rgba(238,68,82,.8); } }
@media (min-width: 860px) {
  .weg::before { left: 50%; transform: translateX(-1px); }
  .station { width: 50%; margin-bottom: -12px; }
  .station .knoten { position: absolute; top: 50%; margin-top: -32px; }
  .station:nth-child(odd) { padding-right: 52px; }
  .station:nth-child(odd) .station-link { text-align: right; padding: 10px 0; }
  .station:nth-child(odd) .knoten { right: -32px; }
  .station:nth-child(even) { margin-left: 50%; padding-left: 52px; }
  .station:nth-child(even) .station-link { padding: 10px 0; }
  .station:nth-child(even) .knoten { left: -32px; }
}
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* Level-Seite */
.level-kopf { max-width: var(--lesen); margin-bottom: 24px; }
.level-balken, .lf-balken { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 18px 0 8px; }
.level-balken span, .lf-balken span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff7a85); box-shadow: 0 0 12px rgba(238,68,82,.7); transition: width .5s; }
.filter-hinweis { color: var(--muted); }
.lektionsliste { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 10px; }
.lektionsliste li { margin: 0; }
.lektionsliste a { height: 100%; }
.lektionsliste a { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); text-decoration: none; min-height: 56px; }
.lektionsliste a:hover { border-color: var(--accent); }
.lektionsliste .lt { min-width: 0; }
.lektionsliste strong { display: block; font: 800 17px/1.3 var(--f-head); color: var(--white); overflow-wrap: anywhere; }
.lektionsliste .d { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.haken { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.lektionsliste li.erledigt .haken { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }
.lektionsliste li.anderer-pfad { opacity: .55; }
.schalter { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; min-height: 44px; }
.schalter input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Pfadwahl */
.pfad-wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.pfad-karte { text-align: left; cursor: pointer; padding: 22px; border-radius: var(--r-l); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); font: inherit; min-width: 0; }
.pfad-karte:hover { border-color: var(--accent); }
.pfad-karte[aria-pressed="true"] { border-color: var(--accent); box-shadow: var(--glow); }
.pfad-karte .k { display: block; font: 800 12px/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.pfad-karte strong { display: block; font: 900 24px/1.1 var(--f-head); text-transform: uppercase; margin-bottom: 8px; }
.pfad-karte .d { display: block; color: var(--muted); }
.pfad-karte ul { margin: 12px 0 0; padding-left: 18px; font-size: 15px; }

/* Abschluss-Check */
.abschluss { margin: 56px 0 0; padding: 24px; border-radius: var(--r-l); border: 1px solid rgba(238,68,82,.45); background: radial-gradient(120% 140% at 0% 0%, rgba(238,68,82,.12), transparent 60%), var(--surface); max-width: var(--lesen); }
.abschluss h2 { margin-top: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hud-tag { font: 800 11px/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(238,68,82,.6); padding: 6px 8px; border-radius: var(--r-s); }
.frage { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.frage legend { font-weight: 700; color: var(--white); margin-bottom: 10px; padding: 0; }
.antwort { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); margin-bottom: 12px; cursor: pointer; min-height: 48px; }
.antwort:hover { border-color: var(--dim); }
.antwort input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.antwort span { min-width: 0; overflow-wrap: anywhere; }
.antwort.falsch { border-color: rgba(238,68,82,.7); }
.antwort.richtig { border-color: rgba(62,207,142,.7); background: var(--ok-soft); }
.check-ergebnis { margin: 14px 0 0; font-weight: 700; }
.check-ergebnis.ok { color: var(--ok); }
.check-ergebnis.nein { color: var(--warn); }
.prevnext { max-width: var(--lesen); margin-top: 24px; }

/* Profil */
.profil-hud { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.hud-karte { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: linear-gradient(180deg, var(--surface-2), var(--surface)); min-width: 0; }
.hud-karte .label { display: block; font: 800 11px/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.hud-karte b { display: block; font: 900 40px/1.1 var(--f-head); color: var(--white); margin: 8px 0 4px; overflow-wrap: anywhere; }
.hud-karte b.klein { font-size: 22px !important; line-height: 1.3; }
.hud-karte .d { color: var(--muted); font-size: 14px; }
.level-fortschritt { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: var(--lesen); }
.level-fortschritt li a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); text-decoration: none; }
.level-fortschritt .kopfzeile { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.level-fortschritt .lf-balken { margin: 10px 0 0; height: 6px; }
.level-fortschritt li.geschafft .lf-balken span { background: var(--ok); box-shadow: none; }
.abzeichen-gitter { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.abzeichen-gitter li { padding: 16px 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); opacity: .45; filter: grayscale(1); min-width: 0; }
.abzeichen-gitter li.hat { opacity: 1; filter: none; border-color: rgba(238,68,82,.5); box-shadow: 0 0 20px rgba(238,68,82,.15); }
.abzeichen-gitter .medaille { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ff8a94, var(--accent) 60%, #8e1c26); color: #fff; font: 900 20px/1 var(--f-head); box-shadow: 0 0 18px rgba(238,68,82,.5); }
.abzeichen-gitter strong { display: block; font-size: 14px; color: var(--white); overflow-wrap: anywhere; }
.abzeichen-gitter span.d { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }

/* Login */
.login-form { display: grid; gap: 12px; margin: 24px 0 12px; max-width: 460px; }
.login-form label { font-weight: 700; color: var(--white); }
input[type="email"], input[type="search"], input[type="text"], textarea, select {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); color: var(--white); font: 500 16px var(--f-text);
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(238,68,82,.2); }
.login-meldung { font-weight: 700; overflow-wrap: anywhere; }
.login-meldung a { word-break: break-all; }

/* Filter, Bibliotheken */
.filterleiste { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 24px 0 8px; }
.filterleiste > input[type=search] { flex: 2 1 280px; }
.filterleiste > select { flex: 1 1 160px; width: auto; }
.filterleiste > .schalter { flex: 0 0 auto; }
@media (max-width: 720px) { .filterleiste > * { flex: 1 1 100%; } }
.prompt-liste .prompt { margin: 16px 0; }
.prompt-liste .ptag a { color: var(--muted); text-decoration: none; letter-spacing: .06em; }
.prompt-liste .ptag a:hover { color: var(--white); }
.tabs { display: flex; gap: 12px; margin: 24px 0 0; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; color: var(--muted); font: 800 13px/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; padding: 14px 16px; cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--accent); }
.skill-gitter { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.skill { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); min-width: 0; }
.skill .k { font: 800 11px/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.skill h3 { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.skill p { margin: 0; font-size: 15px; color: var(--text); }
.skill .zeile { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.skill .zeile span { padding: 3px 8px; border-radius: var(--r-s); background: var(--surface-3); color: var(--muted); }
.skill .zeile .getestet { margin: 0; }
.skill pre { font-size: 13px; padding: 10px 12px; }
.skill .codewrap { margin: 4px 0 0; }
.skill .codewrap pre { padding: 48px 12px 12px; }
.rezept-liste { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 20px; }
.rezept-liste button { width: 100%; text-align: left; padding: 18px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; min-height: 100%; }
.rezept-liste button:hover { border-color: var(--accent); }
.rezept-liste strong { display: block; font: 800 18px/1.25 var(--f-head); color: var(--white); margin: 6px 0; }
.leer-hinweis { padding: 24px; border: 1px dashed var(--line); border-radius: var(--r-l); color: var(--muted); }
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 16px; }
.modal-box { position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid rgba(238,68,82,.5); border-radius: var(--r-l); padding: 24px; box-shadow: var(--glow); }
.modal-zu { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--white); font-size: 22px; cursor: pointer; }

/* Suche */
.suche { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.72); padding: 72px 16px 16px; }
.suche-box { max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid rgba(238,68,82,.45); border-radius: var(--r-l); padding: 14px; box-shadow: var(--glow); max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
#suche-treffer { list-style: none; margin: 10px 0 0; padding: 0; overflow-y: auto; }
#suche-treffer a { display: block; padding: 10px 12px; border-radius: var(--r-s); text-decoration: none; }
#suche-treffer a:hover, #suche-treffer a:focus { background: var(--surface-2); }
#suche-treffer .t { display: block; font-weight: 700; color: var(--white); }
#suche-treffer .s { display: block; font-size: 13px; color: var(--muted); }
.suche-zu { margin-top: 10px; align-self: flex-end; background: none; border: 1px solid var(--line); color: var(--white); border-radius: var(--r-s); padding: 8px 12px; cursor: pointer; }

/* Support-Chat */
.chat { margin-top: 12px; }
.chat-verlauf { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-verlauf li { padding: 14px 16px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); max-width: 100%; overflow-wrap: anywhere; }
.chat-verlauf li.du { align-self: flex-end; background: var(--surface-3); border-color: var(--surface-3); max-width: 88%; }
.chat-verlauf li.bot { border-left: 3px solid var(--accent); }
.chat-verlauf li.bot .wer { font: 800 11px/1 var(--f-head); letter-spacing: .16em; color: var(--accent); display: block; margin-bottom: 8px; }
.chat-verlauf li p { margin: 0 0 8px; }
.chat-verlauf li ol, .chat-verlauf li ul { margin: 0 0 8px; padding-left: 22px; }
.chat-verlauf .quellen { font-size: 13px; color: var(--muted); margin-top: 8px; }
.chat-verlauf li.denkt { color: var(--muted); }
.chat-eingabe { display: grid; gap: 10px; }
.chat-eingabe textarea { resize: vertical; min-height: 64px; }
.chat-knoepfe { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sprach-knopf .mic { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(238,68,82,.8); }
.sprach-knopf[aria-pressed="true"] { border-color: var(--accent); box-shadow: var(--glow); }
.sprach-knopf[aria-pressed="true"] .mic { animation: puls 1.2s infinite; }
.chat-status { min-height: 20px; margin-bottom: 8px; }

/* Level-Aufstieg */
.aufstieg { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0,0,0,.75); padding: 16px; }
.aufstieg-box { text-align: center; padding: 32px 28px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--glow), 0 0 80px rgba(238,68,82,.35); max-width: 420px; width: 100%; animation: rein .5s ease-out; }
.aufstieg-box .gross { font: 900 72px/1 var(--f-head); color: var(--accent); text-shadow: 0 0 30px rgba(238,68,82,.7); }
.aufstieg-box h2 { margin: 10px 0; }
@keyframes rein { from { transform: scale(.85); opacity: 0; } }

/* Fuß */
.fuss { margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ---------- Kleinere Bildschirme (zweitrangig, aber benutzbar) ---------- */
@media (max-width: 1500px) { :root { --leiste: 272px; --rechts: 320px; } }
@media (max-width: 1180px) {
  .rahmen { grid-template-columns: var(--leiste) minmax(0, 1fr); }
  .rechts { grid-column: 2; position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 24px clamp(16px, 3vw, 40px) 40px; }
  .r-toc { display: none; }
}
@media (max-width: 900px) {
  .rahmen { display: block; }
  .mobilkopf { display: flex; position: sticky; top: 0; z-index: 40; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(8,8,10,.94); border-bottom: 1px solid var(--line); }
  .mobilkopf button { min-height: 44px; padding: 0 14px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); color: var(--white); font: 800 13px var(--f-head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
  .mobilkopf .marke img { width: 96px; }
  .mobilkopf .marke .jarvis { font-size: 12px; letter-spacing: .22em; padding-left: 8px; }
  .mobilkopf .xp-chip { margin-left: auto; }
  .leiste { position: fixed; z-index: 60; left: 0; top: 0; width: min(86vw, 320px); transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  body.leiste-auf .leiste { transform: none; }
  body.leiste-auf .overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 55; }
  .rechts { display: flex; padding: 16px 16px 32px; }
  .app-main { padding: 24px 16px 24px; }
  .lektion-body { font-size: 17px; }
}
@media (max-width: 420px) { .mobilkopf .marke .jarvis { display: none; } }
@media (prefers-reduced-motion: reduce) { .station.aktuell .knoten, .sprach-knopf .mic { animation: none !important; } }

/* Start: So funktioniert's */
.so-gehts { margin: 0 0 36px; }
.sg-schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sg-schritte li { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.sg-nr { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font: 900 14px/1 var(--f-head); margin-bottom: 10px; }
.sg-schritte strong { display: block; font: 800 18px/1.2 var(--f-head); color: var(--white); }
.sg-schritte .d { display: block; color: var(--muted); font-size: 15px; margin-top: 6px; }
.karte-titel { margin-top: 0; }

/* Führung: genau ein leuchtendes Ziel je Seite */
.fuehrung-ziel { outline: 2px solid var(--accent) !important; outline-offset: 4px; animation: fuehrung-puls 1.8s ease-in-out infinite; }
@keyframes fuehrung-puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(238,68,82,.55), 0 0 18px rgba(238,68,82,.35); } 50% { box-shadow: 0 0 0 8px rgba(238,68,82,0), 0 0 32px rgba(238,68,82,.6); } }
.fuehrung-label { position: absolute; z-index: 45; pointer-events: none; font: 800 11px/1 var(--f-head); letter-spacing: var(--sperrung); text-transform: uppercase; color: #fff; background: var(--accent); padding: 6px 9px; border-radius: 6px; box-shadow: 0 0 16px rgba(238,68,82,.6); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .fuehrung-ziel { animation: none; box-shadow: 0 0 0 3px rgba(238,68,82,.35); } }

/* Visionary */
.v-form { display: grid; gap: 12px; max-width: 860px; }
.v-form label { font-weight: 700; color: var(--white); }
.v-form .schalter { font-weight: 500; color: var(--text); align-items: flex-start; }
.v-form .schalter input { margin-top: 3px; flex: none; }
.einwilligungen { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 8px; margin: 8px 0; }
.einwilligungen legend { font-weight: 800; color: var(--white); padding: 0 6px; }
.einreichungen { list-style: none; padding: 0; display: grid; gap: 12px; }
.einreichung { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.einreichung p { margin: 8px 0 0; }
.e-kopf { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.e-kopf strong { font: 800 18px/1.3 var(--f-head); color: var(--white); }
.e-status { font: 800 11px/1 var(--f-head); letter-spacing: .12em; text-transform: uppercase; padding: 6px 9px; border-radius: var(--r-s); background: var(--surface-3); color: var(--muted); }
.e-status.s-interesse, .e-status.s-deal { background: var(--ok-soft); color: var(--ok); }
.e-status.s-in_pruefung { background: var(--warn-soft); color: var(--warn); }
.e-status.s-abgelehnt { background: var(--accent-soft); color: var(--accent); }
.anfrage + .anfrage { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.a-bewerten { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.a-bewerten label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.a-notiz { grid-column: 1 / -1; }
.pitch { white-space: pre-wrap; }
.entwurf-banner { margin-bottom: 24px; }

/* Lesbarkeit: keine schmalen Textspalten, Karten-Innenabstand ≥ 16 px */
@media (max-width: 1500px) { .r-level { flex-direction: column; align-items: flex-start; gap: 14px; } }
.sw-schritte { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; }
.abzeichen-gitter { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
.filterleiste > .schalter { white-space: nowrap; }
.lektionsliste a { padding: 16px 18px; }
.merk { padding: 16px 20px; }
.chat-verlauf li { padding: 16px 18px; }
.einwilligungen { padding: 16px 20px; }
.pfad-karte { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; }
@media (max-width: 1600px) { .sw-schritte { grid-template-columns: minmax(0, 1fr) !important; } }
.abschluss, .lektion .prevnext { max-width: none; }

/* Seiten ohne rechte Spalte (z. B. /jarvis/): volle Breite bis 1760 px */
body.ohne-rechts .rahmen { grid-template-columns: var(--leiste) minmax(0, 1fr); }
body.ohne-rechts .app-main { max-width: 1760px; }
body.ohne-rechts .app-main > header { max-width: none; }
.anatomie-start { margin-top: 56px; }

.hauptnav a.unternav { min-height: 36px; padding: 6px 12px 6px 44px; font-size: 14px; color: var(--muted); }
.hauptnav a.unternav::before { content: "↳"; margin-right: 6px; color: var(--dim); }
.leiste-fuss .version { display: block; padding: 2px 4px 0; font: 600 11px/1.4 var(--f-mono); color: var(--dim); letter-spacing: .04em; }
/* Jarvis schläft (Ersatz, bis shared/fx einen Schlafmodus liefert) */
.schlaf { display: flex; gap: 18px; align-items: center; padding: 22px 24px; border-radius: var(--r-l); border: 1px solid var(--line); background: radial-gradient(120% 140% at 0% 0%, rgba(120,140,255,.07), transparent 60%), var(--surface); }
.schlaf-kern { flex: none; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle, rgba(238,68,82,.55), rgba(238,68,82,.08) 60%, transparent 70%); animation: atem 5s ease-in-out infinite; }
.schlaf strong { display: block; font: 800 18px/1.3 var(--f-head); color: var(--white); }
.schlaf span { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
@keyframes atem { 0%, 100% { transform: scale(.85); opacity: .45; } 50% { transform: scale(1.05); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .schlaf-kern { animation: none; opacity: .6; } }
/* Update-Fenster (Ersatz, bis shared/fx ein „Jarvis füttern“ liefert) */
.update-box { max-width: 520px; }
.update-box ul { text-align: left; margin: 12px 0; padding-left: 20px; }
.update-lade { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: 16px 0; }
.update-lade span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff7a85); transition: width 3s linear; }
.login-tabs { margin: 20px 0 8px; }
.login-form input[type="password"], .login-form input[type="text"] { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); color: var(--white); font: 500 16px var(--f-text); }
.login-meldung.nein { color: var(--warn); }
