/* Ghostwriter – Oberfläche (Lex' persönliche App, Design 2.2). Locker, modern, clean: Geist für alles, Newsreader nur für echten
   Buchtext beim Lesen. Dunkel zuerst, hell genauso sauber. Signalorange ist die Stimme (Anruf, Live, Fortschritt), Grün heißt
   erreicht, ein ruhiges Violett gehört dem Buch (Level, Entwurf, Cover). Große Radien, feine Haarlinien, Leuchten statt Schatten.
   Zuerst fürs Telefon gebaut. */

@font-face { font-family: "Geist"; src: url("/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/newsreader.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --grund: #f4f4f1;          /* Seite */
  --karte: #ffffff;          /* Karten auf der Seite */
  --flaeche: #eeede9;        /* ruhige Flächen in Karten: Spuren, Chips, Sprechblasen */
  --flaeche-2: #e2e1dc;      /* gedrückt, leere Balken */
  --erhaben: #ffffff;        /* Blätter und Dialoge */
  --tinte: #121212;
  --tinte-2: #4e4c47;
  --tinte-3: #67655f;
  --linie: rgba(18, 18, 18, .08);
  --linie-2: rgba(18, 18, 18, .16);
  --linie-flaeche: rgba(18, 18, 18, .07);
  --signal: #f2541b;         /* Stimme, live, Fortschritt: Flächen und Zeichen */
  --signal-2: #ff8a4c;       /* heller Verlaufsanfang */
  --signal-text: #c2380f;    /* Signal als Schrift auf Hell */
  --auf-signal: #111111;
  --signal-hell: #fdeee6;
  --violett: #6a58e6;        /* das Buch: Level, Entwurf, Cover */
  --violett-2: #9a8cff;
  --violett-text: #5443cc;
  --auf-violett: #ffffff;
  --violett-hell: #eeebfd;
  --gruen: #1e7d4f;          /* erreicht, fertig */
  --gruen-text: #17683f;
  --auf-gruen: #ffffff;
  --gruen-hell: #e2f2e9;
  --rot: #c0301e;
  --marke-grund: #111111;
  --marke-zeichen: #ffffff;
  --schein-signal: rgba(242, 84, 27, .13);     /* Leuchten oben auf der Seite */
  --schein-violett: rgba(106, 88, 230, .11);
  --schatten: 0 1px 2px rgba(17, 17, 17, .06), 0 16px 48px -16px rgba(17, 17, 17, .24);   /* nur auf Schwebendem */
  --r-gross: 28px;
  --r: 24px;
  --r-mittel: 18px;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Noto Serif", serif;
  --breite: 640px;
  --rand: 20px;
  --tempo: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #09090b;
    --karte: #131316;
    --flaeche: #212126;
    --flaeche-2: #2e2e34;
    --erhaben: #18181c;
    --tinte: #f4f3f0;
    --tinte-2: #bebcb6;
    --tinte-3: #95928c;
    --linie: rgba(255, 255, 255, .08);
    --linie-2: rgba(255, 255, 255, .17);
    --linie-flaeche: rgba(255, 255, 255, .07);
    --signal: #ff6b35;
    --signal-2: #ff9a62;
    --signal-text: #ff8c5f;
    --auf-signal: #111111;
    --signal-hell: #2a1710;
    --violett: #8f80ff;
    --violett-2: #b1a6ff;
    --violett-text: #bab1ff;
    --auf-violett: #14112e;
    --violett-hell: #1e1a3b;
    --gruen: #5fd39b;
    --gruen-text: #74dca9;
    --auf-gruen: #08120d;
    --gruen-hell: #11291d;
    --rot: #ff8a78;
    --marke-grund: #f4f3f0;
    --marke-zeichen: #111111;
    --schein-signal: rgba(255, 107, 53, .17);
    --schein-violett: rgba(143, 128, 255, .15);
    --schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 52px -16px rgba(0, 0, 0, .85);
  }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tinte);
  background-color: var(--grund);
  /* Zwei weiche Leuchten oben auf der Seite, sie scrollen mit */
  background-image:
    radial-gradient(70% 360px at 100% 0, var(--schein-signal), transparent 72%),
    radial-gradient(60% 300px at 0 90px, var(--schein-violett), transparent 72%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }

a { color: inherit; text-underline-offset: 3px; }

::selection { background: color-mix(in srgb, var(--signal) 28%, transparent); }

:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; border-radius: 10px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ruhige Zeilenumbrüche: Überschriften ausgewogen, Fließtext ohne einzelne Wörter am Ende */
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

.ohne-js { max-width: 30rem; margin: 20vh auto; padding: 0 1.5rem; font-size: 1.1rem; }

/* Kleine Beschriftung: Geist, halbfett, normale Schreibung */
.etikett { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; letter-spacing: -.003em; color: var(--tinte-3); }

/* ── Laden ── */
.laden { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; }
.laden-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); animation: puls 1.1s ease-in-out infinite; }

