/* Variante B im Kurs (entschieden Friedrich 2026-11-04), gemeinsam für die Schritte ab Konzept:
   Band „Steht fest“ statt Eingabefeldern für Entschiedenes, Ergebnisse als ruhige Karten untereinander,
   jedes Feld direkt änderbar, Hinweise zugeklappt, Figuren und Szenen als Fenster. */
.steht-fest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 18px; padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(201,123,79,0.35); background: rgba(0,0,0,0.22); font-family: var(--sans); font-size: 0.9rem; color: var(--cream); }
.steht-fest.hidden { display: none; }
.steht-fest-name { font-weight: 700; margin-right: 4px; }
.fest-chip { display: inline-flex; gap: 6px; align-items: baseline; max-width: 100%; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,0.3); }
.fest-chip small { color: var(--cream-dim); }
.fest-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.steht-fest a { color: var(--copper-glow); font-size: 0.85rem; margin-left: auto; }
.kb { margin: 0 0 30px; }
.kb h2 { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 500; color: var(--cream); margin: 0 0 4px; }
.kb h2 em { color: var(--copper-glow); }
.kb-sub { color: var(--cream-dim); font-family: var(--sans); font-size: 0.95rem; margin: 0 0 18px; }
.kb-karte { background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)); border: 1px solid rgba(201,123,79,0.5); border-radius: 8px; padding: clamp(18px, 3.5vw, 28px); margin: 0 0 14px; color: var(--cream); }
.kb-karte h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin: 0 0 12px; color: var(--cream); }
.kb-feld { margin: 0 0 14px; }
.kb-feld:last-child { margin-bottom: 0; }
.kb-feld label { display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-glow); margin: 0 0 6px; }
.kb-feld textarea { display: block; width: 100%; box-sizing: border-box; min-height: 60px; padding: 18px 16px 14px; border-radius: 12px; border: 1px solid rgba(244,237,222,0.16); background: rgba(0,0,0,0.28); color: var(--cream); font: 400 1rem/1.55 var(--sans); resize: vertical; field-sizing: content; }
.kb-feld textarea:focus-visible { outline: none; border-color: var(--copper-glow); box-shadow: 0 0 0 3px rgba(224,144,96,0.3); }
.kb-hint { font-family: var(--sans); font-size: 0.85rem; color: var(--cream-dim); margin: -6px 0 14px; }
details.kb-mehr, details.kb-vorab { border: 1px solid rgba(201,123,79,0.35); border-radius: 8px; margin: 0 0 14px; background: rgba(0,0,0,0.18); color: var(--cream); }
details.kb-mehr > summary, details.kb-vorab > summary { cursor: pointer; padding: 14px 18px; min-height: 44px; font-family: var(--sans); font-weight: 600; }
details.kb-mehr > div, details.kb-vorab > div { padding: 0 18px 18px; }
details.kb-vorab p { margin: 0 0 10px; line-height: 1.6; }
.kb .sk-wrap { background: rgba(0,0,0,0.2); border-color: rgba(244,237,222,0.1); }
.kb .sk-grid { stroke: rgba(244,237,222,0.12); }
.kb .sk-axis, .kb .sk-phase { fill: rgba(244,237,222,0.6); }
.kb .sk-dot { stroke: #1A1410; }
.kb .sk-val { fill: var(--copper-glow); }
.kb .fehler-list li { color: var(--cream); border-bottom-color: rgba(244,237,222,0.1); }
.kb h4 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--copper-glow); margin: 16px 0 8px; }

