/* Randnummer – Gestaltung „modern & klar“ */

/* ── Schriften (lokal, keine Anfragen an Dritte) ─────────────────────────── */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/vendor/fonts/geist-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/vendor/fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url('/static/vendor/fonts/geist-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/vendor/fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('/static/vendor/fonts/geist-mono-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url('/static/vendor/fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url('/static/vendor/fonts/source-serif-4-latin-ext-opsz-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url('/static/vendor/fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2'); }

/* ── Farben & Maße ───────────────────────────────────────────────────────── */
/* Angelehnt an juristische Datenbanken: Bordeaux als Leitfarbe, viel Weiß,
   feine Linien, eckige Formen, serifenlose Schrift, dichte Information. */
:root {
  --bg: #EEF0F2;
  --surface: #FFFFFF;
  --surface-2: #F4F5F7;
  --leiste: #F7F8F9;
  --border: #DCDFE3;
  --border-strong: #C5CAD1;
  --ink: #1D1F23;
  --ink-2: #3D424B;
  --muted: #646A75;
  --accent: #9B1B30;
  --accent-ink: #7A1426;
  --accent-soft: #F6E7EA;
  --on-accent: #FFFFFF;
  --link: #1F4E8C;
  --rn-bg: #E3E6EA;
  --pdf: #B45309;
  --pdf-soft: #FDF0E1;
  --html: #1F4E8C;
  --html-soft: #E7EEF7;
  --danger: #B42318;
  --danger-soft: #FEECEB;
  --ok: #0F766E;
  --hl-blau: #C9D5FF;
  --hl-pfirsich: #FFD3BD;
  --hl-flieder: #E1D2FF;
  --hl-mint: #BFEBD9;
  --sel: #F3C9D1;
  --treffer: #FFE48A;
  --shadow: 0 1px 2px rgba(17, 19, 24, .06);
  --shadow-pop: 0 10px 30px rgba(17, 19, 24, .20);
  --radius: 4px;
  --radius-s: 3px;
  --kopf-h: 64px;
  --sans: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', 'Nimbus Sans', sans-serif;
  --mono: var(--sans);
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --leser-schrift: var(--sans);
  --leser-groesse: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --bg: #111316; --surface: #1A1D21; --surface-2: #22262B; --leiste: #16181B; --border: #2D3238; --border-strong: #3A4047;
    --ink: #ECEEF1; --ink-2: #C9CDD4; --muted: #9AA1AC; --accent: #E06A7E; --accent-ink: #F29AAA;
    --accent-soft: #3A1B22; --on-accent: #16070A; --link: #8DB4F0; --rn-bg: #2C3137;
    --pdf: #F0A35E; --pdf-soft: #3A2814; --html: #8DB4F0; --html-soft: #1C2A3D;
    --danger: #FF8A80; --danger-soft: #3A1715; --ok: #5EEAD4;
    --hl-blau: #2C3B7A; --hl-pfirsich: #6A3A26; --hl-flieder: #4A3478; --hl-mint: #1F5546;
    --sel: #5A2633; --treffer: #6B5413;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

/* ── Grundlagen ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: inline-flex; flex: none; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.laden { padding: 48px; color: var(--muted); }
.leer { padding: 40px 20px; text-align: center; color: var(--muted); }
.leer-gross { padding: 64px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.leer-gross h2 { color: var(--ink); margin: 0; font-size: 19px; }
.noscript { padding: 24px; }

/* ── Grundgerüst: Kopfleiste oben, Navigation links, Inhalt ──────────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.kopfleiste {
  position: sticky; top: 0; z-index: 40; height: var(--kopf-h); flex: none;
  display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: inset 0 3px 0 var(--accent);
}
.kopfleiste .kopf-menue { display: none; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; width: 222px; }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 36px; height: 36px; border-radius: 2px; background: var(--accent); color: #fff; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; letter-spacing: -0.02em;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.12; }
.logo-wort { font-weight: 700; font-size: 18px; color: var(--accent); letter-spacing: -0.01em; }
.logo-zusatz { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.kopf-suche {
  flex: 1 1 auto; max-width: 780px; height: 42px; display: flex; align-items: stretch;
  border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); overflow: hidden;
}
.kopf-suche:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.kopf-lupe { align-self: center; padding: 0 8px 0 12px; color: var(--muted); }
.kopf-suche input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; }
.kopf-suche input::-webkit-search-cancel-button { cursor: pointer; }
.kopf-kbd { align-self: center; margin-right: 10px; }
.kopf-suchknopf { flex: none; border: 0; padding: 0 22px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; letter-spacing: .01em; }
.kopf-suchknopf:hover { background: var(--accent-ink); }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.app-koerper { flex: 1 1 auto; display: flex; min-height: 0; }
.seitenleiste {
  flex: 0 0 248px; position: sticky; top: var(--kopf-h); height: calc(100vh - var(--kopf-h)); overflow-y: auto;
  padding: 18px 0 18px; background: var(--leiste); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 20px; z-index: 30;
}
.inhalt { flex: 1 1 auto; min-width: 0; outline: none; }
.nav-gruppe { display: flex; flex-direction: column; gap: 0; }
.nav-titel {
  margin: 0 14px 4px; padding: 0 0 6px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .09em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center;
}
.nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 14px 0 11px; border-left: 3px solid transparent;
  text-decoration: none; color: var(--ink-2); border-top: 0; border-right: 0; border-bottom: 0; background: transparent; cursor: pointer; text-align: left; width: 100%;
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--accent); background: var(--surface); border-left-color: var(--accent); font-weight: 700; }
.nav-link .zahl { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.nav-punkt { width: 9px; height: 9px; border-radius: 1px; flex: none; }
.nav-neu { color: var(--muted); }
.nav-fuss { display: none; }
.inline-form { display: flex; gap: 6px; padding: 4px 14px; }
.inline-form input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); }

.seite { max-width: 1240px; margin: 0 auto; padding: 18px clamp(16px, 3vw, 36px) 64px; display: flex; flex-direction: column; gap: 22px; }
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.suchfeld {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-s);
}
.suchfeld:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.suchfeld input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 14.5px; }
.suchfeld .ico { color: var(--muted); }
.suchfeld-klein { flex: 0 1 260px; height: 36px; }
kbd { font-family: var(--sans); font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: 1px 6px; }
.brotkrumen ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; font-size: 12.5px; color: var(--muted); }
.brotkrumen li { display: inline-flex; align-items: center; min-width: 0; }
.brotkrumen li + li::before { content: '›'; margin: 0 7px; color: var(--border-strong); font-size: 14px; }
.brotkrumen a { color: var(--accent); text-decoration: none; }
.brotkrumen a:hover { text-decoration: underline; }
.brotkrumen [aria-current] { color: var(--ink-2); }
.seitentitel h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.seitentitel p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
.abschnitt { display: flex; flex-direction: column; gap: 12px; }
.abschnitt > h2, .abschnitt-kopf h2 { margin: 0; font-size: 15px; font-weight: 700; }
.abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.anzahl { color: var(--muted); font-weight: 400; }

/* ── Bedienelemente ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px;
  border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--on-accent); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-gross { min-height: 42px; padding: 0 18px; }
.btn-dunkel { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.btn-dunkel:hover { background: var(--ink-2); color: var(--bg); }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; flex: none;
  border: 1px solid transparent; border-radius: var(--radius-s); background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.umrandet { border-color: var(--border-strong); background: var(--surface); }
.icon-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.seg { display: inline-flex; gap: 0; padding: 0; background: var(--surface); border-radius: var(--radius-s); border: 1px solid var(--border-strong); overflow: hidden; }
.seg button { min-height: 34px; padding: 0 13px; border: 0; border-right: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip .zahl { font-size: 11.5px; opacity: .75; }
.chip-norm { font-size: 13px; }
a.chip { text-decoration: none; }
.filterleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filterleiste .rechts { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
select.auswahl, input.feld, textarea.feld {
  min-height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--ink);
}
textarea.feld { padding: 9px 10px; min-height: 84px; resize: vertical; width: 100%; line-height: 1.45; }
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; border-radius: 2px; padding: 1px 6px; display: inline-block; line-height: 1.6; }
.badge-pdf { color: var(--pdf); background: var(--pdf-soft); }
.badge-html { color: var(--html); background: var(--html-soft); }
.tag { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: 1px 7px; }
.pill-stelle { font-size: 12.5px; font-weight: 700; border-radius: 2px; padding: 2px 7px; white-space: nowrap; color: var(--accent); background: var(--accent-soft); }
.pill-stelle.pdf { color: var(--pdf); background: var(--pdf-soft); }
.pill-stelle.fn { color: var(--muted); background: var(--surface-2); }
.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-s); background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--ink-2); font-size: 13.5px; }
.hinweis.warn { background: var(--pdf-soft); border-left-color: var(--pdf); }

/* ── Cover ───────────────────────────────────────────────────────────────── */
/* Bücher sehen aus wie Bücher: harte Kanten, Buchrücken links, Schatten.
   Urteile und Aufsätze sind Blätter Papier. */
.cover { position: relative; aspect-ratio: 3 / 4.2; width: 100%; border-radius: 2px 5px 5px 2px; overflow: hidden; background: var(--surface-2); flex: none;
  box-shadow: 0 1px 1px rgba(17, 19, 24, .10), 0 6px 14px rgba(17, 19, 24, .10), 0 18px 32px -12px rgba(17, 19, 24, .22); }
.cover-bild img { width: 100%; height: 100%; object-fit: cover; display: block; background: #fff; }
.cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(17, 19, 24, .08); }
.cover-buch::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .06) 2.4%, rgba(255, 255, 255, .20) 3.4%, rgba(255, 255, 255, 0) 7%,
    rgba(255, 255, 255, 0) 92%, rgba(0, 0, 0, .07) 100%);
}
.cover-blatt { border-radius: 3px; }