@keyframes puls { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes einblenden { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hochfahren { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes atmen { 0%, 100% { transform: scale(1); } 50% { transform: scale(.93); } }
/* Kurz hervorheben, was sich geändert hat: ein Ring in Signal läuft nach außen, Schrift und Strich gehen von Signal zurück zu
   ihrer eigenen Farbe (das Ende ist jeweils der Wert des Elements) */
@keyframes frisch-welle { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes frisch-farbe { from { color: var(--signal-text); } }
@keyframes frisch-strich { from { stroke: var(--violett); } }
@keyframes frisch-punkt { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--signal) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes freischalten { 0% { transform: scale(.4) rotate(-14deg); opacity: 0; } 55% { transform: scale(1.14) rotate(4deg); opacity: 1; } 100% { transform: none; } }
@keyframes freischalten-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--m2, var(--signal)) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
@keyframes tippen { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes fliessen-senkrecht { from { background-position: 50% 0; } to { background-position: 50% 12px; } }
@keyframes fliessen-waagerecht { from { background-position: 0 50%; } to { background-position: 12px 50%; } }
@keyframes station-licht { 0%, 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 12%, transparent), 0 0 24px 2px color-mix(in srgb, var(--signal) 38%, transparent); } }

/* ── Zeichen: eine Schallwelle, deren letzter Strich zur Textzeile wird ── */
.marke { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; color: var(--tinte); text-decoration: none; }
.marke-zeichen { display: block; width: 30px; height: 30px; flex: none; }
.marke-grund { fill: var(--marke-grund); }
.marke-striche { stroke: var(--marke-zeichen); }
.marke-zeile { stroke: var(--signal); }
.marke-wort { font-size: 18px; font-weight: 650; letter-spacing: -.03em; white-space: nowrap; }

/* ── Anmeldung ── */
.anmeldung { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(32px + env(safe-area-inset-top)) var(--rand) calc(32px + env(safe-area-inset-bottom)); }
.anmeldung-innen { width: 100%; max-width: 380px; animation: einblenden .5s var(--tempo) both; }
.anmeldung-kopf { margin-bottom: 36px; }
.anmeldung-kopf .marke-zeichen { width: 56px; height: 56px; margin-bottom: 32px; }
.anmeldung-kopf h1 { margin: 0; font-size: 46px; line-height: 1; font-weight: 700; letter-spacing: -.05em; }
.anmeldung-kopf p { margin: 14px 0 0; font-size: 22px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; color: var(--tinte-2); }
.anmeldung-fuss { margin: 28px 0 0; font-size: 13px; color: var(--tinte-3); }

.feld { display: grid; gap: 7px; margin-bottom: 16px; }
.feld label { font-size: 14px; font-weight: 600; }
.eingabe {
  width: 100%; min-height: 54px; padding: 12px 16px;
  background: var(--karte); border: 1px solid var(--linie-2); border-radius: var(--r-mittel);
  font-size: 16px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.eingabe::placeholder { color: var(--tinte-3); opacity: 1; }
.eingabe:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 20%, transparent); }
.formular-fehler { min-height: 1.4em; margin: 2px 0 14px; color: var(--rot); font-size: 14px; }

/* ── Knöpfe ── */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px;
  background: var(--flaeche); color: var(--tinte); font-size: 15px; font-weight: 600; letter-spacing: -.008em; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none; -webkit-user-select: none;
  transition: background .15s, color .15s, opacity .15s, transform .15s var(--tempo);
}
.knopf:active { transform: scale(.97); }
.knopf:disabled { opacity: .42; cursor: default; transform: none; }
.knopf svg { width: 18px; height: 18px; flex: none; }
.knopf-primaer { background: var(--tinte); color: var(--grund); }
.knopf-akzent { background: linear-gradient(135deg, var(--signal-2), var(--signal)); color: var(--auf-signal); }
.knopf-klein { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.knopf-klein svg { width: 16px; height: 16px; }
.knopf-breit { width: 100%; min-height: 56px; font-size: 16px; }
.knopf-gross { min-height: 58px; font-size: 16.5px; }
.knopf-rund { width: 44px; min-width: 44px; padding: 0; }
.knopf-rund svg { width: 20px; height: 20px; }

@media (hover: hover) {
  .knopf:hover { background: var(--flaeche-2); }
  .knopf-primaer:hover { background: color-mix(in srgb, var(--tinte) 84%, var(--grund)); }
  .knopf-akzent:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--signal-2) 88%, #fff), color-mix(in srgb, var(--signal) 88%, #fff)); }
}