/* Liste zum Öffnen (Figuren, später Szenen): eine Zeile je Eintrag, Rolle als Überschrift */
.kb-liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 14px; }
.kb-zeile { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: var(--cream); background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)); border: 1px solid rgba(201,123,79,0.5); border-radius: 8px; padding: 16px 20px; transition: border-color 160ms ease, background 160ms ease, transform 120ms ease; }
.kb-zeile:hover, .kb-zeile:focus-visible { border-color: var(--copper-glow); background: linear-gradient(180deg, rgba(201,123,79,0.18), rgba(201,123,79,0.06)); outline: none; }
.kb-zeile:active { transform: scale(0.99); }
.kb-zeile.haupt { border-color: var(--gold, #C8A653); }
.kb-rolle { display: block; font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--copper-glow); margin: 0 0 4px; }
.kb-zeile b { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.kb-zeile small { display: block; margin-top: 3px; color: var(--cream-dim); font-family: var(--sans); font-size: 0.9rem; }
.kb-oeffnen { flex: none; font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--copper-glow); }
dialog.kb-fenster { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 40px); margin: auto; padding: 0; border: 1px solid rgba(201,123,79,0.5); border-radius: 10px; background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)), #141B2A; color: var(--cream); overscroll-behavior: contain; }
dialog.kb-fenster::backdrop { background: rgba(5,8,16,0.72); backdrop-filter: blur(4px); }
dialog.kb-fenster[open] { animation: kb-auf 200ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes kb-auf { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { dialog.kb-fenster[open] { animation: none; } }
.kb-fenster-innen { position: relative; padding: clamp(18px, 4vw, 30px); }
.kb-fenster-innen h3 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 4px; padding-right: 52px; }
.kb-fenster-innen .kb-sub { margin-bottom: 18px; }
.kb-zu { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(244,237,222,0.25); background: rgba(0,0,0,0.3); color: var(--cream); font-size: 1.3rem; cursor: pointer; }
.kb-blaettern { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.kb-blaettern button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(244,237,222,0.4); background: transparent; color: var(--cream); font: 600 0.92rem/1 var(--sans); cursor: pointer; }
.kb-blaettern button:hover { border-color: var(--copper-glow); }

/* Spannungskurve über den Szenen (T13): Balken anklickbar, öffnen die Szene */
.kb-kurve { display: flex; align-items: flex-end; gap: 6px; height: 150px; margin: 26px 0 34px 22px; position: relative; border-bottom: 1px solid rgba(201,123,79,0.35); background: linear-gradient(to top, rgba(244,237,222,0.08) 1px, transparent 1px) 0 0 / 100% 50%; }
.kb-kurve::before { content: "10"; position: absolute; left: -22px; top: -8px; font: 0.7rem var(--sans); color: var(--cream-dim); }
.kb-kurve::after { content: "5"; position: absolute; left: -16px; top: calc(50% - 8px); font: 0.7rem var(--sans); color: var(--cream-dim); }
.kb-kurve button { flex: 1; min-width: 0; border: 0; padding: 0; border-radius: 6px 6px 0 0; cursor: pointer; position: relative; background: linear-gradient(to top, #8A4A22, var(--f, #F2B066)); transition: filter 160ms ease; }
.kb-kurve button:hover, .kb-kurve button:focus-visible { filter: brightness(1.2); outline: none; }
.kb-kurve button span { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font: 700 0.75rem var(--sans); color: var(--cream); }
.kb-kurve button i { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font: normal 0.7rem var(--sans); color: var(--cream-dim); }
.kb-akt { margin: 0 0 18px; }
.kb-akt > h3 { font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold, #C8A653); margin: 0 0 10px; }
.kb-akt .kb-liste { gap: 8px; }
.kb-akt .kb-zeile { padding: 12px 18px; }
.kb-akt .kb-zeile b { font-size: 1.05rem; }

/* Manuskript (Schritt VI): jede Szene eine ruhige Karte, der Text darin direkt änderbar */
.kb-ms .szene { margin: 0 0 14px; padding: clamp(18px, 3.5vw, 28px); background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)); border: 1px solid rgba(201,123,79,0.5); border-left-width: 1px; border-radius: 8px; color: var(--cream); }
.kb-ms .szene-head { border-bottom-color: rgba(244,237,222,0.12); }
.kb-ms .szene-num { color: var(--copper-glow); background: none; padding: 0; letter-spacing: 0.2em; }
.kb-ms .szene-titel { color: var(--cream); font-weight: 600; }
.kb-ms .szene-meta { color: var(--cream-dim); }
.kb-ms .prosa { color: var(--cream); background: rgba(0,0,0,0.22); border-radius: 12px; padding: 18px 16px 14px; outline: none; border: 1px solid rgba(244,237,222,0.12); }
.kb-ms .prosa:focus-visible { border-color: var(--copper-glow); box-shadow: 0 0 0 3px rgba(224,144,96,0.3); }
.kb-ms .hinweis { color: var(--cream-dim); background: rgba(0,0,0,0.18); }
.kb-ms .check-box { background: rgba(0,0,0,0.18); border-left-color: var(--copper-glow); }
.kb-ms .check-box strong { color: var(--copper-glow); }
.kb-ms .check-box .body, .kb-ms .hinweise-list li { color: var(--cream); }
.kb-ms .hinweise-list li { border-bottom-color: rgba(244,237,222,0.1); }

/* Manuskript entsteht: fertige Szenen vorab, nur zum Lesen (2026-11-04) */
.kb-teil .prosa { white-space: pre-wrap; opacity: 0.92; }
.kb-teil-weiter { margin: 4px 0 0; color: var(--cream-dim); } /* ohne Pulsieren: der Fortschrittsbalken zeigt schon, dass es läuft */

/* Feinschliff: Prüfung als Ampel, untereinander (2026-11-04) */
.kb-ampel { margin: 8px 0 28px; }
.kb-ampel > .hinweis-zaehler { margin: 0 0 10px; }
.kb-ampel > .fc-urteil { margin: 0 0 18px; }
.ampel-gruppe { margin: 0 0 22px; }
.ampel-gruppe > h3, .ampel-gruppe > summary { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--cream); }
.ampel-gruppe > summary { cursor: pointer; list-style: none; padding: 10px 0; }
.ampel-gruppe > summary::-webkit-details-marker { display: none; }
.ampel-gruppe > summary::after { content: "anzeigen"; margin-left: auto; font-weight: 500; font-size: 0.9rem; color: var(--cream-dim); }
.ampel-gruppe[open] > summary::after { content: "zuklappen"; }
.ampel-name::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.ampel--rot .ampel-name::before { background: #E2876B; }
.ampel--gelb .ampel-name::before { background: var(--gold, #D9A84E); }
.ampel--gruen .ampel-name::before { background: var(--sage, #94A89A); }
.ampel-zahl { font-size: 0.78rem; letter-spacing: 0; padding: 2px 9px; border-radius: 999px; background: rgba(0, 0, 0, 0.28); color: var(--cream-dim); }
.ampel-leer { margin: 0 0 6px; color: var(--cream-dim); font-style: italic; }
.ampel-inhalt > .ampel-karte { display: block; margin: 0 0 12px; padding: clamp(16px, 3vw, 22px); background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)); border: 1px solid rgba(201,123,79,0.5); border-radius: 8px; color: var(--cream); }
.ampel-inhalt > .check-item.ampel-karte { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.ampel-inhalt > .check-item.ampel-karte > .check-status { grid-column: 2; justify-self: start; }
.ampel--gruen .ampel-inhalt > .ampel-karte { background: rgba(148,168,154,0.08); border-color: rgba(148,168,154,0.35); }
.ampel-inhalt > .ampel-karte h3 { margin-top: 0; }
.plan-section.ampel-ausgeraeumt { display: none; }

/* Feinschliff, Teil „Seiten“: ruhige Karte statt beigem Blatt um das Buch (2026-11-04).
   Die Buchseiten und der Umschlag tragen ihr eigenes Papier und bleiben, wie sie sind. */
body.teil-buch .buch { background: linear-gradient(180deg, rgba(201,123,79,0.12), rgba(201,123,79,0.04)); border: 1px solid rgba(201,123,79,0.5); color: var(--cream); }
body.teil-buch .buch > h2, body.teil-buch .buch-teil > h3 { color: var(--cream); }
body.teil-buch .buch > h2 em { color: var(--copper-glow); }
body.teil-buch .buch-sub { color: var(--copper-glow); border-bottom-color: rgba(244,237,222,0.14); }
body.teil-buch .format-wahl { background: rgba(0,0,0,0.18); border-left-color: var(--gold, #D9A84E); }
body.teil-buch .format-empfehlung { border-bottom-color: rgba(244,237,222,0.14); }
body.teil-buch .format-empfehlung b, body.teil-buch .format-wahl label { color: var(--copper-glow); }
body.teil-buch .format-empfehlung p, body.teil-buch .format-empfehlung strong, body.teil-buch .format-stand,
body.teil-buch .format-stand strong, body.teil-buch .format-wahl summary, body.teil-buch .buch .form-hint,
body.teil-buch .bearbeiten-hinweis, body.teil-buch .buch-notiz, body.teil-buch .buch-notiz strong { color: var(--cream); }
body.teil-buch .buch .form-hint, body.teil-buch .buch-notiz { opacity: 0.85; }
body.teil-buch .format-empfehlung .format-gewaehlt { color: #B9D3BF; }
body.teil-buch .format-warnung { color: #F2B98F; }
body.teil-buch .format-wahl select { background-color: rgba(0,0,0,0.28); color: var(--cream); border-color: rgba(244,237,222,0.22); }
body.teil-buch .format-wahl select option { background: #1D2944; color: var(--cream); }
body.teil-buch .buch > .innen-knopf, body.teil-buch .buch-teil > .innen-knopf, body.teil-buch .buch-teil .buch-knoepfe .innen-knopf { color: var(--cream); border-color: rgba(244,237,222,0.35); background: transparent; }
/* Auswahl und Felder untereinander (Friedrich 2026-11-04) */
body .format-reihe, body .autor-feld-reihe { grid-template-columns: 1fr; }
body.teil-buch .buch .innen-knopf:not(.buchseite .innen-knopf):not(.umschlag .innen-knopf) { color: var(--cream); border-color: rgba(244,237,222,0.35); background: transparent; }