/* gestaltetes Buch */
.cover-karte { display: flex; flex-direction: column; container-type: inline-size; }
.cover-karte.cover-buch {
  background: radial-gradient(130% 70% at 85% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--werk) 92%, #fff) 0%, var(--werk) 45%, color-mix(in srgb, var(--werk) 82%, #000) 100%);
  color: #fff;
}
.cover-band { display: flex; justify-content: space-between; align-items: center; padding: 11% 10% 0 14%; font-family: var(--sans); font-size: max(7px, 6.6cqi); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.cover-linie { margin: 7% 10% 0 14%; height: 2px; background: rgba(255, 255, 255, .55); box-shadow: 0 3.5px 0 -1px rgba(255, 255, 255, .35); }
.cover-titel { padding: 9% 10% 0 14%; font-family: var(--serif); font-weight: 650; font-size: max(9px, 12.5cqi); line-height: 1.12; letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.cover-unter { padding: 6% 10% 0 14%; font-size: max(7px, 6.8cqi); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-fuss { margin-top: auto; padding: 0 10% 10% 14%; display: flex; justify-content: space-between; align-items: flex-end; gap: 6px; font-family: var(--sans); font-size: max(7px, 6.4cqi); }
.cover-rn { font-family: var(--mono); font-weight: 700; font-size: max(7px, 6cqi); border: 1px solid currentColor; border-radius: 4px; padding: 1px 4px; opacity: .8; flex: none; }
.cover-buch .cover-band, .cover-buch .cover-unter, .cover-buch .cover-fuss { color: rgba(255, 255, 255, .78); }

/* gestaltetes Blatt (Urteil, Aufsatz) */
.cover-karte.cover-blatt { background: var(--surface); border: 1px solid var(--border); color: var(--ink); box-shadow: 0 1px 2px rgba(17, 19, 24, .06), 0 8px 20px rgba(17, 19, 24, .07); }
.cover-karte.cover-blatt::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--werk); }
.cover-blatt .cover-band { padding-left: 10%; padding-top: 13%; font-family: var(--mono); letter-spacing: .06em; color: var(--werk); }
.cover-blatt .cover-titel { padding-left: 10%; font-weight: 600; font-size: max(9px, 11cqi); }
.cover-blatt .cover-unter { padding-left: 10%; color: var(--muted); }
.cover-blatt .cover-fuss { padding-left: 10%; font-family: var(--mono); color: var(--werk); }
.cover-blatt .cover-rn { display: none; }
.cover-blatt .zeilen-deko { margin: 9% 10% 0; display: flex; flex-direction: column; gap: 5px; }
.cover-blatt .zeilen-deko i { display: block; height: 3px; border-radius: 2px; background: var(--surface-2); }
.cover-blatt .zeilen-deko i:nth-child(2) { width: 86%; } .cover-blatt .zeilen-deko i:nth-child(3) { width: 64%; }

/* winzige Cover (Listen, Suchtreffer): nur Farbe + Anfangsbuchstabe */
.cover-xs { width: 44px; }
.cover-xs .cover-band, .cover-xs .cover-unter, .cover-xs .cover-fuss, .cover-xs .cover-titel, .cover-xs .cover-linie, .cover-xs .zeilen-deko { display: none; }
.cover-xs.cover-karte { justify-content: center; align-items: center; }
.cover-xs.cover-karte::before { content: attr(data-kurz); position: static; height: auto; background: none; font-family: var(--serif); font-weight: 650; font-size: 18px; }
.cover-xs.cover-buch::before { color: #fff; }
.cover-xs.cover-blatt::before { color: var(--werk); border-top: 3px solid var(--werk); padding-top: 2px; }

/* ── Bücherregal ─────────────────────────────────────────────────────────── */
.regal { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 28px 22px; }
.buch-kachel { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); position: relative; }
.buch-kachel:hover { color: var(--ink); }
.buch-kachel:hover .cover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(17, 19, 24, .08), 0 14px 30px rgba(17, 19, 24, .12); }
.buch-kachel .cover { transition: transform .18s ease, box-shadow .18s ease; }
.kachel-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kachel-titel { font-weight: 700; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kachel-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kachel-stern { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .92); color: #D9862B; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.fortschritt { height: 3px; border-radius: 0; background: var(--rn-bg); overflow: hidden; }
.fortschritt > div { height: 100%; background: var(--accent); }

.weiter-reihe { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.weiter-karte { display: flex; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); text-decoration: none; color: var(--ink); align-items: center; }
.weiter-karte:hover { border-color: var(--border-strong); border-left-color: var(--accent); box-shadow: var(--shadow); color: var(--ink); }
.weiter-karte .cover { width: 58px; }
.weiter-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.weiter-titel { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.weiter-stelle { font-size: 12px; font-weight: 700; color: var(--accent); }

.zeilen { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--ink); }
.zeile:last-child { border-bottom: 0; }
.zeile:hover { background: var(--surface-2); color: var(--ink); }
.zeile:hover .zeile-titel { color: var(--accent); }
.zeile .cover { width: 40px; }
.zeile-haupt { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zeile-titel { font-weight: 700; font-size: 14px; }
.zeile-sub { color: var(--muted); font-size: 13px; }
.zeile-rechts { color: var(--muted); font-size: 12.5px; flex: 0 0 auto; }

/* ── Buchseite ───────────────────────────────────────────────────────────── */
.buch-kopf { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 32px; align-items: start; }
.buch-kopf .cover { width: 100%; }
.cover-aktionen { display: flex; gap: 6px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.cover-knopf { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; position: relative; text-align: left; border-radius: 6px; }
.cover-knopf-hinweis { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 2px;
  background: rgba(17, 19, 24, .78); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transition: opacity .15s ease; pointer-events: none; backdrop-filter: blur(4px); }
.cover-knopf:hover .cover-knopf-hinweis, .cover-knopf:focus-visible .cover-knopf-hinweis { opacity: 1; }
@media (hover: none) { .cover-knopf-hinweis { opacity: 1; } }

/* Schnellknopf auf dem Regal */
.kachel-huelle { position: relative; display: flex; flex-direction: column; }
.cover-schnell { position: absolute; left: 8px; top: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 0; border-radius: 2px;
  background: rgba(17, 19, 24, .82); color: #fff; font-size: 12px; font-weight: 500; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.kachel-huelle:hover .cover-schnell, .cover-schnell:focus-visible { opacity: 1; }
.cover-schnell:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (hover: none) { .cover-schnell { opacity: 1; } }

/* Hinweis „Bücher ohne Cover“ */
.cover-hinweis { align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.cover-hinweis .hinweis-text { flex: 1 1 220px; }
.hinweis-aktionen { display: flex; gap: 6px; align-items: center; margin-left: auto; }

/* Cover-Auswahl */
.cover-dialog { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; align-items: start; }
.cover-haupt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cover-suche { display: flex; gap: 8px; }
.cover-suche .suchfeld { flex: 1; min-height: 42px; }
.cover-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; max-height: min(56vh, 520px); overflow-y: auto; padding: 4px 4px 8px; }
.cover-kachel { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); border-radius: 6px; }
.cover-kachel .cover { transition: transform .15s ease, box-shadow .15s ease; }
.cover-kachel:hover .cover, .cover-kachel:focus-visible .cover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--accent), 0 12px 24px rgba(17, 19, 24, .18); }
.cover-kachel:disabled { opacity: .5; cursor: progress; }
.cover-kachel-titel { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover-kachel-info { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.cover-kachel.laedt .cover, .cover-platz { aspect-ratio: 3 / 4.2; border-radius: 3px 6px 6px 3px; background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 50%, var(--surface-2) 70%); background-size: 300% 100%; animation: schimmer 1.3s linear infinite; }
.cover-kachel.laedt .cover img { opacity: 0; }
.cover-kachel.laedt .cover-kachel-titel, .cover-kachel.laedt .cover-kachel-info { visibility: hidden; }
@keyframes schimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cover-seite { display: flex; flex-direction: column; gap: 14px; }
.cover-pdf { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-s); font-size: 13.5px; background: var(--surface-2); }
.cover-pdf-zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cover-pdf-zeile .feld { min-height: 36px; }
@media (max-width: 760px) { .cover-dialog { grid-template-columns: 1fr; } .cover-raster { max-height: none; } }

.buch-info { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.buch-info h1 { margin: 0; font-size: 27px; line-height: 1.2; font-weight: 700; }
.buch-info .untertitel { margin: 0; color: var(--muted); font-size: 16px; }
.meta-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.meta-raster div { display: flex; flex-direction: column; padding: 8px 12px; border-bottom: 1px solid var(--surface-2); border-right: 1px solid var(--surface-2); }
.meta-raster dt { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.meta-raster dd { margin: 0; font-weight: 400; overflow-wrap: anywhere; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.zitiervorschau { font-size: 13.5px; font-weight: 600; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-s); }
.teil-zeile .teil-label { font-weight: 700; font-size: 13.5px; color: var(--accent); min-width: 72px; }
.teil-zeile .teil-aktionen { display: flex; gap: 2px; }

/* ── Leser ───────────────────────────────────────────────────────────────── */
.leser { display: flex; flex-direction: column; height: calc(100vh - var(--kopf-h)); }
.leser-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px clamp(12px, 2vw, 20px); background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 5; }
.leser-titel { flex: 1 1 280px; min-width: 0; display: flex; align-items: center; gap: 10px; }
.leser-titel-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.leser-titel-text .brotkrumen ol { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; font-size: 12px; }
.leser-titel-text .brotkrumen li { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.leser-titel-text strong { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leser-titel-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leser-werkzeuge { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.leser-stelle { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius-s); padding: 6px 10px; white-space: nowrap; }
.leser-stelle.pdf { color: var(--pdf); background: var(--pdf-soft); }
.leser-koerper { flex: 1; min-height: 0; display: flex; position: relative; }
.leser-nav, .leser-panel { flex: 0 0 280px; overflow-y: auto; padding: 16px 0 40px; background: var(--leiste); }
.leser-nav { border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 22px; }
.leser-nav .nav-titel { margin: 0 14px 2px; }
.leser-panel { flex-basis: 320px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 20px; padding: 16px 16px 40px; }
.leser-mitte { flex: 1 1 auto; min-width: 0; position: relative; background: var(--surface); }
.leser-scroll { position: absolute; inset: 0; overflow-y: auto; scroll-behavior: smooth; }
.leser-nav[hidden], .leser-panel[hidden] { display: none; }
.toc { display: flex; flex-direction: column; gap: 1px; }
.toc a, .toc button { display: flex; justify-content: space-between; gap: 8px; padding: 6px 14px 6px 11px; border-radius: 0; border-left: 3px solid transparent !important; text-decoration: none; color: var(--ink-2); font-size: 13.5px; line-height: 1.35; border: 0; background: transparent; text-align: left; cursor: pointer; width: 100%; }
.toc a:hover, .toc button:hover { background: var(--surface-2); color: var(--ink); }
.toc a[aria-current="location"], .toc a[aria-current="page"] { color: var(--accent); background: var(--surface); border-left-color: var(--accent) !important; font-weight: 700; }
.toc .rn-bereich { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.toc a[aria-current] .rn-bereich { color: inherit; }
.toc .tiefe-2 { padding-left: 21px; } .toc .tiefe-3 { padding-left: 31px; } .toc .tiefe-4, .toc .tiefe-5, .toc .tiefe-6 { padding-left: 41px; }
.teile-liste a { align-items: baseline; }
.teile-liste .teil-label { font-size: 12.5px; font-weight: 700; flex: none; min-width: 58px; color: var(--muted); }
.teile-liste a[aria-current="page"] .teil-label { color: inherit; }
.teile-liste .teil-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sprung { display: flex; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--border); margin-top: 4px; }
.sprung input { width: 80px; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); }
.blaetter { display: flex; justify-content: space-between; gap: 12px; max-width: 820px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px) 56px; }

[hidden] { display: none !important; }

/* Dokumentkopf: Werk, Teil, Bearbeiter, Zitiervorschlag */
.doc-kopf { max-width: 820px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 56px) 0 clamp(60px, 6vw, 88px); }
.doc-kopf dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 16px; padding: 11px 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 2px; font-size: 13px; line-height: 1.45; }
.doc-kopf dl > div { display: contents; }
.doc-kopf dt { color: var(--muted); font-weight: 700; }
.doc-kopf dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.doc-kopf-zitierzeile dd { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.doc-kopf-kopie { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong);
  border-radius: 2px; background: var(--surface); color: var(--ink-2); cursor: pointer; }