/* ── Kopfzeile ── */
.kopf {
  position: sticky; top: 0; z-index: 20;
  padding: env(safe-area-inset-top) var(--rand) 0;
  background: transparent; border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s;
}
.kopf.gerollt { background: color-mix(in srgb, var(--grund) 78%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(20px); backdrop-filter: saturate(1.6) blur(20px); border-bottom-color: var(--linie); }
.kopf-innen { max-width: var(--breite); height: 60px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.konto-knopf { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -5px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.person-kreis { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--violett-2), var(--signal-2)); color: #111; font-size: 15px; font-weight: 700; transition: transform .15s var(--tempo); }
.konto-knopf:active .person-kreis { transform: scale(.94); }

/* ── Inhalt ── */
.inhalt { max-width: var(--breite); margin: 0 auto; padding: 14px var(--rand) 56px; display: flex; flex-direction: column; gap: 40px; }
.inhalt > :empty { display: none; }
.inhalt > * { min-width: 0; animation: einblenden .55s var(--tempo) both; }
.inhalt > :nth-child(2) { animation-delay: .04s; }
.inhalt > :nth-child(3) { animation-delay: .08s; }
.inhalt > :nth-child(4) { animation-delay: .12s; }
.inhalt > :nth-child(n+5) { animation-delay: .16s; }

/* Begrüßung: Datum klein, der Gruß groß – der Anruf steht gleich darunter */
.held { margin-bottom: -14px; }
.datum { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--tinte-3); }
.begruessung h1 { margin: 0; font-size: clamp(32px, 9vw, 42px); line-height: 1.05; font-weight: 650; letter-spacing: -.045em; }
.begruessung .name { background: linear-gradient(100deg, var(--signal-text), var(--violett-text)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Abschnitte (Werkstatt, Weitere Bücher, Deine Gespräche) */
.abschnitt-kopf { margin-bottom: 16px; }
.abschnitt-kopf h2, .werkstatt-kopf h2 { margin: 0; font-size: 27px; line-height: 1.15; font-weight: 650; letter-spacing: -.04em; }
.abschnitt-unter { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: var(--tinte-2); }

/* Neuigkeiten */
.neu-hinweis { padding: 18px 20px 20px; border-radius: var(--r); background: color-mix(in srgb, var(--signal) 10%, var(--karte)); border: 1px solid color-mix(in srgb, var(--signal) 24%, var(--linie)); }
.neu-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.neu-punkt { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--signal) 22%, transparent); }
.neu-kopf h2 { margin: 0; font-size: 15px; font-weight: 650; }
.neu-liste { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15.5px; line-height: 1.5; }
.neu-liste li::marker { color: var(--signal-text); }
.neu-aktionen { margin-top: 16px; }
.verlauf { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.verlauf li { display: grid; gap: 4px; color: var(--tinte-2); font-size: 15.5px; }
.verlauf-datum { font-size: 13px; font-weight: 600; color: var(--tinte-3); }

/* Leerer Zustand und leise Hinweise in einer Fläche */
.leer { padding: 20px; border-radius: var(--r); background: var(--karte); border: 1px solid var(--linie); color: var(--tinte-2); font-size: 15px; }
.leer strong { display: block; margin-bottom: 6px; color: var(--tinte); font-size: 16px; font-weight: 650; }
.leer p { margin: 0 0 14px; }
.leer .knopf { margin-top: 4px; }

/* Ghostwriters Bild: überall rund; fehlt die Datei, steht der Anfangsbuchstabe */
.ghostwriter-bild { display: block; flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--flaeche); user-select: none; -webkit-user-select: none; }
.ghostwriter-monogramm { display: grid; place-items: center; background: linear-gradient(135deg, var(--signal-2), var(--signal)); color: var(--auf-signal); font-weight: 700; }

/* Chips: Menschen, Orte, Buchtyp */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--flaeche); color: var(--tinte); font-size: 14px; font-weight: 550; line-height: 1.3; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip-mehr { background: transparent; border: 1.5px solid var(--linie-2); padding: 4.5px 11.5px; color: var(--tinte-2); }
.chip-typ { background: var(--violett-hell); color: var(--violett-text); }
.chip-ok { background: var(--gruen-hell); color: var(--gruen-text); font-weight: 650; }

/* ═══ Buchwerkstatt ═══ */
.werkstatt { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: calc(72px + env(safe-area-inset-top)); }
.werkstatt > :empty { display: none; }
.werkstatt-kopf { margin-bottom: 2px; }
.karte { padding: 18px; border-radius: var(--r); background: var(--karte); border: 1px solid var(--linie); }
.karte-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.karte-kopf h3 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 650; letter-spacing: -.03em; }
.karte-stand { font-size: 13.5px; font-weight: 550; color: var(--tinte-3); font-variant-numeric: tabular-nums; }

/* Cover: das Buch als Karte. Verlauf und Formen nur aus CSS; der Rücken sitzt links. Gleich hell und dunkel, es ist ein Gegenstand. */
.cover-block { display: grid; gap: 16px; }
.cover {
  --c1: #ff7f45; --c2: #6a58e6; --c3: #251d63; --c4: #120d34;
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 214px; padding: 18px 20px 18px 30px; border-radius: var(--r); color: #fff;
  background:
    radial-gradient(110% 100% at 100% 0%, color-mix(in srgb, var(--c1) 88%, transparent) 0%, transparent 56%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c2) 95%, transparent) 0%, transparent 62%),
    linear-gradient(165deg, var(--c3), var(--c4));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 34px 54px -34px color-mix(in srgb, var(--c2) 80%, transparent);
}
.cover::before { content: ""; position: absolute; z-index: 3; left: 0; top: 0; bottom: 0; width: 14px; background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0)); border-right: 1px solid rgba(255, 255, 255, .14); }
.cover-form { position: absolute; z-index: -1; pointer-events: none; }
.cover-form-1 { right: -70px; top: -62px; width: 210px; height: 210px; border-radius: 50%; border: 24px solid rgba(255, 255, 255, .11); }
.cover-form-2 { right: 26px; bottom: 0; width: 132px; height: 66px; border-radius: 132px 132px 0 0; background: rgba(255, 255, 255, .15); }
.cover-form-3 { left: -26px; bottom: -26px; width: 190px; height: 190px; border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, transparent 0 16px, rgba(255, 255, 255, .15) 16px 18px); }
.cover-nr { align-self: flex-start; margin: 0; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 650; letter-spacing: .005em; }
.cover-unten { min-width: 0; }
.cover-titel { margin: 0; max-width: 11em; font-size: clamp(27px, 7.8vw, 35px); line-height: 1.04; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.cover-titel.lang { font-size: clamp(22px, 6.3vw, 28px); line-height: 1.08; }
.cover-titel.ohne { opacity: .92; }
.cover-autor { margin: 10px 0 0; font-size: 14.5px; font-weight: 550; opacity: .86; }
.cover-kernsatz { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 520; letter-spacing: -.012em; overflow-wrap: break-word; }
.cover-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.cover.frisch, .cover-kernsatz.frisch { animation: frisch-welle 1.5s var(--tempo) 2; }
.cover-kernsatz.frisch { animation: frisch-farbe 2.8s var(--tempo) both; }

/* Level: Wo steht das Buch? Der Ring zeigt den Fortschritt (in der Findung die Schritte), darunter die vier Level */
.level { overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--violett) 9%, var(--karte)), var(--karte) 55%); }
.level-kopf { display: flex; align-items: center; gap: 16px; }
.level-text { flex: 1; min-width: 0; }
.level-nr { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--violett-hell); color: var(--violett-text); font-size: 12.5px; font-weight: 650; }
.level-name { margin: 9px 0 0; font-size: 27px; line-height: 1.08; font-weight: 650; letter-spacing: -.04em; }
.level-satz { margin: 7px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--tinte-2); }
.level-bahn { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.level-schritt { display: grid; align-content: start; gap: 8px; font-size: 12.5px; line-height: 1.25; font-weight: 500; color: var(--tinte-3); }
.level-balken { display: block; height: 7px; overflow: hidden; border-radius: 7px; background: var(--flaeche-2); }
.level-balken > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--signal-2), var(--signal)); transition: width 1.1s var(--tempo); }
.level-schritt.erledigt .level-balken > span { background: var(--gruen); }
.level-schritt.erledigt { color: var(--tinte-2); }
.level-schritt.aktuell { color: var(--tinte); font-weight: 650; }
.level-schritt-name { display: inline-flex; align-items: flex-start; gap: 4px; }
.level-schritt-name svg { width: 13px; height: 13px; margin-top: 1px; flex: none; color: var(--gruen-text); }
.level-nr.frisch { animation: frisch-welle 1.5s var(--tempo) 2; }
/* Findung: Themen, die sich abzeichnen – je häufiger, desto kräftiger */
.level-themen { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--linie); }
.level-themen .etikett { margin-bottom: 10px; }
.chip.thema-2 { background: var(--violett-hell); color: var(--violett-text); }
.chip.thema-3 { padding: 7px 15px; background: var(--violett-hell); color: var(--violett-text); font-size: 15.5px; font-weight: 650; }
.chip.thema-4 { padding: 8px 17px; background: linear-gradient(135deg, var(--violett-2), var(--violett)); color: var(--auf-violett); font-size: 16.5px; font-weight: 650; }

