/* WZ-733 S1 — „Funktionen": Themen-Übersicht + Themenseiten. Themenfarben kommen aus themen.js (feste Farbe je Thema). */
/* WZ-757: das feste TESTBETRIEB-/Sperr-Banner (z-index 99998, Hoehe als --kf-banner-h gemessen) liegt UEBER dieser Ebene — sie beginnt darunter, sonst verschwinden Kopfzeile und Status-Chips dahinter. */
.kf-themen { position: fixed; inset: var(--kf-banner-h, 0px) 0 0 0; z-index: 10002; display: none; align-items: stretch; justify-content: center; background: rgba(0, 0, 0, .55); }
.kf-themen__panel { width: 100%; max-width: 980px; height: 100%; overflow-y: auto; background: var(--bg-secondary, #1e293b); color: var(--text-primary, #f1f5f9); padding: 12px 16px 24px; box-sizing: border-box; -webkit-overflow-scrolling: touch; }
.kf-themen__kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; font-size: 1.15rem; font-weight: 700; position: sticky; top: 0; background: inherit; z-index: 1; }
.kf-themen__titel { display: flex; flex-direction: column; }
.kf-themen__wer { font-size: 12px; font-weight: 400; opacity: .75; }
.kf-themen__zu, .kf-themen__zurueck { min-height: 48px; min-width: 48px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.kf-themen__zurueck { font-size: 1rem; font-weight: 600; padding: 0 8px; }
.kf-themen__raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
@media (min-width: 640px) { .kf-themen__raster { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .kf-themen__raster { grid-template-columns: repeat(4, 1fr); } }
.kf-themen__karte { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-height: 96px; padding: 12px; border: 0; border-radius: 14px; color: #fff; text-align: left; cursor: pointer; font: inherit; }
.kf-themen__karte-icon { font-size: 1.5rem; line-height: 1; }
.kf-themen__karte-titel, .kf-themen__band-titel { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.kf-themen__karte-zahl { font-size: 12px; opacity: .85; }
.kf-themen__band { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; color: #fff; margin: 8px 0 4px; }
.kf-themen__block { margin-top: 14px; }
.kf-themen__h { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.kf-themen__zeile, .kf-themen__verweis { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 48px; padding: 8px 12px; margin-bottom: 6px; border: 1px solid var(--glass-border, rgba(148, 163, 184, .35)); border-radius: 10px; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.kf-themen__verweis { border-left-width: 6px; }
.kf-themen__zeile-titel { font-weight: 600; }
.kf-themen__zeile-hinweis { font-size: 12px; opacity: .75; }
.kf-themen__build { margin-top: 18px; font: 11px/1.2 monospace; opacity: .5; text-align: center; padding: 10px; user-select: none; }

/* ── S2: Kopf mit Status-Chips, Suche, Spalten, große Schirme ───────────────────────────────────────────── */
.kf-themen__h1 { font-size: 1.25rem; }
.kf-themen__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; justify-content: flex-end; }
/* WZ-757: schmale Handys (360–412 px): Titel + ✕ in der ersten Zeile, die Status-Chips darunter ueber die volle Breite — nichts wird abgeschnitten. */
@media (max-width: 480px) {
  .kf-themen__kopf { flex-wrap: wrap; }
  .kf-themen__chips { order: 3; flex: 1 1 100%; justify-content: flex-start; }
}
.kf-themen__chip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.kf-themen__chip--ok { background: rgba(22, 163, 74, .15); color: #15803d; border-color: rgba(22, 163, 74, .4); }
.kf-themen__chip--warn { background: rgba(220, 38, 38, .12); color: #b91c1c; border-color: rgba(220, 38, 38, .4); }
.kf-themen__suche { margin: 4px 0 8px; }
.kf-themen__suchfeld { width: 100%; min-height: 48px; padding: 0 14px; box-sizing: border-box; font: inherit; font-size: 1rem; border: 1px solid var(--glass-border, rgba(148, 163, 184, .5)); border-radius: 12px; background: transparent; color: inherit; }
.kf-themen__leer { margin: 4px 0; font-size: 13px; opacity: .65; }
.kf-themen__treffer-zeile { border-left-width: 6px; }
.kf-themen__zurueck { white-space: nowrap; width: auto; min-width: 48px; padding: 0 14px; overflow: visible; flex: none; }
.kf-themen__titel { min-width: 0; }
/* Themenseite: auf dem Handgerät untereinander, auf großen Schirmen drei Spalten */
.kf-themen__spalten { display: block; }
@media (min-width: 1200px) {
  .kf-themen__panel { max-width: none; display: flex; flex-direction: column; padding: 16px 32px 24px; }
  .kf-themen__inhalt { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .kf-themen__raster { flex: 1; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 16px; }
  .kf-themen__karte { min-height: 0; padding: 20px; border-radius: 18px; justify-content: center; gap: 10px; }
  .kf-themen__karte-icon { font-size: 40px; }
  .kf-themen__karte-titel { font-size: 24px; }
  .kf-themen__karte-zahl { font-size: 16px; }
  .kf-themen__spalten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; margin-top: 8px; }
  .kf-themen__band-titel { font-size: 1.6rem; }
  .kf-themen__zeile, .kf-themen__verweis { min-height: 64px; justify-content: center; }
  .kf-themen__zeile-titel { font-size: 18px; }
  .kf-themen__zeile-hinweis { font-size: 15px; }
  .kf-themen__treffer { max-width: 900px; }
}

/* ── WZ-733 S3c: die Themenseite spricht dieselbe Bildsprache wie die Übersicht (Betreiber 07.10.2026: „Die Untermenüs sollen optisch so ordentlich und sauber aufgebaut werden wie das Hauptmenü“) ──
   „Jetzt tun" = KACHELN gefüllt in der Themenfarbe · „Einstellungen" = KACHELN in heller Tönung mit farbigem Rand (Zahnrad) · „Hängt zusammen mit" = KACHELN in der Farbe des ZIELthemas, mit Ziel-Icon und Pfeil.
   Maße wie die Übersichtskarten: Mindesthöhe 96 px, Radius 14 px (große Schirme 18 px), Abstand 10 px, kein Schatten (die Karten haben auch keinen). Die Farbe kommt je Kachel aus --kf-kachel-farbe (themen.js). */
.kf-themen__kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .kf-themen__kacheln { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .kf-themen__kacheln { grid-template-columns: repeat(4, 1fr); } }
.kf-themen .kf-themen__kachel { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; width: auto; min-width: 0; min-height: 96px; margin: 0; padding: 12px; box-sizing: border-box; border: 2px solid var(--kf-kachel-farbe); border-radius: 14px; text-align: left; cursor: pointer; font: inherit; }
/* Der Hellmodus-Rand für Bedienelemente (light-mode-kontrast.css: html.kf-light button, Spezifität 0,2,2) darf den Kachelrand NICHT überschreiben — die Kachel trägt ihre Farbe selbst. */
html.kf-light .kf-themen .kf-themen__kachel { border: 2px solid var(--kf-kachel-farbe); }
.kf-themen__kachel-icon { font-size: 1.5rem; line-height: 1; }
.kf-themen__kachel-pfeil { position: absolute; top: 10px; right: 12px; font-size: 1.25rem; font-weight: 700; line-height: 1; }
.kf-themen__kachel .kf-themen__zeile-titel { font-size: 1rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.kf-themen__kachel .kf-themen__zeile-hinweis { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.25; opacity: 1; }
.kf-themen__kachel--aktion, .kf-themen__kachel--verweis { background: var(--kf-kachel-farbe); color: #fff; }
.kf-themen__kachel--aktion .kf-themen__zeile-hinweis, .kf-themen__kachel--verweis .kf-themen__zeile-hinweis { color: rgba(255, 255, 255, .92); }
.kf-themen__kachel--einstellung { background: var(--kf-kachel-dunkel); color: #f1f5f9; } /* DUNKELMODUS: dunkle Tönung der Themenfarbe (gesetzt in themen.js; kein color-mix — die alte WebView des V2 Pro kennt es nicht) */
.kf-themen__kachel--einstellung .kf-themen__zeile-hinweis { color: #cbd5e1; }
html.kf-light .kf-themen__kachel--einstellung { background: var(--kf-kachel-hell); color: #0f172a; } /* HELLMODUS: wie bisher die helle Tönung */
html.kf-light .kf-themen__kachel--einstellung .kf-themen__zeile-hinweis { color: #334155; }
.kf-themen__kachel:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.kf-themen__kachel--einstellung:focus-visible { outline-color: #fff; }
html.kf-light .kf-themen__kachel--einstellung:focus-visible { outline-color: var(--kf-kachel-farbe); }
.kf-themen__spalten { display: block; }
@media (min-width: 1200px) {
  .kf-themen__spalten { display: block; }
  .kf-themen__kacheln { gap: 16px; }
  .kf-themen .kf-themen__kachel { min-height: 120px; padding: 16px; border-radius: 18px; }
  .kf-themen__kachel-icon { font-size: 32px; }
  .kf-themen__kachel .kf-themen__zeile-titel { font-size: 20px; }
  .kf-themen__kachel .kf-themen__zeile-hinweis { font-size: 15px; }
}