.doc-kopf-kopie:hover { color: var(--accent); border-color: var(--accent); }

/* Dokument (bereinigtes HTML) */
.doc { max-width: 820px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 56px) 40px clamp(60px, 6vw, 88px); font-family: var(--leser-schrift); font-size: var(--leser-groesse); line-height: 1.62; color: var(--ink); overflow-wrap: break-word; }
.doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 { font-family: var(--sans); font-weight: 700; line-height: 1.3; scroll-margin-top: 24px; }
.doc h1 { font-size: 1.4em; margin: 0 0 .6em; color: var(--accent); }
.doc h2 { font-size: 1.1em; margin: 1.7em 0 .55em; }
.doc h3 { font-size: 1.02em; margin: 1.5em 0 .5em; }
.doc h4, .doc h5, .doc h6 { font-size: .95em; margin: 1.3em 0 .4em; }
.doc p, .doc dd, .doc li { margin: 0 0 .9em; }
.doc dl { margin: 0; }
.doc dt.rn-marker { display: none; }
.doc table { border-collapse: collapse; margin: 1em 0; font-size: .9em; display: block; overflow-x: auto; max-width: 100%; }
.doc img { max-width: 100%; height: auto; vertical-align: middle; }
.doc td, .doc th { border: 1px solid var(--border); padding: 6px 10px; vertical-align: top; }
.doc blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid var(--border-strong); color: var(--ink-2); }
.doc a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc a.norm { text-decoration: none; border-bottom: 1px dotted currentColor; }
.doc a.norm:hover { background: var(--html-soft); }
.doc .rn-block { position: relative; }
.doc .rn-marker.rn-versteckt, .doc dt.rn-versteckt { display: none; }
.rn-pill.rn-inline { position: static; display: inline-block; margin-right: .35em; }
.doc .rn-anchor { scroll-margin-top: 24px; }
/* Seitenumbruch der Druckausgabe (Aufsätze): „S. 143“ als feine Trennlinie */
.doc .seiten-anker { display: flex; align-items: center; gap: 10px; margin: .4em 0 .9em; scroll-margin-top: 24px; }
.doc .seiten-anker::before { content: 'S. ' attr(data-seite); font-family: var(--sans); font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.doc .seiten-anker::after { content: ''; flex: 1; border-top: 1px dashed var(--border-strong); }
.doc a.rn-verweis { text-decoration-style: dotted; }
.badge-tdm { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.rn-pill {
  position: absolute; left: -3.7em; top: .22em; min-width: 2.5em; text-align: center;
  font-family: var(--sans); font-size: 12px; line-height: 1.55; font-weight: 700; color: var(--ink-2); background: var(--rn-bg); text-decoration: none !important; border-radius: 2px; padding: 0 5px;
}
.doc a.rn-pill { color: var(--ink-2); }
.rn-pill:hover, .doc a.rn-pill:hover { color: var(--accent); background: var(--accent-soft); }
.rn-pill.aktuell { color: var(--on-accent) !important; background: var(--accent); }
.fn-ref { font-family: var(--sans); font-size: .72em; font-weight: 700; color: var(--accent) !important; text-decoration: none !important; padding: 0 2px; cursor: pointer; }
.doc sup { line-height: 0; }
.doc .fn-body { font-size: .86em; line-height: 1.55; color: var(--ink-2); font-family: var(--sans); scroll-margin-top: 24px; }
.doc .fn-body.ziel { background: var(--accent-soft); border-radius: 2px; }
.fn-pop { display: block; margin: .3em 0 1em; padding: 9px 13px; background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 2px; font-family: var(--sans); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.fn-pop .fn-nr { font-weight: 700; color: var(--accent); margin-right: 6px; }
.blitz { animation: blitz 1.6s ease; }
@keyframes blitz { 0%, 30% { background: var(--treffer); } 100% { background: transparent; } }
mark.hl { color: inherit; border-radius: 1px; padding: 1px 0; cursor: pointer; }
mark.hl-blau { background: var(--hl-blau); } mark.hl-pfirsich { background: var(--hl-pfirsich); }
mark.hl-flieder { background: var(--hl-flieder); } mark.hl-mint { background: var(--hl-mint); }
mark.such { background: var(--treffer); color: inherit; border-radius: 1px; }
.doc ::selection { background: var(--sel); }

/* Auswahl-Leiste */
.auswahl-leiste {
  position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 4px; background: #1D1F23; color: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: 13px; font-family: var(--sans);
}
.auswahl-leiste button { min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 0; border-radius: 2px; background: transparent; color: #fff; cursor: pointer; }
.auswahl-leiste button:hover { background: rgba(255, 255, 255, .12); }
.auswahl-leiste .farbe { width: 34px; padding: 0; justify-content: center; }
.auswahl-leiste .farbe span { width: 16px; height: 16px; border-radius: 50%; }
.auswahl-leiste .trenner { width: 1px; height: 20px; background: rgba(255, 255, 255, .22); margin: 0 3px; }
.f-blau { background: #B9C8FF; } .f-pfirsich { background: #FFC9AE; } .f-flieder { background: #D9C6FF; } .f-mint { background: #A8E5CD; }

/* Seitenpanel */
.panel-karte { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: var(--radius-s); }
.panel-karte h2, .panel-abschnitt h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.panel-abschnitt { display: flex; flex-direction: column; gap: 10px; }
.zitat-text { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.eintrag { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); text-align: left; cursor: pointer; width: 100%; }
.eintrag:hover { border-color: var(--border-strong); color: var(--ink); }
.eintrag-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.eintrag-text { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.eintrag-zitat { font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--border-strong); padding-left: 8px; font-style: italic; }
.farbpunkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.eintrag-aktionen { display: flex; gap: 2px; }
.eintrag-aktionen .icon-btn { width: 30px; height: 30px; }

/* PDF */
.pdf-flaeche { position: absolute; inset: 0; overflow: auto; background: var(--surface-2); }
.pdf-flaeche .pdfViewer { padding: 18px 0 40px; }
.pdf-flaeche .pdfViewer .page { border-radius: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); border: 0; margin: 12px auto; }
.hl-ebene { position: absolute; inset: 0; pointer-events: none; z-index: 3; mix-blend-mode: multiply; }
.hl-ebene div { position: absolute; border-radius: 2px; pointer-events: auto; cursor: pointer; opacity: .65; }
.hl-ebene .hl-blau { background: #9FB3FF; } .hl-ebene .hl-pfirsich { background: #FFB08A; }
.hl-ebene .hl-flieder { background: #C9AEFF; } .hl-ebene .hl-mint { background: #8EDDBB; }
.zoom { display: inline-flex; align-items: center; gap: 2px; }
.zoom > span { font-size: 12px; min-width: 48px; text-align: center; color: var(--muted); }

/* ── Suche ───────────────────────────────────────────────────────────────── */
.such-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.such-treffer { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.such-seite { flex: 1 1 260px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.treffer-gruppe { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.such-titel { margin: 0; font-size: 20px; font-weight: 700; }
.treffer-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.treffer-kopf .cover { width: 36px; }
.treffer-kopf .titel { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.treffer-kopf .titel a { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 15px; }
.treffer-kopf .titel a:hover { text-decoration: underline; }
.treffer { display: grid; grid-template-columns: minmax(84px, auto) minmax(0, 1fr); gap: 6px 14px; padding: 11px 16px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--surface-2); }
.treffer:last-child { border-bottom: 0; }
.treffer:hover { background: var(--accent-soft); color: var(--ink); }
.treffer .stelle { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.treffer .teil { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.treffer .ausschnitt { font-size: 14px; line-height: 1.55; }
.ausschnitt mark { background: var(--treffer); color: inherit; border-radius: 1px; padding: 0 2px; font-weight: 700; }
.mehr-treffer { padding: 10px 16px; font-size: 13px; }
.tipps { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; font-size: 13px; }
.tipps dt { font-weight: 700; color: var(--accent); }
.tipps dd { margin: 0; color: var(--ink-2); }

/* ── Dialoge ─────────────────────────────────────────────────────────────── */
dialog.modal { border: 0; border-top: 4px solid var(--accent); padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-pop); }
dialog.modal-wide { width: min(820px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(17, 19, 24, .45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px 10px 22px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-body { padding: 16px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-body p { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.formular .voll { grid-column: 1 / -1; }
.formular label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.formular .feld, .formular .auswahl { width: 100%; }
.formular small { color: var(--muted); font-weight: 400; font-size: 12px; }
.kontrollliste { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.kontrollliste label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.ablage { border: 2px dashed var(--border-strong); border-radius: var(--radius-s); padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); cursor: pointer; transition: background .15s, border-color .15s; }
.ablage.drueber, .ablage:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-2); }
.ablage strong { color: var(--ink); font-size: 15px; }
.import-liste { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.import-zeile { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface-2); font-size: 13.5px; }
.import-zeile .name { font-weight: 600; overflow-wrap: anywhere; }
.import-zeile .info { color: var(--muted); font-size: 12.5px; }
.status-punkt { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--border-strong); }
.status-punkt.ok { background: var(--ok); } .status-punkt.fehler { background: var(--danger); } .status-punkt.doppelt { background: #D9862B; }
.status-punkt.laeuft { background: var(--accent); animation: puls 1s infinite alternate; }
@keyframes puls { to { opacity: .3; } }

/* Hinweise unten */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; align-items: center; pointer-events: none; }
.toast { background: #1D1F23; color: #fff; padding: 10px 16px; border-radius: var(--radius-s); border-left: 3px solid var(--accent); box-shadow: var(--shadow-pop); font-size: 13.5px; max-width: min(520px, 92vw); transition: opacity .4s, transform .4s; }
.toast-fehler { background: #8F1D16; }
.toast.weg { opacity: 0; transform: translateY(8px); }

/* ── Schmale Bildschirme ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .leser-panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 8; box-shadow: var(--shadow-pop); width: min(340px, 92vw); }
  .leser-nav { position: absolute; left: 0; top: 0; bottom: 0; z-index: 8; box-shadow: var(--shadow-pop); width: min(300px, 88vw); }
}
@media (max-width: 860px) {
  :root { --kopf-h: 56px; }
  .kopfleiste { gap: 8px; padding: 0 10px; }
  .kopfleiste .kopf-menue { display: inline-flex; }
  .logo { width: auto; }
  .logo-text, .kopf-kbd, .kopf-lupe { display: none; }
  .kopf-suche { height: 38px; }
  .kopf-suche input { padding-left: 10px; font-size: 16px; }
  .kopf-suchknopf { padding: 0 12px; }
  .kopf-import .btn-text, .kopf-wechsel .btn-text { display: none; }
  .kopf-wechsel { padding: 0 8px; }
  .kopf-import { padding: 0 10px; }
  .seitenleiste { position: fixed; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); height: 100%; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); z-index: 50; }
  .seitenleiste.offen { transform: none; }
  .nav-fuss { display: flex; margin-top: auto; border-top: 1px solid var(--border); padding-top: 10px; }
  .buch-kopf { grid-template-columns: 1fr; }
  .buch-kopf > div:first-child { max-width: 200px; }
  .formular { grid-template-columns: 1fr; }
  .regal { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 22px 16px; }
  .doc, .doc-kopf { padding-left: 54px; padding-right: 16px; }
  .rn-pill { left: -3.4em; }
  .leser { height: calc(100dvh - var(--kopf-h)); }
  .leser-kopf { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
  .leser-titel { min-width: 72px; flex: 1 1 72px; }
  .leser-titel-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .leser-titel .badge, .leser-titel-text .brotkrumen { display: none; }
  .leser-werkzeuge { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 0 1 auto; min-width: 0; }
  .leser-werkzeuge .btn { padding: 0 10px; }
  .leser-werkzeuge .btn .btn-text, .zoom > span { display: none; }
  .suchfeld-klein { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .doc-kopf dl { grid-template-columns: 1fr; gap: 0 0; }
  .doc-kopf dd { margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .kopfleiste, .seitenleiste, .leser-kopf, .leser-nav, .leser-panel, .blaetter, .doc-kopf-kopie { display: none !important; }
  .leser, .leser-koerper, .leser-mitte, .leser-scroll { position: static; height: auto; overflow: visible; }
}

/* ══ Gemeinsame Bausteine: Normtext-Karte, Aktenzeichen, Karteikarten ═══════ */
.norm-karte { display: block; margin: .4em 0 1.1em; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--link);
  border-radius: 2px; font-family: var(--sans); font-size: 14px; line-height: 1.55; color: var(--ink-2); box-shadow: var(--shadow); }
.norm-kopf { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 8px 6px 14px; border-bottom: 1px solid var(--surface-2); }
.norm-kopf strong { color: var(--ink); font-size: 14px; }
.norm-kopf .icon-btn { width: 30px; height: 30px; }
.norm-text { padding: 8px 14px 4px; max-height: 340px; overflow-y: auto; }
.norm-text p, .norm-text P { margin: 0 0 .6em; }
.norm-text dl { margin: 0 0 .6em; } .norm-text dd { margin-left: 1.6em; }
.norm-aktionen { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 12px; }
.norm-aktionen .btn { min-height: 32px; font-size: 13px; }
.norm-gross .norm-text { max-height: none; font-size: 15.5px; padding: 16px 20px; }
.doc a.az { color: var(--link); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--link) 45%, transparent); }
.doc a.az:hover { background: var(--html-soft); }
.auswahl-leiste .karte-knopf { background: rgba(255, 255, 255, .1); }

.karte-dialog { display: flex; flex-direction: column; gap: 14px; }
.karte-bereich { display: flex; flex-direction: column; gap: 10px; }
.karte-bereich label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.karte-bereich textarea { font-size: 14.5px; }
.karte-vorschau-rahmen { border: 1px dashed var(--border-strong); border-radius: var(--radius-s); padding: 10px 12px; background: var(--surface-2); }
.karte-vorschau-titel { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.karte-vorschau { white-space: pre-wrap; font-size: 14.5px; }
.karte-luecke { display: inline-block; padding: 0 6px; margin: 0 1px; border-radius: 2px; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.karte-fundstelle { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); padding: 8px 10px; background: var(--surface-2); border-left: 3px solid var(--accent); }

/* Karteikarten-Übersicht (Randnummer) */
.karten-status .karten-zahlen { display: flex; flex-wrap: wrap; gap: 28px; }
.karten-zahlen div { display: flex; flex-direction: column; }
.karten-zahlen strong { font-size: 22px; color: var(--accent); }
.karten-zahlen span { font-size: 12px; color: var(--muted); }
.karten-hilfe summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.karten-hilfe ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: 0 4px; }
.karten-liste { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.karten-zeile { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--surface-2); }
.karten-knoepfe { display: flex; gap: 2px; }
.karten-zeile:last-child { border-bottom: 0; }
.karten-typ { font-size: 11px; font-weight: 700; text-align: center; padding: 3px 0; border-radius: 2px; background: var(--accent-soft); color: var(--accent); }
.karten-typ.lueckentext { background: var(--html-soft); color: var(--html); }
.karten-inhalt { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.karten-meta { font-size: 12px; color: var(--muted); }
.karten-fehler { font-size: 12px; color: var(--danger); }
.karten-status-chip { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 2px; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.karten-status-chip.ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.karten-status-chip.warn { background: var(--pdf-soft); color: var(--pdf); }
.karten-status-chip.fehler { background: var(--danger-soft); color: var(--danger); }

/* Wechsel zwischen den Apps (Kopfleiste) */
.kopf-wechsel-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 4px; border-radius: 2px;
  background: #9B1B30; color: #fff; font-size: 11px; font-weight: 700; }
.kopf-wechsel-mark.tenor { background: #1F3A68; }

/* ══ Tenor: Nachtblau statt Bordeaux ═════════════════════════════════════════ */
html[data-app="tenor"] { --accent: #1F3A68; --accent-ink: #142949; --accent-soft: #E6ECF5; --sel: #C9D6EE; --link: #9B1B30; --html: #1F3A68; --html-soft: #E6ECF5; }
@media (prefers-color-scheme: dark) {
  html[data-app="tenor"]:not([data-theme="hell"]) { --accent: #8AA9E0; --accent-ink: #B5C9EE; --accent-soft: #1A2740; --sel: #2A3D63; --link: #E06A7E; --html: #8AA9E0; --html-soft: #1A2740; }
}
.nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seite-breit { max-width: 1320px; }
.gericht-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 2px; background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; font-weight: 700; white-space: nowrap; }

.tenor-held { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); }
.tenor-held h1 { margin: 0; font-size: 28px; font-weight: 700; }
.tenor-held p { margin: 4px 0 12px; color: var(--muted); font-size: 14.5px; }
.tenor-beispiele { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tenor-zahlen { display: flex; gap: 26px; }
.tenor-zahlen div { display: flex; flex-direction: column; align-items: flex-end; }
.tenor-zahlen strong { font-size: 26px; color: var(--accent); line-height: 1.1; }
.tenor-zahlen span { font-size: 12px; color: var(--muted); }
.import-stand { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tenor-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.tenor-kachel { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-s); text-decoration: none; color: var(--ink); }
.tenor-kachel:hover { border-color: var(--accent); color: var(--accent); }
.tenor-kachel span { font-size: 12.5px; color: var(--muted); }
.tenor-quelle { font-size: 12px; margin: 0; }

.treffer-liste { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tenor-treffer { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tenor-treffer:hover { border-color: var(--border-strong); }
.tenor-treffer-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; }
.tenor-treffer-titel { font-size: 16px; font-weight: 700; color: var(--accent); text-decoration: none; }
.tenor-treffer-titel:hover { text-decoration: underline; }
.tenor-leitsatz { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.leitsatz-label { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.tenor-fundstellen { display: flex; flex-direction: column; border-top: 1px solid var(--surface-2); margin-top: 2px; }
.tenor-fundstelle { display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 12px; padding: 7px 0 2px; text-decoration: none; color: var(--ink); font-size: 14px; line-height: 1.55; }
.tenor-fundstelle:hover .ausschnitt { color: var(--accent); }
.tenor-fundstelle .pill-stelle { justify-self: start; align-self: start; }

.tenor-such-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 22px; align-items: start; }
.tenor-filter { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--kopf-h) + 12px); }
.facette { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.facette h3 { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facette-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.facette-liste label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; padding: 2px 0; }
.facette-liste input { accent-color: var(--accent); }
.facette-name { flex: 1; min-width: 0; }
.facette-liste .zahl { font-size: 12px; color: var(--muted); }
.facette .seg { display: flex; } .facette .seg button { flex: 1; padding: 0 6px; font-size: 13px; }
.jahr-wahl { display: flex; align-items: center; gap: 6px; } .jahr-wahl select { flex: 1; min-width: 0; }
.link-btn { border: 0; background: none; padding: 2px 0; color: var(--accent); cursor: pointer; font-size: 13px; }
.filter-weg { justify-content: flex-start; }
.blaettern { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.zitat-liste { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.zitat-link { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-bottom: 1px solid var(--surface-2); text-decoration: none; color: var(--ink); font-size: 13px; }
.zitat-link:last-child { border-bottom: 0; }
.zitat-link strong { color: var(--accent); font-size: 13px; }
.zitat-link span { color: var(--muted); font-size: 12px; }
a.zitat-link:hover { background: var(--accent-soft); }
.zitat-link.fehlt strong { color: var(--muted); font-weight: 600; }
@media (max-width: 960px) {
  .tenor-such-layout { grid-template-columns: 1fr; }
  .tenor-filter { position: static; order: 2; }      /* auf dem Handy: erst die Treffer, dann die Filter */
  .tenor-zahlen div { align-items: flex-start; }
}

/* ── Recherche mit Claude ────────────────────────────────────────────────── */
:root { --fund-b: #9B1B30; --fund-b-soft: #F6E7EA; --fund-e: #1F3A68; --fund-e-soft: #E6ECF5;
        --fund-g: #0F766E; --fund-g-soft: #E2F3F0; --fund-n: #B45309; --fund-n-soft: #FDF0E1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) { --fund-b: #F29AAA; --fund-b-soft: #3A1B22; --fund-e: #A9C1EC; --fund-e-soft: #1A2740;
                                   --fund-g: #5EEAD4; --fund-g-soft: #12322E; --fund-n: #F0A35E; --fund-n-soft: #3A2814; }
}
.kopf-ki { border-color: var(--accent); color: var(--accent); }
.kopf-ki:hover { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.auswahl-leiste .ki-knopf { background: rgba(255, 255, 255, .16); font-weight: 700; }
.recherche-seite { max-width: 1320px; gap: 14px; padding-bottom: 0; min-height: calc(100vh - var(--kopf-h)); }
.recherche { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; flex: 1; }
.recherche-liste-huelle { position: sticky; top: calc(var(--kopf-h) + 12px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.recherche-liste-huelle > summary { display: none; }
.recherche-liste { display: flex; flex-direction: column; gap: 6px; padding: 12px; max-height: calc(100vh - var(--kopf-h) - 60px); overflow-y: auto; }
.recherche-liste .neu-knopf { width: 100%; }
.recherche-liste ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.recherche-liste li a { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; border-left: 3px solid transparent; }
.recherche-liste li a:hover { background: var(--surface-2); color: var(--ink); }
.recherche-liste li a[aria-current="page"] { background: var(--accent-soft); border-left-color: var(--accent); color: var(--ink); }
.r-titel { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r-meta { font-size: 12px; color: var(--muted); }
.recherche-haupt { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: calc(100vh - var(--kopf-h) - 80px); }
.recherche-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.recherche-titel { display: flex; align-items: center; gap: 6px; min-width: 0; }
.recherche-titel h1 { margin: 0; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.recherche-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.recherche-verbrauch { font-size: 12.5px; white-space: nowrap; }
.stufen button { min-height: 32px; font-size: 13px; }
.recherche-verlauf { flex: 1; display: flex; flex-direction: column; gap: 22px; padding: 20px clamp(14px, 3vw, 34px) 28px; }
.nachricht { display: flex; flex-direction: column; gap: 8px; max-width: 860px; width: 100%; }
.nachricht .wer { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.nachricht-claude .wer { color: var(--accent); }
.nachricht-du { align-self: flex-end; max-width: 720px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.frage-text { white-space: pre-wrap; font-size: 15px; font-weight: 600; line-height: 1.45; }
.kontext-zitat { display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.45; padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--ink-2); }
.kontext-zitat .muted { font-size: 12px; }
.spur { border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--leiste); font-size: 13px; }
.spur > summary { display: flex; align-items: center; gap: 7px; padding: 7px 10px; cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; }
.spur > summary::-webkit-details-marker { display: none; }
.spur > summary::after { content: '▸'; margin-left: auto; color: var(--muted); }
.spur[open] > summary::after { content: '▾'; }
.spur-liste { list-style: none; margin: 0; padding: 2px 10px 9px; display: flex; flex-direction: column; gap: 5px; }
.spur-liste li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: start; color: var(--ink-2); }
.spur-liste li.notiz { color: var(--muted); font-style: italic; }
.spur-ico { display: inline-flex; padding-top: 1px; color: var(--muted); }
.spur-text { overflow-wrap: anywhere; }
.spur-erg { font-size: 12px; color: var(--muted); white-space: nowrap; }
.spur-liste li.laeuft .spur-ico { animation: puls 1s ease-in-out infinite; color: var(--accent); }
.spur-liste li.fehler .spur-erg { color: var(--danger); }
@keyframes puls { 50% { opacity: .3; } }
.antwort-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.punkte { display: inline-flex; gap: 4px; }
.punkte i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: hupf 1.1s ease-in-out infinite; }
.punkte i:nth-child(2) { animation-delay: .15s; } .punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes hupf { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .punkte i, .spur-liste li.laeuft .spur-ico { animation: none; } }
.antwort-text { font-size: 15.5px; line-height: 1.62; color: var(--ink); overflow-wrap: anywhere; }
.antwort-text > :first-child { margin-top: 0; }
.antwort-text p { margin: 0 0 .75em; }
.antwort-text h3 { font-size: 16.5px; margin: 1.1em 0 .45em; }
.antwort-text h4 { font-size: 15px; margin: 1em 0 .4em; }
.antwort-text ul, .antwort-text ol { margin: 0 0 .8em; padding-left: 1.4em; }
.antwort-text li { margin: .25em 0; }
.antwort-text blockquote { margin: 0 0 .8em; padding: 4px 12px; border-left: 3px solid var(--border-strong); color: var(--ink-2); }
.antwort-text code { font-size: .92em; background: var(--surface-2); padding: 1px 4px; border-radius: 2px; }
.antwort-text hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.fund { display: inline-flex; align-items: baseline; gap: 3px; margin: 0 1px; padding: 0 6px; border-radius: 2px; font-size: 12.5px; font-weight: 600; line-height: 1.55;
        text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: baseline; border: 1px solid transparent; }
.fund-b { color: var(--fund-b); background: var(--fund-b-soft); }
.fund-e { color: var(--fund-e); background: var(--fund-e-soft); }
.fund-g { color: var(--fund-g); background: var(--fund-g-soft); }
.fund-n { color: var(--fund-n); background: var(--fund-n-soft); }
a.fund:hover { border-color: currentColor; }
.fund-wartet { opacity: .7; }
.fund-unbekannt { background: transparent; border: 1px dashed var(--border-strong); color: var(--muted); text-decoration: line-through; }
.quellen:empty { display: none; }
.quellen { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 4px; }
.quellen h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.quellen ol { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.quellen li { padding-left: 2px; }
.quellen li > * { vertical-align: middle; }
.quellen li a { color: var(--ink); }
.quellen .icon-btn { width: 26px; height: 26px; }
.fund-typ { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 2px; margin-right: 6px; }
.antwort-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12.5px; }
.btn-text-link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--link); cursor: pointer; font-size: 13px; }
.btn-text-link:hover { text-decoration: underline; }
.frage-box { position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px clamp(14px, 3vw, 34px) 12px; background: var(--surface); border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); }
.frage-zeile { display: flex; gap: 8px; align-items: flex-end; max-width: 860px; }
.frage-zeile textarea { flex: 1; min-height: 46px; max-height: 240px; resize: none; padding: 11px 12px; font: inherit; font-size: 15px; line-height: 1.45;
                        border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }
.frage-zeile textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.senden-knopf { min-height: 46px; padding: 0 16px; }
.frage-hinweis { margin: 0; font-size: 12px; }
.kontext-box { display: flex; gap: 8px; align-items: flex-start; max-width: 860px; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 13px; }
.kontext-box > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kontext-box .icon-btn { width: 28px; height: 28px; }
.recherche-start, .einrichten { margin: auto 0; max-width: 680px; align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 0; }
.recherche-start h2, .einrichten h2 { margin: 0; font-size: 22px; }
.start-symbol { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.beispiele { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; width: 100%; margin-top: 8px; }
.beispiel { text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--ink-2); cursor: pointer; font: inherit; font-size: 13.5px; line-height: 1.4; }
.beispiel:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.index-stand { font-size: 12.5px; }
.einrichten { text-align: left; align-items: stretch; }
.einrichten ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.ki-einst { display: flex; flex-direction: column; gap: 10px; }
.ki-einst .feld { display: flex; flex-direction: column; gap: 4px; }
.ki-einst .feld span { font-weight: 600; }
.ki-einst input { max-width: 140px; min-height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); font: inherit; background: var(--surface); color: var(--ink); }
.ki-einst h3 { margin: 6px 0 0; font-size: 14px; }
.ki-einst .schalter-zeile { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ki-einst .schalter-zeile input { min-height: 0; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.stufen-info { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
@media (max-width: 979px) {
  .recherche { grid-template-columns: minmax(0, 1fr); }
  .recherche-liste-huelle { position: static; }
  .recherche-liste-huelle > summary { display: flex; align-items: center; gap: 7px; padding: 10px 12px; cursor: pointer; font-weight: 600; }
  .recherche-liste { max-height: 300px; padding-top: 0; }
}
@media (max-width: 860px) {
  .kopf-ki .btn-text { display: none; }
  .kopf-ki { padding: 0 9px; }
  .recherche-seite { padding-left: 0; padding-right: 0; }
  .recherche-haupt { border-radius: 0; border-left: 0; border-right: 0; }
  .recherche-liste-huelle { border-radius: 0; border-left: 0; border-right: 0; }
  .senden-knopf .btn-text { display: none; }
  .senden-knopf { padding: 0 13px; }
  .nachricht-du { max-width: 92%; }
}
@media (max-width: 860px) {
  .recherche-seite > .brotkrumen { padding: 0 16px; }
  .recherche-titel h1 { font-size: 17px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .recherche-kopf { padding: 12px 16px; }
  .recherche-verlauf { padding: 16px 16px 24px; }
  .frage-box { padding: 10px 16px; }
}
@media (max-width: 520px) {
  .kopf-import { display: none; }
  .frage-hinweis { display: none; }
}

/* ── Lernen (Anki im Browser) ───────────────────────────────────────────── */
:root { --z-neu: #1F5FBF; --z-lernen: #C2410C; --z-faellig: #15803D; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) { --z-neu: #7FB0FF; --z-lernen: #FDBA74; --z-faellig: #86EFAC; } }
.lern-zaehler { display: inline-flex; gap: 10px; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.lern-zaehler span { min-width: 2.2em; text-align: right; }
.lern-zaehler .jetzt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.z-neu { color: var(--z-neu); } .z-lernen { color: var(--z-lernen); } .z-faellig { color: var(--z-faellig); }
.lern-laden { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 60px 0; color: var(--muted); }
.lernen-seite .seitentitel { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.stapel-kopf { display: flex; justify-content: space-between; align-items: center; padding: 0 14px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.stapel-kopf .legende { font-size: 11.5px; margin-right: 142px; }
.stapel-liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stapel-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 86px 32px; align-items: center; gap: 14px; padding: 10px 14px;
  padding-left: calc(14px + var(--ebene, 0) * 22px); border-top: 1px solid var(--border); }
.stapel-zeile:first-child { border-top: 0; }
.stapel-zeile.leer .stapel-name { color: var(--muted); }
.stapel-name { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; min-width: 0; }
.stapel-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stapel-name:hover { color: var(--accent); }
.stapel-karten { font-size: 12.5px; white-space: nowrap; }
.stapel-los { min-height: 32px; padding: 0 12px; }
.stapel-bearbeiten { color: var(--muted); }
.stapel-bearbeiten:hover, .stapel-bearbeiten:focus-visible { color: var(--accent); }
.stapel-zeile[draggable="true"] { cursor: grab; }
.stapel-zeile.gezogen { opacity: .45; }
.stapel-zeile.ziel { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 0 0 2px var(--accent); }
.stapel-ablage { margin-bottom: 8px; padding: 10px 14px; border: 2px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted); font-size: 13px; text-align: center; }
.stapel-ablage.ziel { border-color: var(--accent); color: var(--accent); }
.hinweis.erledigt { background: color-mix(in srgb, var(--z-faellig) 12%, transparent); border-left-color: var(--z-faellig); margin-bottom: 12px; }
.lern-runde { display: flex; flex-direction: column; min-height: calc(100vh - var(--kopf-h)); background: var(--bg); }
.lern-kopf { position: sticky; top: var(--kopf-h); z-index: 5; display: flex; align-items: center; gap: 14px; padding: 10px clamp(12px, 3vw, 28px);
  background: var(--surface); border-bottom: 1px solid var(--border); }
.lern-titel { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lern-titel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lern-titel span { font-size: 12.5px; }
.lern-flaeche { flex: 1; display: flex; justify-content: center; padding: clamp(16px, 4vh, 40px) clamp(12px, 3vw, 28px) 140px; }
.lern-karte { width: 100%; max-width: 760px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--z-neu);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 4vw, 36px); align-self: flex-start; }
.lern-karte.art-lernen { border-top-color: var(--z-lernen); } .lern-karte.art-faellig { border-top-color: var(--z-faellig); }
.karte-inhalt { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.karte-inhalt img { max-width: 100%; height: auto; }
.karte-inhalt hr { border: 0; border-top: 2px solid var(--accent); margin: 18px 0; }
.karte-inhalt .frage { font-weight: 700; }
.karte-inhalt .cloze { font-weight: 700; color: var(--accent); }
.karte-inhalt mark { background: var(--treffer); color: inherit; padding: 0 1px; border-radius: 2px; }
.karte-inhalt ul, .karte-inhalt ol { margin: 4px 0; padding-left: 26px; }
.karte-inhalt .fundstelle { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.karte-inhalt table { border-collapse: collapse; } .karte-inhalt td, .karte-inhalt th { border: 1px solid var(--border); padding: 4px 8px; }
.lern-fuss { position: sticky; bottom: 0; display: flex; justify-content: center; padding: 12px clamp(12px, 3vw, 28px) calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--border); }
.lern-fuss:empty { display: none; }
.aufdecken { min-width: min(360px, 100%); min-height: 52px; font-size: 16px; gap: 12px; }
.lern-fuss kbd, .bewerten kbd { font: inherit; font-size: 11px; opacity: .7; border: 1px solid currentColor; border-radius: 3px; padding: 0 5px; }
.bewerten { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 760px; }
.bewerten-knopf { flex-direction: column; gap: 2px; min-height: 64px; padding: 6px 4px; border-width: 2px; }
.bewerten-knopf small { font-size: 12px; font-weight: 600; opacity: .85; }
.bewerten-knopf span { font-size: 15px; }
.k-nochmal { border-color: var(--danger); color: var(--danger); }
.k-schwer { border-color: var(--border-strong); }
.k-gut { border-color: var(--z-faellig); color: var(--z-faellig); }
.k-einfach { border-color: var(--z-neu); color: var(--z-neu); }
.bewerten-knopf:hover, .bewerten-knopf:focus-visible { background: var(--surface-2); }
.k-gut:focus-visible { outline: 3px solid color-mix(in srgb, var(--z-faellig) 40%, transparent); }
.lern-fertig { align-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; max-width: 480px; }
.lern-fertig h2 { margin: 0; font-size: 24px; }
@media (max-width: 860px) {
  .stapel-zeile { grid-template-columns: minmax(0, 1fr) auto 32px; row-gap: 6px; }
  .stapel-karten { display: none; }
  .stapel-los { grid-column: 2; grid-row: 1; }
  .stapel-bearbeiten { grid-column: 3; grid-row: 1; }
  .stapel-zeile .lern-zaehler { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .stapel-kopf .legende { margin-right: 0; }
  .lern-zurueck .btn-text { display: none; }
  .lern-kopf { gap: 10px; }
  .bewerten { gap: 6px; } .bewerten kbd, .lern-fuss kbd { display: none; }
}

/* ── Tagesbrief ──────────────────────────────────────────────────────────── */
.fund-m { color: var(--ink-2); background: var(--surface-2); border-color: var(--border); font-weight: 600; }
.neu-punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: auto; flex: none; }
.brief-hinweis { text-decoration: none; align-items: center; }
.brief-hinweis .brief-lesen { margin-left: auto; font-weight: 700; color: var(--accent); white-space: nowrap; }
.brief-hinweis:hover { filter: brightness(.98); }
.brief-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.brief { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius);
  padding: clamp(18px, 4vw, 40px); max-width: 820px; }
.brief-kicker { display: flex; align-items: center; gap: 7px; margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent); }
.brief-kicker span:last-child { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.brief-kopf h1 { margin: 0 0 6px; font-size: clamp(22px, 3vw, 28px); line-height: 1.25; letter-spacing: -.01em; }
.brief-kopf p.muted { margin: 0 0 18px; font-size: 13px; }
.brief-text h3 { padding-top: 10px; border-top: 1px solid var(--border); }
.brief-text h3:first-child { border-top: 0; padding-top: 0; }
.brief-meldungen { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 13.5px; }
.brief-meldungen summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.brief-meldungen h3 { font-size: 13px; margin: 12px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.brief-meldungen ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 3px; }
.brief-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; }
.brief-archiv { position: sticky; top: calc(var(--kopf-h) + 12px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - var(--kopf-h) - 40px); overflow-y: auto; }
.brief-archiv h2 { margin: 6px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.brief-archiv ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.brief-archiv li a { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; border-left: 3px solid transparent; }
.brief-archiv li a:hover { background: var(--surface-2); }
.brief-archiv li a[aria-current="page"] { background: var(--accent-soft); border-left-color: var(--accent); color: var(--ink); }
.brief-archiv li a.ungelesen .r-titel { font-weight: 700; color: var(--ink); }
.quellen-status li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.punkt { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--border-strong); }
.punkt.ok { background: var(--z-faellig, #15803D); } .punkt.fehler { background: var(--danger); }
.brief-einst-knopf { margin-top: 6px; }
.themen-wahl { display: flex; flex-direction: column; gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check input[type="time"] { min-height: 34px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); font: inherit; background: var(--surface); color: var(--ink); }
.quellen-bearbeiten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.quellen-bearbeiten li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.quellen-bearbeiten .q-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quellen-bearbeiten .icon-btn { width: 28px; height: 28px; }
.quelle-neu { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 6px; }
.quelle-neu input { min-height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); font: inherit; background: var(--surface); color: var(--ink); max-width: none; }
@media (max-width: 979px) {
  .brief-layout { grid-template-columns: minmax(0, 1fr); }
  .brief-archiv { position: static; max-height: none; }
  .quelle-neu { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .brief-seite { padding-left: 0; padding-right: 0; }
  .brief-seite > .brotkrumen { padding: 0 16px; }
  .brief { border-radius: 0; border-left: 0; border-right: 0; }
  .brief-archiv { border-radius: 0; border-left: 0; border-right: 0; }
}

/* ── Karten-Editor (Fett, Listen, Hervorhebung, Lücken) ─────────────────── */
.karte-feld { display: flex; flex-direction: column; gap: 5px; }
.karte-feld-titel { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.editor { border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); color: var(--ink); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.editor-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 4px 6px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-s) var(--radius-s) 0 0; }
.editor-leiste .icon-btn { width: 32px; height: 32px; border-radius: 3px; color: var(--ink-2); }
.editor-leiste .icon-btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.editor-leiste .trenner { width: 1px; height: 20px; background: var(--border-strong); margin: 0 5px; }
.editor-leiste .btn { min-height: 30px; padding: 0 10px; font-size: 13px; }
.editor-leiste .glyph { font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1; }
.editor-link { display: flex; gap: 6px; width: 100%; padding: 4px 0 2px; }
.editor-link input { flex: 1; min-height: 32px; }
.editor-feld { min-height: 112px; max-height: 46vh; overflow-y: auto; padding: 10px 12px; font-size: 15px; line-height: 1.5; outline: none; overflow-wrap: anywhere; cursor: text; }
.editor-feld.leer::before { content: attr(data-platzhalter); color: var(--muted); pointer-events: none; }
.editor-feld p, .editor-feld div { margin: 0; }
.editor-feld ul, .editor-feld ol, .karte-vorschau.html ul, .karte-vorschau.html ol { margin: 4px 0; padding-left: 26px; }
.editor-feld mark, .karte-vorschau.html mark { background: var(--treffer); color: inherit; padding: 0 1px; border-radius: 2px; }
.editor-feld blockquote { margin: 4px 0; padding-left: 10px; border-left: 3px solid var(--border-strong); color: var(--ink-2); }
.editor-feld table { border-collapse: collapse; } .editor-feld td, .editor-feld th { border: 1px solid var(--border); padding: 3px 7px; }
.editor-feld a { color: var(--link); }
.editor-feld h1, .editor-feld h2, .editor-feld h3, .editor-feld h4 { margin: 6px 0 2px; font-size: 1.05em; }
.karte-vorschau.html { white-space: normal; }
@media (max-width: 560px) {
  .editor-leiste .icon-btn { width: 30px; height: 30px; }
  .editor-feld { font-size: 16px; }        /* unter 16 px zoomt iOS beim Tippen hinein */
  .karten-zeile { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .karten-knoepfe { grid-column: 1 / -1; justify-content: flex-end; }
  .modal-actions { flex-wrap: wrap; padding: 12px 14px 14px; }      /* drei Knöpfe passen sonst nicht nebeneinander */
}