/* Fortschrittsring: Spur und Strich, in der Mitte die Zahl */
.ring { position: relative; flex: none; width: 78px; height: 78px; }
.ring-svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-spur, .ring-strich { fill: none; stroke-width: 10; }
.ring-spur { stroke: var(--flaeche-2); }
.ring-strich { stroke: var(--signal); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; opacity: 0; transition: stroke-dashoffset 1.2s var(--tempo), opacity .25s, stroke .4s; }
.ring.voll .ring-strich { stroke: var(--gruen); }
.ring-zahl { position: absolute; inset: 0; display: grid; place-items: center; font-size: 21px; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.ring-zahl > span { display: inline-flex; align-items: baseline; }
.ring-prozent { margin-left: 1px; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--tinte-2); }
.ring-zahl svg { width: 28px; height: 28px; color: var(--signal-text); }
.ring.voll .ring-zahl svg { width: 30px; height: 30px; color: var(--gruen-text); }
.ring-bruch { font-size: 19px; }
.ring-bruch i { font-style: normal; font-weight: 500; color: var(--tinte-3); }
.ring.frisch .ring-strich { animation: frisch-strich 2.8s var(--tempo) both; }
.ring.frisch .ring-zahl { animation: frisch-farbe 2.8s var(--tempo) both; }

