:root {
  color-scheme: light;
  --grund: #f7f6f2; --flaeche: #ffffff; --text: #23252a; --leise: #5f636b;
  --linie: #dddbd3; --akzent: #0f6f62; --akzent-text: #ffffff;
  --gut: #1c7a4b; --schlecht: #b3382c; --code: #efeee8; --term: #14161a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --grund: #15171b; --flaeche: #1c1f24; --text: #e6e6e3; --leise: #a4aab3;
    --linie: #30343b; --akzent: #4cc2ae; --akzent-text: #0c1513;
    --gut: #7fdca3; --schlecht: #ff9a8f; --code: #2a2e35;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --grund: #15171b; --flaeche: #1c1f24; --text: #e6e6e3; --leise: #a4aab3;
  --linie: #30343b; --akzent: #4cc2ae; --akzent-text: #0c1513;
  --gut: #7fdca3; --schlecht: #ff9a8f; --code: #2a2e35;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--grund); color: var(--text);
  font: 16px/1.55 system-ui, sans-serif;
}
/* Die Zeile hat feste Höhe: Ein Zuschau-Terminal ist vor dem Skalieren größer als die Seite. */
.flaeche { --pfade-breite: 250px; display: grid; grid-template-columns: var(--pfade-breite) minmax(320px, 2fr) 3fr; grid-template-rows: minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.flaeche.ohne-pfade { --pfade-breite: 0px; }
.flaeche.ohne-pfade .pfade { display: none; }
.pfade {
  overflow-y: auto; min-height: 0; padding: 12px 10px 24px;
  background: var(--grund); border-right: 1px solid var(--linie); font-size: 14px;
}
.pfad-reiter { display: flex; gap: 4px; margin-bottom: 10px; }
.pfad-reiter button { flex: 1; font-size: 13px; padding: 4px 6px; }
.pfad-reiter button[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); font-weight: 600; }
.pfad-kopf { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 14px; margin-bottom: 10px; border-bottom: 1px solid var(--linie); }
.pfad-kopf p { margin: 0; font-size: 13px; }
.pfad-kopf select { width: 100%; padding: 6px 8px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; }
.pfad-kopf .pfad-karte { margin-top: 2px; }
/* Die Stufen hängen an einer Linie, das macht die Reihenfolge sichtbar. */
.pfade section { margin-left: 6px; padding: 0 0 12px 8px; border-left: 2px solid var(--linie); }
.pfade section.geschafft { border-left-color: var(--gut); }
.pfade h2 { margin: 0 0 4px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--leise); }
.pfad-eintrag {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: baseline;
  padding: 4px 8px; border-radius: 6px; color: var(--text); text-decoration: none;
}
.pfad-ersetzt { grid-column: 1 / -1; font-size: 12px; color: var(--leise); }
.pfad-eintrag.naechste:not([aria-current]) { box-shadow: inset 0 0 0 1px var(--akzent); }
.pfad-eintrag.naechste .pfad-stand { font-size: 12px; color: var(--akzent); }
.pfad-eintrag[aria-current] .pfad-ersetzt { color: inherit; }
a.pfad-eintrag:hover { background: var(--code); }
.pfad-eintrag[aria-current] { background: var(--akzent); color: var(--akzent-text); }
.pfad-eintrag[aria-current] .pfad-stand, .pfad-eintrag.naechste[aria-current] .pfad-stand { color: inherit; }
.pfad-stand { color: var(--leise); font-weight: 400; font-variant-numeric: tabular-nums; }
.pfade, .anleitung, .arbeit, .live { grid-row: 1; min-width: 0; }
.pfade { grid-column: 1; }
.anleitung { grid-column: 2; }
.arbeit { grid-column: 3; }
.anleitung {
  display: grid; grid-template-rows: auto 1fr auto; min-height: 0;
  background: var(--flaeche); border-right: 1px solid var(--linie);
}
.kopf { padding: 14px 24px 12px; border-bottom: 1px solid var(--linie); }
.kopf-zeile { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.kopf-zeile button { font-size: 13px; padding: 3px 8px; }
.stand { margin: 0; font-size: 14px; color: var(--leise); }
.balken { height: 4px; background: var(--code); border-radius: 2px; overflow: hidden; }
.balken span { display: block; height: 100%; width: 0; background: var(--akzent); transition: width .25s; }

.lektion { overflow-y: auto; padding: 8px 24px 24px; min-height: 0; }
.lektion h1 { font-size: 26px; line-height: 1.2; margin: 16px 0 8px; }
.lektion h2 { font-size: 18px; margin: 0 0 6px; }
.lektion code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .9em; font-family: ui-monospace, monospace; }
.lektion table { border-collapse: collapse; margin: 10px 0; }
.lektion th, .lektion td { border-bottom: 1px solid var(--linie); padding: 4px 16px 4px 0; text-align: left; }
.lektion a { color: var(--akzent); }
.abschnitt { padding: 14px 0; border-top: 1px solid var(--linie); }
.abschnitt.erledigt { color: var(--leise); }
.abschnitt.erledigt h2::before { content: "✓ "; color: var(--gut); }
.abschnitt.aktuell h2 { color: var(--akzent); }
.abschnitt.kommt { display: none; }

.steuerung { padding: 12px 24px 16px; border-top: 1px solid var(--linie); }
.meldung { margin: 0 0 10px; min-height: 1.5em; white-space: pre-wrap; font-size: 15px; }
.meldung.gut { color: var(--gut); }
.meldung.schlecht { color: var(--schlecht); }
.knoepfe, .werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; }
button {
  font: inherit; font-size: 14px; padding: 6px 12px; cursor: pointer;
  color: var(--text); background: transparent;
  border: 1px solid var(--linie); border-radius: 6px;
}
button:hover { border-color: var(--akzent); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
button.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }

.arbeit { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--term); }
.werkzeuge { padding: 8px 10px; justify-content: flex-end; }
.werkzeuge button { color: #e6e6e3; border-color: #4a4f57; }
.werkzeuge button[aria-pressed="true"] { background: #2d3138; border-color: #6d7480; }
.terminal { flex: 1; min-height: 0; min-width: 0; padding: 0 0 4px 6px; }
.terminal-rahmen { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.start-hinweis {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; margin: 0;
  background: rgb(20 22 26 / .85); color: #e6e6e3; font-size: 18px;
}
.werkzeuge { align-items: center; }
.werkzeuge #zur-klasse { margin-right: auto; color: #0c1513; background: #4cc2ae; }
.gast-figur { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #f0c674; }
.gast-figur svg { fill: #14161a; }
@media (prefers-reduced-motion: no-preference) {
  .gast-figur { animation: gast-atmen 2.4s ease-in-out infinite; }
  @keyframes gast-atmen { 50% { box-shadow: 0 0 0 5px rgb(240 198 116 / .3); } }
}
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hinweis { font-size: 14px; color: #14161a; background: #f0c674; padding: 3px 10px; border-radius: 6px; }
/* Liegt über Pfaden und Anleitung: Das eigene Terminal behält seine Größe, sonst
   schrumpfte mit ihm die Sitzung, und das sähen alle, die zuschauen. */
.live {
  grid-column: 1 / 3; z-index: 2; display: flex; flex-direction: column; min-height: 0;
  background: var(--term); border-right: 2px solid #f0c674; overflow: hidden;
}
.live.spotlight { border-right: 0; box-shadow: inset 0 0 0 4px #f0c674; }
.live.spotlight .live-titel {
  padding: 10px 16px; font-size: 18px; font-weight: 600; color: #14161a; background: #f0c674;
}
.live.spotlight .live-titel::before { content: "●"; margin-right: 10px; color: #b3382c; }
.live.spotlight #live-terminal { margin: 0 4px 4px; }
#live-terminal { padding: 0; }
#live-terminal { overflow: hidden; }
.live-titel { margin: 0; padding: 2px 10px; font-size: 13px; color: #f0c674; }

@media (max-width: 1000px) {
  .flaeche { --pfade-breite: 180px; grid-template-columns: var(--pfade-breite) minmax(280px, 1fr) 1fr; }
}
@media (max-width: 800px) {
  .flaeche { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
  .pfade, .anleitung, .arbeit { grid-column: 1; }
  .anleitung { grid-row: 2; }
  .arbeit { grid-row: 3; }
  .live { grid-column: 1; grid-row: 1 / 3; border-right: 0; border-bottom: 2px solid #f0c674; }
  .pfade {
    display: flex; gap: 16px; max-height: 96px; overflow: auto hidden; padding: 8px 12px;
    border-right: 0; border-bottom: 1px solid var(--linie);
  }
  .pfade section { flex: none; min-width: 170px; overflow-y: auto; }
  .pfade section { border-left: 0; padding: 0; margin: 0; }
  .pfad-reiter, .pfad-kopf { flex: none; width: 170px; }
  .anleitung { border-right: 0; border-bottom: 1px solid var(--linie); }
  .kopf, .lektion, .steuerung { padding-left: 16px; padding-right: 16px; }
}

/* Klassenübersicht */
body.klasse { height: auto; }
.seitenkopf { position: sticky; top: 0; z-index: 5; background: var(--grund); border-bottom: 1px solid var(--linie); }
.seitenkopf-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; max-width: 1800px; margin: 0 auto; padding: 10px 16px; }
.seitenkopf h1 { margin: 0; font-size: 20px; }
.seitenkopf p { margin: 0; font-size: 14px; }
.seitenkopf nav { margin-left: auto; }
.seitenkopf a:not(.knopf-link) { color: var(--akzent); font-size: 14px; }
.seitenkopf .pfad-reiter { margin: 0; }
.seitenkopf .pfad-reiter button { white-space: nowrap; }
.seitenkopf .pfad-reiter button[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); }
.seitenkopf button[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); }
.spot-leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; background: #f0c674; color: #14161a; font-weight: 600; }
.spot-leiste button { color: #14161a; border-color: #14161a; }
.klasse-inhalt { max-width: 1800px; margin: 0 auto; padding: 12px 16px 32px; }
.personen { margin-top: 20px; }
.personen summary { font-size: 16px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.kachel { display: flex; flex-direction: column; min-width: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.kachel header { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; min-height: 44px; }
.kachel-stand { flex: 1 1 120px; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aktionen { margin-left: auto; gap: 6px; }
.kachel button { font-size: 13px; padding: 3px 8px; }
.kachel button[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); }
.kachel-terminal { flex: 1; min-height: 0; aspect-ratio: 16 / 10; background: var(--term); overflow: hidden; cursor: zoom-in; }
.kachel.hervor .kachel-terminal { cursor: zoom-out; aspect-ratio: auto; }
.kachel.schreibt .kachel-terminal { cursor: text; }
.kachel.nur-lesen header strong::after { content: " · nur lesen"; font-weight: 400; color: var(--schlecht); }
.kachel.im-spotlight { border-color: #c9962c; box-shadow: 0 0 0 2px #c9962c; }
.kachel.schreibt { border-color: var(--schlecht); box-shadow: 0 0 0 2px var(--schlecht); }

/* Fokus: das Terminal in der Form der Sitzung, daneben alles andere. */
.neben { display: none; }
.kacheln.fokus { display: flex; align-items: flex-start; gap: 12px; }
.kacheln.fokus .kachel.hervor {
  order: -1; flex: 2 1 0; min-width: 0; height: calc(100dvh - 84px); scroll-margin-top: 72px;
  border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent);
}
.kacheln.fokus .kachel.hervor.schreibt { border-color: var(--schlecht); box-shadow: 0 0 0 2px var(--schlecht); }
.kacheln.fokus .kachel.hervor.im-spotlight { border-color: #c9962c; box-shadow: 0 0 0 2px #c9962c; }
.kacheln.fokus .neben {
  flex: 1 1 0; min-width: 0; max-height: calc(100dvh - 84px); overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 8px; align-content: start;
}
.neben .aktionen { display: none; }
.neben .personen { grid-column: 1 / -1; margin-top: 0; overflow-x: auto; }
@media (max-width: 900px) {
  .kacheln.fokus { flex-direction: column; }
  .kacheln.fokus .neben { max-height: none; width: 100%; }
}

.klasse-inhalt h1 { font-size: 26px; margin: 0 0 8px; }
.klasse-inhalt table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.klasse-inhalt th, .klasse-inhalt td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--linie); }
.klasse-inhalt a { color: var(--akzent); }
.klasse-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.klasse-kopf h1 { margin: 0 auto 0 0; }
.leise { color: var(--leise); }
.link-ausgabe { margin: 12px 0; padding: 10px 12px; background: var(--code); border-radius: 6px; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: 14px; }
.zeile-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
tr.gesperrt td { color: var(--leise); }

/* Anmeldung */
.anmeldung { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.anmeldung h1 { font-size: 26px; margin: 0 0 16px; }
.anmeldung label { display: block; margin: 12px 0 4px; font-size: 14px; }
.anmeldung input {
  width: 100%; font: inherit; padding: 8px 10px; color: var(--text);
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px;
}
.anmeldung button { margin-top: 16px; width: 100%; padding: 9px 12px; }
.fehler { color: var(--schlecht); min-height: 1.5em; margin: 12px 0 0; }
.live-liste { display: contents; }
.anmeldung .klein { width: auto; margin: 0; padding: 4px 10px; }
.abschluss { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf-link { font-size: 14px; padding: 6px 12px; border-radius: 6px; background: var(--akzent); color: var(--akzent-text); text-decoration: none; }
.knopf-link:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Roadmap-Karte: Stufen auf der Mittellinie, Themen links und rechts davon. */
.karte { padding: 16px 24px 64px; }
.karte-weg { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.karte-weg::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 3px solid var(--akzent); }
.stufe { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); align-items: center; gap: 28px; padding: 16px 0; }
.weg-kopf { display: grid; grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr); gap: 28px; margin-top: 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); }
.weg-kopf span:first-child { text-align: right; }
.stufe-name { position: relative; margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 16px; text-align: center; background: #f0c674; color: #14161a; }
/* Links vom Weg die Lektionen, rechts der Fall. Breite Bildschirme reihen sie nebeneinander. */
.seite { display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 8px; position: relative; }
.seite:empty { visibility: hidden; }
.seite.links { justify-content: flex-end; }
.seite.rechts { justify-content: flex-start; }
.seite::after { content: ""; position: absolute; top: 50%; width: 28px; border-top: 2px dashed var(--leise); }
.seite.links::after { right: -28px; }
.seite.rechts::after { left: -28px; }
.knoten {
  display: flex; flex-direction: column; gap: 1px; width: min(100%, 220px); padding: 8px 12px;
  text-align: left; background: var(--flaeche); border: 2px solid var(--linie); border-radius: 8px;
}
.knoten small { font-size: 12px; color: var(--leise); }
.knoten.naechste { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent); }
.knoten.dabei { border-color: #c9962c; }
.knoten.fertig { border-color: var(--gut); }
.knoten.fertig span::after { content: " ✓"; color: var(--gut); }
.feld {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10; width: min(100%, 460px); padding: 20px; overflow-y: auto;
  background: var(--flaeche); border-left: 1px solid var(--linie); box-shadow: -8px 0 24px rgb(0 0 0 / .2);
}
.feld h2 { margin: 0 32px 4px 0; font-size: 22px; }
.feld-zu { position: absolute; top: 14px; right: 14px; font-size: 18px; line-height: 1; }
.cram { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--linie); }
.cram-frage { font-size: 18px; }
.cram-loesung { margin: 12px 0; padding: 10px 12px; overflow-x: auto; border-radius: 6px; background: var(--term); color: #e6e6e3; font-family: ui-monospace, monospace; font-size: 14px; }
@media (max-width: 760px) {
  .karte-weg::before { left: 12px; }
  .stufe { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-left: 28px; }
  .stufe-name { order: -1; text-align: left; }
  .seite.links, .seite.rechts { align-items: stretch; }
  .seite::after { display: none; }
  .knoten { width: 100%; }
  .weg-kopf { display: none; }
}
.pfad-karte { display: block; margin-top: 10px; text-align: center; }
.xterm, .xterm-viewport, .xterm-screen { background-color: var(--term) !important; }
.konzept { position: sticky; top: 0; z-index: 1; margin: 12px 0; padding: 4px 14px; max-height: 45%; overflow-y: auto; background: var(--code); border-left: 3px solid var(--akzent); border-radius: 4px; }
.konzept h3 { margin: 8px 0 4px; font-size: 16px; }
#feld-konzepte h3 { margin: 16px 0 4px; font-size: 15px; }
#feld-konzepte ul { margin: 0; padding-left: 20px; }

/* Übersicht: Spielstand, Szenarien, Skills */
:root { --status-angefangen: #c9962c; --status-sicher: #2f6fb5; }
:root[data-theme="dark"] { --status-angefangen: #e0b350; --status-sicher: #7fb2ec; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --status-angefangen: #e0b350; --status-sicher: #7fb2ec; } }
.ansicht-reiter { display: flex; gap: 4px; }
.spielleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 12px 24px 0; }
.spiel-level { display: flex; align-items: center; gap: 10px; }
.level-zahl { padding: 4px 10px; border-radius: 999px; background: var(--akzent); color: var(--akzent-text); font-weight: 700; white-space: nowrap; }
.spiel-balken { width: min(220px, 50vw); height: 8px; border-radius: 4px; }
.spiel-wert { font-size: 14px; }
.abzeichen-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0 24px; }
.abzeichen { display: flex; padding: 8px 10px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); opacity: .6; }
.abzeichen.erreicht { opacity: 1; border-color: var(--gut); }
.karte .pfad-reiter { margin: 0 0 8px; }
.knoten.fall { border-left-width: 6px; border-left-color: var(--akzent); }
.knoten .examen-ok { color: var(--gut); }
.faelle { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; margin-top: 12px; }
.fall-karte { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--flaeche); border: 2px solid var(--linie); border-radius: 10px; cursor: pointer; }
.fall-karte:hover, .fall-karte:focus-visible { border-color: var(--akzent); outline: none; }
.fall-karte.geloest { border-color: var(--gut); }
.fall-karte h3 { margin: 0; font-size: 18px; }
.fall-karte p { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 8px; font-size: 12px; border-radius: 999px; border: 1px solid var(--linie); background: var(--code); }
.chip.angefangen { border-color: var(--status-angefangen); }
.chip.sicher { border-color: var(--status-sicher); }
.chip.gemeistert { border-color: var(--gut); }
.chip.gemeistert::after { content: " ✓"; color: var(--gut); }
.skill-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--leise); }
.skill-punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--linie); vertical-align: middle; }
.skill-punkt.angefangen { border-color: var(--status-angefangen); }
.skill-punkt.sicher { border-color: var(--status-sicher); }
.skill-punkt.gemeistert { border-color: var(--gut); background: var(--gut); }
.bereich-filter { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.bereich-filter button { font-size: 13px; padding: 2px 10px; }
.bereich-filter button[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); font-weight: 600; }
/* Das Netz liegt auf einer Fläche: ziehen verschiebt, Mausrad und zwei Finger zoomen. */
.netz-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 8px; }
.netz-leiste .bereich-filter { margin: 0; }
.netz-zoom { margin-left: auto; }
.netz { position: relative; overflow: hidden; height: max(420px, calc(100dvh - 200px)); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; cursor: grab; touch-action: none;
  background-image: radial-gradient(var(--linie) 1px, transparent 1px); background-size: 24px 24px; }
.netz.zieht { cursor: grabbing; }
.netz:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.netz-welt { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.netz-welt.gleitet { transition: transform .3s ease; }
.netz-linien { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.netz-linien .linie { fill: none; stroke: var(--linie); stroke-width: 1.5; }
.netz-linien .linie.hell { stroke: var(--akzent); stroke-width: 2.5; }
.netz-linien .linie.siehe { stroke: var(--status-angefangen); stroke-dasharray: 4 4; stroke-width: 2; }
.netz-spalten { display: grid; column-gap: 40px; width: max-content; padding: 8px 16px; }
.netz-bereich { align-self: stretch; padding: 10px 8px; font-size: 13px; font-weight: 600; color: var(--leise); border-top: 1px solid var(--linie); }
.netz-zelle { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--linie); }
.netz-bereich.gedimmt { opacity: .35; }
.skill-knoten { position: relative; display: flex; flex-direction: column; width: 100%; cursor: pointer; padding: 6px 10px; text-align: left; background: var(--flaeche); border: 2px solid var(--linie); border-radius: 8px; }
.skill-knoten span { font-size: 14px; font-weight: 600; }
.skill-knoten small { font-size: 11px; color: var(--leise); }
.skill-knoten.angefangen { border-color: var(--status-angefangen); }
.skill-knoten.sicher { border-color: var(--status-sicher); }
.skill-knoten.gemeistert { border-color: var(--gut); background: color-mix(in srgb, var(--gut) 12%, var(--flaeche)); }
.skill-knoten.gemeistert span::after { content: " ✓"; color: var(--gut); }
.skill-knoten.gedimmt { opacity: .35; }
.skill-knoten.gewaehlt { box-shadow: 0 0 0 3px var(--akzent); }
.skill-knoten.vorher, .skill-knoten.nachher { box-shadow: 0 0 0 2px var(--akzent); opacity: 1; }
.skill-knoten.verwandt { box-shadow: 0 0 0 2px var(--status-angefangen); opacity: 1; }
.feld-art { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.modi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.modi > * { flex: 1 1 100px; text-align: center; }
.modi-hilfe { font-size: 13px; }
.bezug h3 { margin: 14px 0 4px; font-size: 14px; }
.chip.thema { background: var(--flaeche); }
.konzept-block summary { cursor: pointer; font-weight: 600; padding: 2px 0; }
.konzept-text { margin: 4px 0 10px; font-size: 14px; }
.konzept-titel { margin: 2px 0; }
@media (max-width: 760px) {
  .ansicht-reiter { order: 3; width: 100%; }
  .ansicht-reiter button { flex: 1; }
}

/* Was ist neu */
.aenderung { margin-bottom: 32px; }
.aenderung h2 { margin-bottom: 8px; }
.ist-neu { outline: 2px solid var(--akzent); outline-offset: -2px; }

/* Das Feld dockt rechts an, die Übersicht rückt zur Seite statt darunter zu verschwinden. */
@media (min-width: 1100px) {
  body.mit-feld .feld { width: min(460px, 40vw); box-shadow: none; }
}

/* Übersicht aller Themenfelder */
.themen { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.themen-karte { display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: left; padding: 16px; border-radius: 10px; }
.themen-karte h3 { margin: 0; font-size: 18px; }
.themen-karte p { margin: 0; }
.themen-karte:hover, .themen-karte:focus-visible { border-color: var(--akzent); }
/* Lernen, Drill und Examen als drei Karten */
.modi { flex-direction: column; }
.modus { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--linie); border-radius: 8px; text-align: left; }
.modus h3 { grid-column: 1; margin: 0; font-size: 15px; }
.modus p { grid-column: 1; margin: 2px 0; font-size: 13px; }
.modus small { grid-column: 1; }
.modus > button, .modus > a { grid-column: 2; grid-row: 1 / span 3; min-width: 84px; text-align: center; }
.modus[hidden] { display: none; }
.cram-eingabe { display: block; margin: 8px 0; }
.cram-eingabe textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; font: 14px ui-monospace, monospace; color: var(--text); background: var(--code); border: 1px solid var(--linie); border-radius: 6px; resize: vertical; }
.cram-eingabe textarea:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.urteil-ok { color: var(--gut); font-weight: 600; }
.urteil-offen { color: var(--leise); }

/* Markdown aus Lerntexten: Absätze, Listen, Code und Zitate lesbar, in Lektion und Übersicht gleich */
.md > :first-child, .lektion .abschnitt > :nth-child(2) { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .lektion p { margin: 0 0 .75em; line-height: 1.55; }
.md ul, .md ol, .lektion ul, .lektion ol { margin: 0 0 .75em; padding-left: 1.4em; }
.md li + li, .lektion li + li { margin-top: .25em; }
.md code, .lektion code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .9em; font-family: ui-monospace, monospace; }
.md pre, .lektion pre { margin: .5em 0 .9em; padding: 10px 12px; overflow-x: auto; border-radius: 6px; background: var(--term); color: #e6e6e3; font-size: 13.5px; line-height: 1.5; }
.md pre code, .lektion pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.md blockquote, .lektion blockquote { margin: .5em 0 .9em; padding: 2px 12px; border-left: 3px solid var(--akzent); color: var(--leise); }
.md h3, .md h4, .lektion h3, .lektion h4 { margin: 1em 0 .4em; font-size: 15px; }
.md table, .lektion table { border-collapse: collapse; margin: .5em 0 .9em; font-size: .95em; }
.md th, .md td { border-bottom: 1px solid var(--linie); padding: 4px 14px 4px 0; text-align: left; }
.md hr, .lektion hr { border: 0; border-top: 1px solid var(--linie); margin: 1em 0; }

.marke { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.marke:hover, .marke:focus-visible { color: var(--akzent); }
.seitenkopf h1 a.marke { font-size: inherit; color: var(--text); }
.seitenkopf h1 a.marke:hover, .seitenkopf h1 a.marke:focus-visible { color: var(--akzent); }

/* Modus: Lernen, Drill, Examen, Lektion. Die Farbe steht oben und als Rand der Anleitung. */
body { --modus: var(--akzent); }
body[data-modus="lernen"] { --modus: var(--status-sicher, #2f6fb5); }
body[data-modus="drill"] { --modus: var(--akzent); }
body[data-modus="examen"] { --modus: var(--schlecht); }
body[data-modus="wiederholung"] { --modus: var(--status-angefangen, #c9962c); }
.modus-marke { margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--modus); color: var(--akzent-text, #fff); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
body[data-modus="examen"] .modus-marke, body[data-modus="lernen"] .modus-marke { color: #fff; }
.modus-hilfe { margin: 6px 0 0; font-size: 13px; }
.anleitung { box-shadow: inset 0 3px 0 var(--modus); }
.lernkarte-frage { font-size: 18px; margin: 8px 0; }
.lernkarte-eingabe { display: block; margin: 8px 0; }
.lernkarte-eingabe textarea { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 8px 10px; font: 14px ui-monospace, monospace; color: var(--text); background: var(--code); border: 1px solid var(--linie); border-radius: 6px; resize: vertical; }
.lernkarte-eingabe textarea:focus-visible { outline: 2px solid var(--modus); outline-offset: 1px; }

.lernhilfe-gezeigt { display: grid; gap: 8px; margin: 8px 0; }
.lernhilfe-block { padding: 8px 12px; border-left: 3px solid var(--modus); background: var(--code); border-radius: 4px; }
.lernhilfe-block .md p { margin: 2px 0 0; }
.lernerklaerung { margin: 8px 0; }
.lernhilfe .zeile-knoepfe, .lernloesung .zeile-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

.nachgelesen { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--modus); background: var(--code); border-radius: 4px; }
.nachgelesen h3 { margin: 0 0 4px; font-size: 14px; }

/* Szenarien in Gruppen */
.fall-gruppe { margin-top: 22px; }
.fall-gruppe-kopf { display: flex; align-items: baseline; gap: 12px; }
.fall-gruppe-kopf h2 { margin: 0; font-size: 20px; }
.fall-gruppe-text { margin: 2px 0 0; font-size: 14px; }
.fall-bereiche .chip.bereich { background: none; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
/* Skills: Geplantes, Suche */
.skill-suche { font: inherit; font-size: 14px; padding: 4px 10px; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; min-width: 180px; }
.skill-suche:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
#geplant-zeigen { font-size: 13px; padding: 4px 10px; }
#geplant-zeigen[aria-pressed="true"] { background: var(--code); border-color: var(--akzent); }
.skill-punkt.geplant { border-style: dashed; }
.bereich-filter button.geplant { border-style: dashed; }
.skill-knoten.geplant { border-style: dashed; background: transparent; }
.skill-knoten.geplant span { color: var(--leise); font-weight: 500; }
.skill-knoten.treffer { box-shadow: 0 0 0 2px var(--akzent); }
.netz-bereich.geplant small { display: block; font-weight: 400; font-size: 11px; }
.netz-zelle.geplant, .netz-bereich.geplant { border-top-style: dashed; }
.chip.geplant { border-style: dashed; color: var(--leise); }
#netz-linien path.plan { stroke-dasharray: 4 4; opacity: .6; }

.wahl { display: grid; gap: 6px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--linie); border-left: 3px solid var(--modus); border-radius: 6px; }
.wahl p { margin: 0 0 4px; }
.wahl-option { display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 10px; }
.wahl-option span { flex: none; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--code); font-weight: 700; font-size: 12px; }
.wahl-option code { background: none; padding: 0; font-size: 14px; overflow-wrap: anywhere; }

.frei-eingabe { width: 100%; box-sizing: border-box; padding: 8px 10px; font: 14px ui-monospace, monospace; color: var(--text); background: var(--code); border: 1px solid var(--linie); border-radius: 6px; }
.frei-eingabe:focus-visible { outline: 2px solid var(--modus); outline-offset: 1px; }

.zeigen { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--modus); background: var(--code); border-radius: 4px; }
.zeigen .cram-loesung { margin: 6px 0; }
.teile { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 4px 0 0; font-size: 14px; }
.teile dt { margin: 0; }
.teile dd { margin: 0; color: var(--leise); overflow-wrap: anywhere; }

.krume { margin: 0 0 6px; font-size: 13px; color: var(--leise); }
.krume a { color: var(--leise); text-decoration: none; }
.krume a:hover, .krume a:focus-visible { color: var(--akzent); text-decoration: underline; }
.krume a:first-child { font-weight: 700; color: var(--text); }
.krume span { color: var(--text); }

.ansicht-hilfe { margin: 0 0 10px; font-size: 14px; max-width: 70ch; }
.modus .schritt { display: inline-block; width: 20px; height: 20px; line-height: 20px; margin-right: 4px; text-align: center; border-radius: 50%; background: var(--code); font-size: 12px; }
.modus.empfohlen { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent); }
.modus.empfohlen .schritt { background: var(--akzent); color: var(--akzent-text); }
.empfohlen-marke { margin-left: 6px; padding: 0 8px; font-size: 11px; font-style: normal; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--akzent); border: 1px solid var(--akzent); border-radius: 999px; }

.faellig { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.knopf-link.aus { background: var(--code); color: var(--leise); pointer-events: none; }
.faellig-liste { margin: 0 24px 8px; font-size: 14px; }
.faellig-liste summary { cursor: pointer; color: var(--leise); }
.faellig-liste p { margin: 4px 0; }
.modi-punkte { display: flex; gap: 4px; margin-top: 4px; }
.modus-punkt { width: 20px; height: 20px; line-height: 18px; text-align: center; border-radius: 50%; font-size: 11px; font-weight: 700; border: 2px solid var(--linie); color: var(--leise); }
.modus-punkt.begonnen { border-color: var(--status-angefangen); color: var(--text); }
.modus-punkt.fertig { border-color: var(--gut); background: var(--gut); color: #fff; }
.modus-punkt.abgelaufen { border-color: var(--schlecht); color: var(--schlecht); }
.modus[data-zustand="fertig"] h3::after { content: " ✓"; color: var(--gut); }
.modus[data-zustand="abgelaufen"] h3::after { content: " läuft ab"; color: var(--schlecht); font-size: 12px; font-weight: 600; }
.alles-erledigt { color: var(--gut); font-weight: 600; }

/* Logo */
.logo { display: block; height: 24px; width: auto; fill: currentColor; shape-rendering: crispEdges; }
.logo .cursor { fill: var(--akzent); animation: cursor-blinken 1.1s steps(1) infinite; }
@keyframes cursor-blinken { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .logo .cursor { animation: none; } }
.logo-link { display: inline-block; margin: 0 0 10px 4px; color: var(--text); }
.logo-link:hover, .logo-link:focus-visible { color: var(--akzent); }
.seitenkopf h1 a.marke { display: inline-block; }
.seitenkopf h1 .logo { height: 24px; }
.pfad-kopf { gap: 8px; }

/* Pixelfiguren und Abzeichen */
.figur svg, .figur-klein { display: block; image-rendering: pixelated; }
.figur { flex: none; }
.person-zelle { display: flex; align-items: center; gap: 8px; }
.abzeichen { display: flex; align-items: center; gap: 10px; }
.abzeichen svg { flex: none; }
.abzeichen div { display: grid; gap: 2px; }

/* Die Kopfzeile bleibt, wie sie ist: Das Seitenfeld sitzt darunter und schiebt nur den Inhalt zur Seite. */
.seitenkopf { position: sticky; top: 0; z-index: 11; background: var(--grund); }
.feld { top: var(--kopf-hoehe, 57px); }
@media (min-width: 1100px) {
  body.mit-feld > :not(.feld):not(.seitenkopf) { margin-right: min(460px, 40vw); }
  body.mit-feld > .seitenkopf { margin-right: 0; }
}

/* Übersicht der Klasse */
.uebersicht { margin-bottom: 18px; }
.uebersicht summary, .personen summary { cursor: pointer; font-weight: 600; }
.uebersicht-titel { margin: 16px 0 2px; font-size: 16px; }
.personen-karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.personen-karte { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); }
.personen-karte.gesperrt { opacity: .55; }
.personen-kopf { display: flex; align-items: center; gap: 12px; }
.personen-kopf > div { display: grid; }
.kurs-balken { display: grid; gap: 4px; }
.kurs-zeile { display: grid; grid-template-columns: minmax(0, 9em) 1fr; align-items: center; gap: 8px; font-size: 12px; }
.kurs-zeile > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personen-fuss { margin: 0; font-size: 12px; }
.abzeichen-verteilung { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.verteilung-feld { display: grid; justify-items: center; gap: 2px; min-width: 44px; }
.verteilung-feld small { font-size: 11px; color: var(--leise); }

/* Figur anklickbar, Großansicht */
.figur, .figur-knopf { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
.figur:hover, .figur:focus-visible, .figur-knopf:hover, .figur-knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.figur-fenster { width: min(680px, 94vw); max-height: 90vh; padding: 20px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--text); }
.figur-fenster::backdrop { background: rgb(0 0 0 / .55); }
.figur-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.figur-kopf h2 { margin: 0; font-size: 22px; }
.figur-kopf p { margin: 2px 0 0; }
.figur-inhalt { display: grid; grid-template-columns: auto 1fr; gap: 24px; margin-top: 14px; }
.figur-mitte { display: grid; justify-items: center; align-content: start; gap: 6px; }
.figur-mitte svg { image-rendering: pixelated; }
.figur-abzeichen { display: grid; gap: 8px; max-height: 56vh; overflow-y: auto; padding-right: 6px; align-content: start; }
.figur-abzeichen-zeile { display: flex; align-items: center; gap: 10px; opacity: .55; }
.figur-abzeichen-zeile.erreicht { opacity: 1; }
.figur-abzeichen-zeile > div { display: grid; }
@media (max-width: 560px) { .figur-inhalt { grid-template-columns: 1fr; } }

kbd { margin-left: 6px; padding: 0 5px; font: 11px ui-monospace, monospace; border: 1px solid currentColor; border-radius: 4px; opacity: .75; }

.figur-abzeichen-zeile.ersetzt { opacity: .6; }
.figur-abzeichen-zeile.ersetzt strong { font-weight: 500; text-decoration: line-through; text-decoration-color: var(--leise); }

/* Vorbereitung: ein unbestimmter Balken, der läuft, solange der Trainer etwas vorbereitet */
.balken.unbestimmt span { width: 30% !important; animation: balken-laeuft 1.4s ease-in-out infinite alternate; }
@keyframes balken-laeuft { from { margin-left: 0; } to { margin-left: 70%; } }
@media (prefers-reduced-motion: reduce) { .balken.unbestimmt span { animation: none; margin-left: 35%; } }

.figur-inhalt { max-height: 74vh; overflow-y: auto; padding-right: 6px; }
.figur-abzeichen { max-height: none; overflow: visible; }

/* Spotlight: Was die Instructors allen zeigen, steht bei allen als Fenster mittig über der Seite. */
.live-schleier { position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / .6); }
.live.spotlight { position: fixed; z-index: 60; inset: 5vh 5vw; display: flex; flex-direction: column; border-radius: 12px; background: var(--term); box-shadow: 0 0 0 4px #f0c674, 0 24px 80px rgb(0 0 0 / .6); overflow: hidden; }
.live.spotlight #live-terminal { flex: 1; min-height: 0; margin: 0 8px 8px; }
.live-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-zu { margin: 6px 8px 0 0; }

.gast-figur { display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 4px; border: 2px solid var(--schlecht); border-radius: 999px; background: var(--flaeche); }
.gast-figur svg { display: block; image-rendering: pixelated; }
.gast-text { font-size: 13px; }

/* Hinweise stehen in einer eigenen Zeile über dem Terminal, nicht mitten zwischen den Knöpfen */
.hinweiszeile { position: absolute; top: 58px; right: 14px; z-index: 6; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; max-width: 70%; pointer-events: none; }
.hinweiszeile:not(:has(> :not([hidden]))) { display: none; }

/* Stand exportieren und importieren */
.stand-spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 10px; }
.stand-karte { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); }
.stand-karte h3 { margin: 0; font-size: 16px; }
.stand-karte label { display: grid; gap: 4px; font-size: 14px; }
.stand-karte select, .stand-karte input[type="file"] { font: inherit; }
.import-tabelle { border-collapse: collapse; font-size: 14px; }
.import-tabelle th, .import-tabelle td { padding: 4px 10px 4px 0; text-align: left; border-bottom: 1px solid var(--linie); }
.uebersicht-kopf { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.uebersicht-kopf p { margin: 0; }

.pfad-kurs { margin: 4px 0 0; font-size: 17px; }

/* Personenliste im Fokus und gehobene Hände */
.fokus-liste { grid-column: 1 / -1; display: grid; gap: 4px; }
.fokus-person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 6px 10px; text-align: left; border-radius: 8px; }
.fokus-person .fokus-text { display: grid; min-width: 0; }
.fokus-person .fokus-text * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fokus-person.aktuell { border-color: var(--akzent); background: var(--code); }
.fokus-person.aus { opacity: .55; }
.fokus-person.hand, .personen-karte.hand, .kachel.hand { border-color: #f0c674; box-shadow: 0 0 0 2px #f0c674; }
.fokus-marken { font-size: 13px; white-space: nowrap; }
.kacheln:not(.fokus) .fokus-liste, #neben:empty { display: none; }
.kacheln.fokus ~ .personen { display: none; }

/* Einladen */
.einladungen-fenster { width: min(720px, 94vw); max-height: 90vh; overflow-y: auto; padding: 20px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--text); }
.einladungen-fenster::backdrop { background: rgb(0 0 0 / .55); }
.einladen-formulare { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 12px 0; }
.einladungen-liste { display: grid; gap: 8px; }
.einladung { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--linie); border-radius: 8px; }
.einladung > div:first-child { display: grid; }
.einladung.aus { opacity: .6; }

/* Reihenfolge: Lernen, Drill, Examen */
.modus.vorbehalten h3::after { content: " · danach"; font-weight: 400; font-size: 12px; color: var(--leise); }
.modus.vorbehalten .knopf-link { background: var(--code); color: var(--text); border: 1px solid var(--linie); }
.vorher-fenster { width: min(480px, 92vw); padding: 20px; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche); color: var(--text); }
.vorher-fenster::backdrop { background: rgb(0 0 0 / .55); }
.vorher-fenster h2 { margin: 0 0 8px; font-size: 20px; }

.arbeit { position: relative; }

.antwort-feld { display: grid; gap: 8px; margin-top: 12px; }
.antwort-feld .frei-eingabe { width: 100%; }

/* Wechsel zwischen Klasse und eigener Sitzung: rot, damit es nicht wie eine Aktion aussieht */
.knopf-link.wechsel { background: #d6333f; color: #fff; font-weight: 600; }
.knopf-link.wechsel:hover { background: #b02530; }
.seitenkopf .knopf-link.wechsel { margin-right: auto; }
.werkzeuge .knopf-link.wechsel { margin-right: 8px; }

.live-zoom { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; }
.live-zoom button { font-size: 13px; padding: 3px 8px; }

.antwort-label { font-weight: 600; font-size: 14px; }
.antwort-zeile { display: flex; align-items: stretch; border: 2px solid var(--modus, var(--akzent)); border-radius: 8px; background: var(--flaeche); overflow: hidden; }
.antwort-zeile:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--modus, var(--akzent)) 35%, transparent); }
.antwort-vorsatz { display: flex; align-items: center; padding: 0 12px; font: 600 16px ui-monospace, monospace; background: var(--code); color: var(--leise); border-right: 1px solid var(--linie); }
.antwort-eingabe { flex: 1; min-width: 0; padding: 12px; font: 16px ui-monospace, monospace; color: var(--text); background: var(--flaeche); border: 0; outline: 0; }
.antwort-eingabe::placeholder { color: var(--leise); font-style: italic; }
.antwort-zeile button { border: 0; border-radius: 0; padding: 0 16px; }

/* Die Leiste bricht nie um, sonst würde ein zusätzlicher Knopf das Terminal darunter verkleinern. */
.werkzeuge { flex-wrap: nowrap; overflow-x: auto; flex-shrink: 0; }
.werkzeuge > * { flex-shrink: 0; white-space: nowrap; }

/* Personenliste des Instructors */
.personen table { width: 100%; border-collapse: collapse; }
.personen th { text-align: left; font-size: 12px; font-weight: 500; color: var(--leise); padding: 6px 10px; }
.personen td { padding: 8px 10px; vertical-align: middle; border-top: 1px solid var(--linie); }
.person-info { display: grid; gap: 2px; min-width: 0; }
.person-zelle { display: flex; align-items: center; gap: 10px; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover, tr.klickbar:focus-visible { background: var(--code); outline: none; }
.status-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; background: var(--code); color: var(--leise); }
.status-chip.an { background: color-mix(in srgb, #3fb68b 25%, transparent); color: var(--text); }
.status-chip.gesperrt { background: color-mix(in srgb, #d6333f 25%, transparent); color: var(--text); }
.personen td:last-child .zeile-knoepfe { justify-content: flex-end; flex-wrap: wrap; }
.personen td:last-child button { font-size: 12px; padding: 3px 8px; }
#form-schicken label { display: grid; gap: 4px; }
#form-schicken select { padding: 8px; }

/* Erledigte Aufgaben stehen nicht im Text, nur mit Haken im Menü links; ein Klick dort zeigt sie. */
.abschnitt.erledigt:not(.aufgeklappt) { display: none; }
.abschnitt.erledigt.aufgeklappt { border-left: 3px solid var(--gut); padding-left: 12px; }
.pfad-aufgaben { display: grid; gap: 2px; margin: 2px 0 6px 14px; }
.pfad-aufgaben button { text-align: left; font-size: 13px; padding: 3px 8px; border: 0; background: transparent; color: var(--leise); cursor: pointer; border-radius: 6px; }
.pfad-aufgaben button:hover, .pfad-aufgaben button[aria-expanded="true"] { background: var(--code); color: var(--text); }

/* Das Thema steht in einem Fenster über der Übersicht, nicht mehr in einer Seitenleiste. */
.feld, body.mit-feld .feld {
  top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); z-index: 30;
  width: min(760px, 94vw); max-height: 88vh; border: 1px solid var(--linie); border-radius: 14px;
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / .55), 0 12px 40px rgb(0 0 0 / .4);
}
@media (min-width: 1100px) {
  body.mit-feld > :not(.feld):not(.seitenkopf) { margin-right: 0; }
}
.start-pille { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--akzent); color: var(--akzent-text); }
.knoten:not(:hover):not(:focus-visible):not(.karte-gewaehlt) .start-pille, .karte:not(:hover):not(:focus-visible):not(.karte-gewaehlt) .start-pille { opacity: .55; }
.karte-gewaehlt { outline: 2px solid var(--akzent); outline-offset: 2px; }
.logo-link .logo, .seitenkopf .logo { height: 24px; }

/* Der Erklärblock oben hat seine eigene Farbe, damit er sich von Aufgabe und „So geht es“ abhebt. */
.konzept { background: color-mix(in srgb, #9b6bff 14%, var(--code)); border-left-color: #9b6bff; }
.konzept h3 { color: #b99aff; }
[data-theme="light"] .konzept h3 { color: #6b3fd4; }