/* Fließband „So entsteht dein Buch“: vier Stationen, solange Ghostwriter schreibt, fließen Punkte durch die Verbindungen */
.band { overflow: hidden; }
.band-kopf h3 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 650; letter-spacing: -.03em; }
.band-status { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-size: 14.5px; line-height: 1.4; color: var(--tinte-2); }
.band.arbeitet .band-status { color: var(--signal-text); font-weight: 550; }
.punkte-lauf { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.punkte-lauf i { display: block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .3; animation: punkt 1.4s ease-in-out infinite; }
.punkte-lauf i:nth-child(2) { animation-delay: .2s; }
.punkte-lauf i:nth-child(3) { animation-delay: .4s; }
@keyframes punkt { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.band-reihe { list-style: none; margin: 18px 0 0; padding: 0; display: grid; }
.band-station { --st: linear-gradient(145deg, var(--signal-2), var(--signal)); position: relative; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 0 0 30px; }
.band-station:nth-child(2) { --st: linear-gradient(145deg, color-mix(in oklab, var(--signal-2) 62%, var(--violett-2)), color-mix(in oklab, var(--signal) 58%, var(--violett))); }
.band-station:nth-child(3) { --st: linear-gradient(145deg, color-mix(in oklab, var(--signal-2) 30%, var(--violett-2)), color-mix(in oklab, var(--signal) 28%, var(--violett))); }
.band-station:nth-child(4) { --st: linear-gradient(145deg, var(--violett-2), var(--violett)); }
.band-station:last-child { padding-bottom: 6px; }
.band-symbol { position: relative; z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border-radius: var(--r); background: var(--st); color: #fff; transition: background .4s; }
.band-symbol svg { width: 26px; height: 26px; }
.band-station.ruht .band-symbol { background: var(--flaeche-2); color: var(--tinte-3); }
.band-text { display: grid; gap: 1px; min-width: 0; }
.band-name { font-size: 13px; font-weight: 600; color: var(--tinte-3); }
.band-wert { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 7px; font-size: 15px; font-weight: 550; color: var(--tinte-2); }
.band-wert .zahl { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -.05em; color: var(--tinte); }
.band-station.ruht .band-wert .zahl { color: var(--tinte-3); }
.band-detail { max-width: 9.5em; font-size: 13px; line-height: 1.45; color: var(--tinte-3); text-align: right; }
.band-detail > span { display: block; }
.band-detail .zahl { font-weight: 600; color: var(--tinte-2); }
/* Verbindung zur nächsten Station: gestrichelt, bei Arbeit mit wandernden Punkten */
.band-station::after { content: ""; position: absolute; left: 22px; top: 54px; bottom: 4px; width: 6px; background: radial-gradient(circle, var(--linie-2) 1.6px, transparent 2.1px) 50% 0 / 6px 12px repeat-y; }
.band-station:last-child::after { display: none; }
.band.arbeitet .band-station::after { background: radial-gradient(circle, var(--signal) 2.3px, transparent 2.8px) 50% 0 / 6px 12px repeat-y; animation: fliessen-senkrecht 1.1s linear infinite; }
.band.arbeitet .band-station .band-symbol { animation: station-licht 3.2s ease-in-out infinite; }
.band.arbeitet .band-station:nth-child(2) .band-symbol { animation-delay: .8s; }
.band.arbeitet .band-station:nth-child(3) .band-symbol { animation-delay: 1.6s; }
.band.arbeitet .band-station:nth-child(4) .band-symbol { animation-delay: 2.4s; }
@media (min-width: 600px) {
  .band-reihe { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
  .band-station { grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; gap: 14px; padding: 0 0 6px; }
  .band-detail { max-width: none; text-align: left; }
  .band-wert { display: grid; gap: 0; }
  .band-wert .zahl { font-size: 32px; }
  .band-wert { font-size: 14px; }
  .band-station::after { left: 58px; right: -8px; top: 22px; bottom: auto; width: auto; height: 6px; background: radial-gradient(circle, var(--linie-2) 1.6px, transparent 2.1px) 0 50% / 12px 6px repeat-x; }
  .band.arbeitet .band-station::after { background: radial-gradient(circle, var(--signal) 2.3px, transparent 2.8px) 0 50% / 12px 6px repeat-x; animation: fliessen-waagerecht 1.1s linear infinite; }
}

/* Kapitel als Liste: Nummer, Titel, Füllbalken, Status. Leer gestrichelt, Entwurf violett, fertig grün. */
.kapitel-liste { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.kapitel-zeile {
  --f: var(--tinte-2);
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 10px 14px 10px 10px;
  border: 1px solid var(--linie); border-radius: var(--r); background: var(--karte); color: var(--tinte); text-align: left; cursor: pointer;
  transition: transform .15s var(--tempo), background .15s, border-color .15s;
}
.kapitel-zeile:active { transform: scale(.985); }
.kapitel-nr { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r); background: var(--flaeche); color: var(--tinte-2); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kapitel-nr svg { width: 20px; height: 20px; }
.kapitel-mitte { display: grid; gap: 8px; min-width: 0; }
.kapitel-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 15.5px; line-height: 1.3; font-weight: 600; letter-spacing: -.012em; overflow-wrap: break-word; }
.kapitel-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--flaeche); color: var(--tinte-2); font-size: 12px; font-weight: 650; line-height: 1.3; }
.kapitel-chip svg { width: 12px; height: 12px; }
.kapitel-zeile.status-offen { border-style: dashed; border-color: var(--linie-2); background: transparent; }
.kapitel-zeile.status-offen .kapitel-nr { background: transparent; border: 1.5px dashed var(--linie-2); }
.kapitel-zeile.status-offen .kapitel-name { color: var(--tinte-2); }
.kapitel-zeile.status-reif { --f: var(--signal); }
.kapitel-zeile.status-reif .kapitel-nr { background: var(--signal-hell); color: var(--signal-text); }
.kapitel-zeile.status-reif .kapitel-chip { background: var(--signal-hell); color: var(--signal-text); }
.kapitel-zeile.status-entwurf { --f: var(--violett); border-color: color-mix(in srgb, var(--violett) 30%, var(--linie)); background: linear-gradient(100deg, color-mix(in srgb, var(--violett) 9%, var(--karte)), var(--karte) 70%); }
.kapitel-zeile.status-entwurf .kapitel-nr { background: linear-gradient(145deg, var(--violett-2), var(--violett)); color: #fff; }
.kapitel-zeile.status-entwurf .kapitel-chip { background: var(--violett-hell); color: var(--violett-text); }
.kapitel-zeile.status-fertig { --f: var(--gruen); border-color: color-mix(in srgb, var(--gruen) 32%, var(--linie)); }
.kapitel-zeile.status-fertig .kapitel-nr { background: var(--gruen); color: var(--auf-gruen); }
.kapitel-zeile.status-fertig .kapitel-chip { background: var(--gruen-hell); color: var(--gruen-text); }
.kapitel-zeile.frisch { animation: frisch-welle 1.5s var(--tempo) 2; }
.kapitel-liste.erstmals .kapitel-zeile { animation: einblenden .5s var(--tempo) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
@media (hover: hover) { .kapitel-zeile:hover { background: color-mix(in srgb, var(--tinte) 4%, var(--karte)); } }

/* Füllbalken (Kapitel, Kapitel-Blatt): die Farbe kommt von --f */
.fuell { display: block; height: 5px; overflow: hidden; border-radius: 5px; background: color-mix(in srgb, var(--f, var(--tinte-2)) 20%, transparent); }
.fuell > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--f, var(--tinte-2)); transition: width 1.1s var(--tempo); }

/* „Manuskript lesen“ */
.manuskript-zeile { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; margin-top: 12px; padding: 10px 16px 10px 12px; border: 1px solid color-mix(in srgb, var(--violett) 26%, var(--linie)); border-radius: var(--r); background: var(--violett-hell); color: var(--tinte); text-align: left; cursor: pointer; transition: transform .15s var(--tempo), background .15s; }
.manuskript-zeile:active { transform: scale(.985); }
.manuskript-zeile > svg:first-child { box-sizing: content-box; width: 22px; height: 22px; padding: 10px; border-radius: var(--r); background: linear-gradient(145deg, var(--violett-2), var(--violett)); color: #fff; flex: none; }
.manuskript-zeile > svg:last-child { width: 18px; height: 18px; flex: none; color: var(--violett-text); }
.zeile-text { display: grid; flex: 1; min-width: 0; }
.zeile-text strong { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
.zeile-text span { font-size: 13.5px; line-height: 1.4; color: var(--tinte-2); }

/* Abzeichen: eine Reihe zum Wischen. Erreichte in Farbe, das nächste grau mit Fortschritt, die Serie als Flamme. */
.abzeichen { list-style: none; display: flex; gap: 10px; margin: -6px calc(var(--rand) * -1) -16px; padding: 22px var(--rand); overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--rand); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.abzeichen::-webkit-scrollbar { display: none; }
.abzeichen-eintrag { --m1: #fb6d2c; --m2: #de400e; flex: none; width: 90px; display: grid; justify-items: center; align-content: start; gap: 9px; text-align: center; scroll-snap-align: start; }
.m-violett { --m1: #8878f5; --m2: #5340d2; }
.m-gruen { --m1: #25a46c; --m2: #136c41; }
.medaille { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(150deg, var(--m1), var(--m2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 12px 22px -12px var(--m2); }
.medaille > svg { width: 30px; height: 30px; }
.abzeichen-text { font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--tinte); text-wrap: balance; overflow-wrap: break-word; }
.abzeichen-stand { margin-top: -6px; font-size: 12px; font-weight: 600; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.serie-zahl { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--r); background: var(--karte); color: var(--signal-text); border: 2px solid var(--signal); font-size: 14px; font-weight: 750; line-height: 1; }
.abzeichen-eintrag.kommend .medaille { background: var(--flaeche); color: var(--tinte-3); box-shadow: none; }
.abzeichen-eintrag.kommend .abzeichen-text { color: var(--tinte-2); }
.medaille .ring { position: absolute; inset: -6px; width: auto; height: auto; }
.medaille .ring-strich, .medaille .ring-spur { stroke-width: 7; }
.abzeichen-eintrag.frisch .medaille { animation: freischalten 1.1s var(--tempo) both, freischalten-ring 1.5s var(--tempo) .4s 2; }

/* Nachricht von Ghostwriter: wie eine Chat-Nachricht */
.nachricht { display: flex; align-items: flex-end; gap: 10px; }
.nachricht .ghostwriter-bild { width: 40px; height: 40px; margin-bottom: 2px; box-shadow: 0 0 0 2px var(--grund), 0 0 0 3.5px color-mix(in srgb, var(--signal) 55%, transparent); }
.nachricht-inhalt { flex: 1; min-width: 0; }
.nachricht-kopf { display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px 6px; font-size: 13px; line-height: 1.3; color: var(--tinte-3); }
.nachricht-name { font-weight: 650; color: var(--tinte); }
.sprechblase { display: inline-block; max-width: 100%; padding: 14px 18px 15px; border-radius: var(--r); background: var(--karte); border: 1px solid var(--linie-2); }
.sprechblase p { margin: 0; font-size: 16.5px; line-height: 1.5; letter-spacing: -.008em; white-space: pre-line; overflow-wrap: break-word; }
.sprechblase.tippt { padding: 16px 20px; }
.tippen { display: inline-flex; align-items: center; gap: 5px; }
.tippen i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--tinte-3); animation: tippen 1.3s ease-in-out infinite; }
.tippen i:nth-child(2) { animation-delay: .16s; }
.tippen i:nth-child(3) { animation-delay: .32s; }
.nachricht.frisch .sprechblase { animation: frisch-welle 1.5s var(--tempo) 2; }

/* Ein Satz von dir: großes Zitat, Verlauf am Rand */
.satz-karte { position: relative; overflow: hidden; padding: 26px 22px 24px 28px; border-radius: var(--r-gross); background: var(--karte); border: 1px solid var(--linie); }
.satz-karte::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(to bottom, var(--signal), var(--violett)); }
.satz { margin: 0; }
.satz-zeichen { display: block; width: 46px; height: 36px; margin: 2px 0 8px -3px; color: var(--signal); }
.satz-text { margin: 12px 0 0; padding: 0; }
.satz-text p { margin: 0; font-size: clamp(24px, 6.6vw, 30px); line-height: 1.22; font-weight: 580; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: break-word; }
.satz-quelle { margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--tinte-3); }
.satz.frisch .satz-text { animation: frisch-farbe 2.8s var(--tempo) both; }
.chips-gruppe { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--linie); }
.chips-gruppe + .chips-gruppe { margin-top: 18px; padding-top: 18px; }
.satz + .chips-gruppe { margin-top: 24px; }
.chips-gruppe > .etikett { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.chips-gruppe > .etikett svg { width: 15px; height: 15px; }

/* Weitere Bücher: ein Regal aus angedeuteten Covern (gedämpft, mit Schloss) */
.regal-reihe { list-style: none; display: flex; gap: 14px; margin: 0 calc(var(--rand) * -1); padding: 4px var(--rand) 0; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--rand); scrollbar-width: none; -webkit-overflow-scrolling: touch; border-bottom: 5px solid var(--linie-2); }
.regal-reihe::-webkit-scrollbar { display: none; }
.regal-buch { flex: none; width: 118px; scroll-snap-align: start; }
.cover-klein { --c1: #b69cff; --c2: #5a8be6; --c3: #3a3377; --c4: #1d1946; min-height: 0; height: 158px; gap: 8px; padding: 12px 11px 12px 20px; border-radius: var(--r); opacity: .82; filter: saturate(.62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.cover-klein::before { width: 10px; }
.regal-buch:nth-child(3n+2) .cover-klein { --c1: #ffa270; --c2: #e0568c; --c3: #5b2a4a; --c4: #2a1224; }
.regal-buch:nth-child(3n+3) .cover-klein { --c1: #6fdba5; --c2: #2f8fb5; --c3: #1f4f5e; --c4: #0f2630; }
.cover-klein .cover-form-1 { right: -50px; top: -46px; width: 120px; height: 120px; border-width: 14px; }
.cover-klein .cover-form-2, .cover-klein .cover-form-3 { display: none; }
.cover-klein .cover-nr { padding: 2px 8px; font-size: 12px; }
.cover-klein .cover-titel { font-size: 15.5px; line-height: 1.15; letter-spacing: -.025em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.cover-schloss { position: absolute; z-index: 2; right: 10px; top: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .34); color: #fff; }
.cover-schloss svg { width: 14px; height: 14px; }

/* Fuß */
.fuss { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand) calc(32px + env(safe-area-inset-bottom)); color: var(--tinte-3); font-size: 13px; }
.fuss-innen { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 18px; padding-top: 12px; border-top: 1px solid var(--linie); }
.fuss-links { display: inline-flex; flex-wrap: wrap; gap: 6px 18px; }
.fuss button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--tinte-2); font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--linie-2); text-underline-offset: 3px; }

/* Dialoge: unten als Blatt, auf breiten Bildschirmen mittig */
dialog.info, dialog.blatt {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; margin: auto auto 0; padding: 0;
  border: 1px solid var(--linie); border-bottom: 0; border-radius: 32px 32px 0 0; background: var(--erhaben); color: var(--tinte); box-shadow: var(--schatten);
}
dialog.info[open], dialog.blatt[open] { animation: hochfahren .34s var(--tempo) both; }
dialog.info::backdrop, dialog.blatt::backdrop { background: rgba(8, 8, 10, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.info-innen { max-height: inherit; overflow: auto; padding: 10px 24px calc(24px + env(safe-area-inset-bottom)); }
.info-innen::before { content: ""; display: block; width: 38px; height: 5px; margin: 0 auto 22px; border-radius: 5px; background: var(--linie-2); }
.info-innen h2 { margin: 6px 0 18px; font-size: 28px; line-height: 1.12; font-weight: 650; letter-spacing: -.04em; }
.info-innen h3 { margin: 28px 0 12px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.info-lead { margin: -4px 0 22px; font-size: 16.5px; line-height: 1.5; color: var(--tinte); }
.schritte { margin: 0; padding: 0; list-style: none; counter-reset: schritt; display: grid; gap: 14px; }
.schritte li { position: relative; padding-left: 42px; color: var(--tinte-2); line-height: 1.5; }
.schritte li::before { counter-increment: schritt; content: counter(schritt); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--violett-hell); color: var(--violett-text); font-size: 13px; font-weight: 700; }
.schritte strong { color: var(--tinte); font-weight: 650; }
.punkte { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--tinte-2); }
.punkte li::marker { color: var(--tinte-3); }
.info-fuss { margin-top: 28px; }
.info-fuss .knopf { width: 100%; min-height: 56px; font-size: 16px; }
@media (min-width: 640px) {
  dialog.info, dialog.blatt { width: min(560px, calc(100vw - 32px)); margin: auto; border-bottom: 1px solid var(--linie); border-radius: var(--r-gross); }
  .info-innen { padding: 28px 32px 28px; }
  .info-innen::before { display: none; }
}

/* Konto-Blatt */
.konto-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.konto-kopf .person-kreis { width: 54px; height: 54px; font-size: 21px; }
.konto-kopf h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.konto-kopf p { margin: 2px 0 0; font-size: 14px; color: var(--tinte-3); }
.menue { display: grid; overflow: hidden; margin-bottom: 14px; border-radius: var(--r); background: var(--flaeche); }
.menue-punkt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 0 18px; border: 0; background: transparent; color: var(--tinte); font-size: 16px; font-weight: 550; text-align: left; cursor: pointer; }
.menue-punkt + .menue-punkt { border-top: 1px solid var(--linie-flaeche); }
.menue-punkt svg { width: 20px; height: 20px; flex: none; color: var(--tinte-2); }
.menue-punkt.gefahr, .menue-punkt.gefahr svg { color: var(--rot); }
.menue-punkt:active { background: var(--flaeche-2); }
@media (hover: hover) { .menue-punkt:hover { background: var(--flaeche-2); } }

/* Modellwahl im Konto-Blatt (nur Lex' App): zwei Felder nebeneinander, das gewählte violett umrandet */
.modell-wahl { margin: 0 0 16px; }
.modell-wahl .etikett { margin-bottom: 8px; }
.modell-optionen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modell-option { display: grid; align-content: center; gap: 2px; min-height: 60px; padding: 10px 14px; border: 1.5px solid transparent; border-radius: var(--r-mittel); background: var(--flaeche); color: var(--tinte); font: inherit; text-align: left; cursor: pointer; }
.modell-option strong { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.modell-option span { font-size: 12.5px; color: var(--tinte-3); }
.modell-option.aktiv { border-color: var(--violett); background: var(--violett-hell); }
.modell-option.aktiv strong { color: var(--violett-text); }
.modell-option:disabled { cursor: default; }
.modell-option:disabled:not(.aktiv) { opacity: .5; }
.modell-hinweis { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--tinte-3); }

/* Kapitel-Blatt: Kopf, Worum es geht, Füllstand, Lücken, Entwurf (der Entwurf ist echter Buchtext: Newsreader) */
dialog.kapitel-blatt .info-innen { padding-bottom: 0; }
.kapitel-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kapitel-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; background: var(--flaeche); color: var(--tinte-2); font-size: 12.5px; font-weight: 650; }
.kapitel-status svg { width: 13px; height: 13px; }
.kapitel-status.status-reif { background: var(--signal-hell); color: var(--signal-text); }
.kapitel-status.status-entwurf { background: var(--violett-hell); color: var(--violett-text); }
.kapitel-status.status-fertig { background: var(--gruen-hell); color: var(--gruen-text); }
.info-innen .kapitel-titel { margin: 12px 0 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.04em; text-wrap: balance; overflow-wrap: break-word; }
.blatt-abschnitt { margin-top: 26px; }
.info-innen h3.etikett { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: -.003em; }
.kapitel-worum { margin: 0; font-size: 17px; line-height: 1.5; color: var(--tinte-2); }
.kapitel-fuelle { display: flex; align-items: center; gap: 14px; margin-top: 24px; --f: var(--violett); }
.kapitel-balken { flex: 1; height: 7px; border-radius: 7px; }
.kapitel-fuelle-text { flex: none; font-size: 13px; font-weight: 600; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.luecken { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--tinte-2); font-size: 15.5px; }
.luecken li::marker { color: var(--tinte-3); }
.entwurf-meta { margin: 0 0 18px; font-size: 13px; font-weight: 500; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.entwurf-leer { margin: 28px 0 0; color: var(--tinte-2); }
.entwurf-box .knopf { margin-top: 14px; }
.entwurf-absatz, .manuskript-absatz { margin: 0 0 1.05em; font-family: var(--serif); font-size: 19px; line-height: 1.66; white-space: pre-line; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.entwurf-ueberschrift { margin: 1.7em 0 .6em; font-family: var(--serif); font-size: 22px; line-height: 1.2; font-weight: 500; letter-spacing: -.012em; }
.entwurf-trenner, .manuskript-trenner { margin: 1.3em 0; text-align: center; letter-spacing: .5em; color: var(--tinte-3); }
dialog.kapitel-blatt .info-fuss {
  position: sticky; bottom: 0; margin: 12px -24px 0; padding: 22px 24px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, color-mix(in srgb, var(--erhaben) 0%, transparent), var(--erhaben) 30%);
}
@media (min-width: 640px) { dialog.kapitel-blatt .info-fuss { margin-inline: -32px; padding-inline: 32px; } }

/* Manuskript-Blatt: Vollbild zum Lesen (Titelseite und Text in Newsreader, der Rest Geist) */
dialog.manuskript-blatt { width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--grund); color: var(--tinte); }
dialog.manuskript-blatt[open] { animation: hochfahren .34s var(--tempo) both; }
dialog.manuskript-blatt::backdrop { background: var(--grund); }
.manuskript-rahmen { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.manuskript-leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) var(--rand) 8px; border-bottom: 1px solid var(--linie); }
.manuskript-seite { overflow: auto; padding: 0 var(--rand) calc(32px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.manuskript-seite > * { max-width: 36rem; margin-left: auto; margin-right: auto; }
.manuskript-kopf { padding-top: 34px; }
.manuskript-titel { margin: 10px 0 0; font-family: var(--serif); font-size: clamp(36px, 10vw, 48px); line-height: 1.04; font-weight: 500; letter-spacing: -.028em; text-wrap: balance; overflow-wrap: break-word; }
.manuskript-untertitel { margin: 10px 0 0; font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--tinte-2); }
.manuskript-meta { margin: 16px 0 0; font-size: 13px; font-weight: 500; color: var(--tinte-3); }
.manuskript-verzeichnis { margin-top: 30px; padding: 18px 18px 8px; border-radius: var(--r); background: var(--flaeche); }
.manuskript-verzeichnis ol { list-style: none; margin: 8px 0 0; padding: 0; }
.manuskript-verzeichnis li + li { border-top: 1px solid var(--linie-flaeche); }
.manuskript-verzeichnis li.stufe-2 { padding-left: 14px; }
.manuskript-verzeichnis li.stufe-3 { padding-left: 28px; }
.manuskript-verzeichnis button { display: block; width: 100%; min-height: 44px; padding: 10px 0; border: 0; background: none; color: var(--tinte); font-size: 16.5px; font-weight: 550; line-height: 1.3; text-align: left; cursor: pointer; }
.manuskript-text { margin-top: 38px; }
.manuskript-ueberschrift { margin: 2.2em 0 .7em; font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; line-height: 1.12; scroll-margin-top: 16px; text-wrap: balance; }
h2.manuskript-ueberschrift { font-size: 30px; }
h3.manuskript-ueberschrift { font-size: 23px; }
.manuskript-text > :first-child { margin-top: 0; }
.manuskript-seite .info-fuss { margin-top: 40px; }

/* Hinweise */
.meldungen { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.meldung { padding: 14px 18px; border-radius: var(--r); background: var(--tinte); color: var(--grund); font-size: 14.5px; font-weight: 550; box-shadow: var(--schatten); animation: hochfahren .3s var(--tempo) both; pointer-events: auto; }
.meldung.fehler { background: var(--rot); color: #fff; }

@media (min-width: 720px) {
  :root { --rand: 32px; }
  .inhalt { padding-top: 28px; gap: 52px; }
  .held { margin-bottom: -22px; }
}

@media (max-width: 380px) {
  :root { --rand: 16px; }
  .karte { padding: 16px; }
  .level-name { font-size: 24px; }
  .ring { width: 70px; height: 70px; }
  .level-schritt { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
