/* ════════════════════════════════════════════════════════════════════════════
   HARAMAIN COMPANION — fiqh-qa-v2.css  v1.2  (12.05.2026)
   ────────────────────────────────────────────────────────────────────────────
   Phase 1: CSS-Skeleton (Modal + Header + Suchbox + Filter-Pillen)
   Phase 2: Listen-Ansicht (Stats + Akkordeons + Frage-Karten + Bookmarks)
   Phase 3: Such-Styling
     • Search-Active-State (Suchbox + .is-searching auf #hcfq-app)
     • Treffer-Header "X Treffer für 'xyz'" + Reset-Link
     • Flache Trefferliste (Stats + Kategorien werden ausgeblendet)
     • Kategorie- und Gender-Badge in Trefferkarten
     • Highlight-Klasse (.hcfq-hl) für Suchbegriffe im Text
     • Tag-Match-Highlight (.hcfq-q-tag.is-match)
     • Erweiterter Empty-State (Title + Hint)
   ────────────────────────────────────────────────────────────────────────────
   Prefix: hcfq- (HC Fiqh-Questions)
   Quelle: Manāsik al-Hajj wa'l-Umrah · al-ʿUthaymīn رحمه الله
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── DESIGN-TOKENS (CSS-Variablen, später für Heller Modus override-bar) ──── */

#hcfq-app {
  --hcfq-bg:           #0a1814;
  --hcfq-bg-grad-1:    #0d2419;
  --hcfq-bg-grad-2:    #0a1814;
  --hcfq-bg-radial:    rgba(20, 148, 106, 0.15);

  --hcfq-text:         #ffffff;
  --hcfq-text-mut:     rgba(255, 255, 255, 0.65);
  --hcfq-text-dim:     rgba(255, 255, 255, 0.5);
  --hcfq-text-faint:   rgba(255, 255, 255, 0.4);

  --hcfq-surface:      rgba(255, 255, 255, 0.04);
  --hcfq-surface-hi:   rgba(255, 255, 255, 0.07);
  --hcfq-border:       rgba(255, 255, 255, 0.1);
  --hcfq-border-soft:  rgba(255, 255, 255, 0.15);

  --hcfq-gold:         #d4a843;
  --hcfq-gold-soft:    rgba(212, 168, 67, 0.12);
  --hcfq-gold-bg:      rgba(212, 168, 67, 0.08);
  --hcfq-gold-border:  rgba(212, 168, 67, 0.25);

  --hcfq-teal:         #14946a;
  --hcfq-teal-soft:    rgba(20, 148, 106, 0.15);
  --hcfq-teal-border:  rgba(20, 148, 106, 0.25);
  --hcfq-teal-light:   #2dd4bf;

  /* Filter-Pillen-Farben */
  --hcfq-pill-all:     #10b981;   /* Smaragd */
  --hcfq-pill-women:   #f472b6;   /* Rosa */
  --hcfq-pill-men:     #60a5fa;   /* Blau */
  --hcfq-pill-fav:     #d4a843;   /* Gold */

  --hcfq-radius:       12px;
  --hcfq-radius-sm:    9px;
  --hcfq-radius-pill:  10px;

  --hcfq-fs-s:         12px;
  --hcfq-fs-m:         13px;
  --hcfq-fs-l:         15px;

  --hcfq-z-modal:      9000;
}

/* ─── 1. MODAL-CONTAINER ─────────────────────────────────────────────────── */

/* Fullscreen-Overlay — versteckt initial, zeigt mit .is-open */
#hcfq-app {
  position: fixed;
  inset: 0;
  z-index: var(--hcfq-z-modal);
  background: var(--hcfq-bg);
  background-image:
    radial-gradient(ellipse at 50% 100%, var(--hcfq-bg-radial) 0%, transparent 60%),
    linear-gradient(180deg, var(--hcfq-bg) 0%, var(--hcfq-bg-grad-1) 50%, var(--hcfq-bg-grad-2) 100%);
  color: var(--hcfq-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}

#hcfq-app.is-open {
  display: flex;
}

/* Body-Scroll-Lock wenn Modul offen */
body.hc-fiqh-open {
  overflow: hidden;
}

/* ─── 2. HEADER ──────────────────────────────────────────────────────────── */

.hcfq-hdr {
  padding: 14px 14px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--hcfq-border);
  background: var(--hcfq-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.hcfq-hdr-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--hcfq-radius-pill);
  background: var(--hcfq-teal-soft);
  border: 1px solid var(--hcfq-teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--hcfq-teal-light);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms, border-color 150ms;
  font-family: inherit;
  padding: 0;
  line-height: 1;
}

.hcfq-hdr-btn:hover,
.hcfq-hdr-btn:focus-visible {
  background: rgba(20, 148, 106, 0.25);
  outline: none;
}

.hcfq-hdr-btn:active {
  transform: scale(0.95);
}

.hcfq-hdr-mid {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.hcfq-hdr-eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--hcfq-teal-light);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.hcfq-hdr-title {
  font-size: 14px;
  color: var(--hcfq-text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── 3. SUCHBOX ─────────────────────────────────────────────────────────── */

.hcfq-search-box {
  margin: 10px 14px 0;
  position: relative;
  flex-shrink: 0;
}

.hcfq-search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--hcfq-border-soft);
  border-radius: 13px;
  color: var(--hcfq-text);
  font-size: var(--hcfq-fs-m);
  font-family: inherit;
  transition: border-color 150ms, background 150ms;
  -webkit-appearance: none;
  appearance: none;
}

.hcfq-search-input::placeholder {
  color: var(--hcfq-text-faint);
}

.hcfq-search-input:focus {
  outline: none;
  border-color: var(--hcfq-gold);
  background: var(--hcfq-gold-bg);
}

.hcfq-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hcfq-text-dim);
  font-size: 14px;
  pointer-events: none;
}

/* Clear-Button (×) wenn Input befüllt — wird via JS .has-text gesetzt */
.hcfq-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--hcfq-text-mut);
  font-size: 14px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
  padding: 0;
}

.hcfq-search-box.has-text .hcfq-search-clear {
  display: flex;
}

.hcfq-search-clear:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--hcfq-text);
}

/* ─── 4. FILTER-STRIP — 4 PILLEN (Alle · Frauen · Männer · Favorit) ──────── */

.hcfq-filter-strip {
  margin: 10px 14px 0;
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.hcfq-filter-pill {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  background: var(--hcfq-surface);
  border: 1.5px solid var(--hcfq-border);
  border-radius: var(--hcfq-radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--hcfq-text-mut);
  cursor: pointer;
  transition: background 180ms, border-color 180ms, color 180ms, transform 100ms;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-filter-pill:hover {
  background: var(--hcfq-surface-hi);
}

.hcfq-filter-pill:active {
  transform: scale(0.96);
}

.hcfq-filter-pill-icon {
  font-size: 14px;
  line-height: 1;
}

.hcfq-filter-pill-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hcfq-filter-pill-count {
  font-size: 9px;
  opacity: 0.7;
  font-weight: 600;
  line-height: 1;
}

/* Aktive Pille — 4 Farb-Varianten via Modifier-Klassen */
.hcfq-filter-pill.is-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border-color: var(--hcfq-pill-all);
  color: var(--hcfq-pill-all);
}

.hcfq-filter-pill.is-active.hcfq-filter-pill--women {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.2), rgba(244, 114, 182, 0.05));
  border-color: var(--hcfq-pill-women);
  color: var(--hcfq-pill-women);
}

.hcfq-filter-pill.is-active.hcfq-filter-pill--men {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(96, 165, 250, 0.05));
  border-color: var(--hcfq-pill-men);
  color: var(--hcfq-pill-men);
}

.hcfq-filter-pill.is-active.hcfq-filter-pill--bookmarks {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.05));
  border-color: var(--hcfq-pill-fav);
  color: var(--hcfq-pill-fav);
}

/* Counter-Badge wird heller wenn Pille aktiv */
.hcfq-filter-pill.is-active .hcfq-filter-pill-count {
  opacity: 1;
}

/* ─── 5. CONTENT-AREA (Container für Phase 2+) ──────────────────────────── */

.hcfq-content {
  flex: 1;
  padding: 0 0 60px;
  min-height: 0;
}

/* Section-Title (z.B. "19 KATEGORIEN") */
.hcfq-section-title {
  font-size: 11px;
  color: var(--hcfq-text-dim);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 14px 14px 8px;
  padding-left: 2px;
}

/* ─── 6. STATS-STRIP (3 Cards: 90 Fragen · 19 Kategorien · 3 Sprachen) ──── */

.hcfq-stats-strip {
  margin: 10px 14px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  flex-shrink: 0;
}

.hcfq-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--hcfq-radius-pill);
  padding: 8px 6px;
  text-align: center;
}

.hcfq-stat-num {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

/* Farb-Modifier — zur Klassen-Kombination an .hcfq-stat-num */
.hcfq-stat-num--gold  { color: var(--hcfq-gold); }
.hcfq-stat-num--teal  { color: var(--hcfq-teal-light); }
.hcfq-stat-num--green { color: var(--hcfq-pill-all); }

.hcfq-stat-label {
  font-size: 9px;
  color: var(--hcfq-text-dim);
  letter-spacing: 0.5px;
  margin-top: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ─── 7. KATEGORIEN-LISTE — Akkordeons ───────────────────────────────────── */

.hcfq-categories {
  margin: 14px 14px 0;
}

.hcfq-cat {
  background: var(--hcfq-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--hcfq-radius);
  margin-bottom: 7px;
  overflow: hidden;
  transition: background 200ms, border-color 200ms;
}

.hcfq-cat-head {
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-cat-head:focus-visible {
  outline: 2px solid var(--hcfq-gold);
  outline-offset: -2px;
  border-radius: var(--hcfq-radius);
}

.hcfq-cat-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.hcfq-cat-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--hcfq-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcfq-cat-count {
  background: var(--hcfq-gold-soft);
  color: var(--hcfq-gold);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  min-width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.hcfq-cat-chevron {
  color: var(--hcfq-text-faint);
  font-size: 11px;
  transition: transform 200ms;
  flex-shrink: 0;
}

/* Expanded-State: goldener Glow + Chevron rotiert */
.hcfq-cat.is-expanded {
  background: rgba(212, 168, 67, 0.04);
  border-color: var(--hcfq-gold-border);
}

.hcfq-cat.is-expanded .hcfq-cat-chevron {
  transform: rotate(180deg);
}

/* ─── 8. FRAGE-LISTE innerhalb Kategorie ─────────────────────────────────── */

.hcfq-q-list {
  display: none;
  padding: 0 11px 11px;
}

.hcfq-cat.is-expanded .hcfq-q-list {
  display: block;
}

/* Einzelne Frage-Karte */
.hcfq-q-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--hcfq-radius-pill);
  padding: 10px 11px;
  margin-top: 7px;
  cursor: pointer;
  transition: background 180ms, border-color 180ms;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-q-card:hover {
  border-color: rgba(212, 168, 67, 0.3);
  background: rgba(212, 168, 67, 0.05);
}

.hcfq-q-card:active {
  transform: scale(0.99);
}

.hcfq-q-card:focus-visible {
  outline: 2px solid var(--hcfq-gold);
  outline-offset: -1px;
}

/* Meta-Zeile: FQ-Nummer + Seite */
.hcfq-q-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.hcfq-q-num {
  background: rgba(212, 168, 67, 0.15);
  color: var(--hcfq-gold);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}

.hcfq-q-page {
  font-size: 9px;
  color: var(--hcfq-text-dim);
  font-weight: 500;
}

.hcfq-q-gender {
  font-size: 10px;
  margin-left: auto;
  margin-right: 24px;
  opacity: 0.7;
}

.hcfq-q-gender--women { color: var(--hcfq-pill-women); }
.hcfq-q-gender--men   { color: var(--hcfq-pill-men); }

/* Frage-Text (gekürzt mit ellipsis nach ~2 Zeilen) */
.hcfq-q-text {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin-bottom: 6px;
  padding-right: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags-Zeile */
.hcfq-q-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.hcfq-q-tag {
  font-size: 9px;
  color: var(--hcfq-text-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── 9. BOOKMARK-ICON (oben rechts in jeder Karte) ──────────────────────── */

.hcfq-bookmark {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  border-radius: 6px;
  background: transparent;
  border: none;
  transition: color 150ms, background 150ms, transform 100ms;
  font-family: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-bookmark:hover {
  color: rgba(212, 168, 67, 0.6);
  background: rgba(212, 168, 67, 0.05);
}

.hcfq-bookmark.is-active {
  color: var(--hcfq-gold);
}

.hcfq-bookmark.is-active:hover {
  color: #f0c060;
  background: rgba(212, 168, 67, 0.1);
}

.hcfq-bookmark:active {
  transform: scale(0.85);
}

.hcfq-bookmark:focus-visible {
  outline: 2px solid var(--hcfq-gold);
  outline-offset: 1px;
}

/* ─── 10. EMPTY-STATE (für später Phase 3+4 Filter/Search ohne Ergebnis) ── */

.hcfq-empty {
  margin: 30px 14px;
  padding: 30px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--hcfq-radius);
  text-align: center;
  color: var(--hcfq-text-dim);
  font-size: 13px;
  line-height: 1.6;
}

.hcfq-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.4;
}

.hcfq-empty-title {
  color: var(--hcfq-text);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}

.hcfq-empty-hint {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 8px;
}

/* ─── 11. SEARCH-ACTIVE-STATE + HIGHLIGHT (Phase 3) ──────────────────────── */

/* Suchbox: goldener Border wenn Input befüllt — nicht nur bei :focus */
.hcfq-search-box.has-text .hcfq-search-input {
  border-color: var(--hcfq-gold);
  background: var(--hcfq-gold-bg);
}

.hcfq-search-box.has-text .hcfq-search-icon {
  color: var(--hcfq-gold);
}

/* Wenn #hcfq-app im Such-Modus ist: Stats + Kategorien-Akkordeons verstecken,
   stattdessen Flach-Liste der Treffer anzeigen. */
#hcfq-app.is-searching .hcfq-stats-strip,
#hcfq-app.is-searching .hcfq-section-title,
#hcfq-app.is-searching .hcfq-cat {
  display: none;
}

/* Treffer-Header unter den Pillen — "X Treffer für 'tawaf'" */
.hcfq-results-header {
  margin: 14px 14px 10px;
  display: none;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--hcfq-text-dim);
  padding-left: 2px;
}

#hcfq-app.is-searching .hcfq-results-header {
  display: flex;
}

.hcfq-results-count {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hcfq-results-reset {
  background: transparent;
  border: none;
  color: var(--hcfq-gold);
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-results-reset:hover {
  background: rgba(212, 168, 67, 0.08);
}

/* Such-Ergebnis-Container — flache Liste aller Treffer-Karten */
.hcfq-results-list {
  display: none;
  margin: 0 14px;
}

#hcfq-app.is-searching .hcfq-results-list {
  display: block;
}

/* Frage-Karten im Such-Modus: minimal andere Optik (etwas dunkler Background
   damit sie sich von der Kategorien-Liste unterscheiden) */
.hcfq-results-list .hcfq-q-card {
  background: rgba(0, 0, 0, 0.3);
  margin-top: 0;
  margin-bottom: 7px;
}

/* Kategorie-Badge in der Frage-Karte (nur im Such-Modus sichtbar — zeigt
   user welche Kategorie die Frage gehört) */
.hcfq-q-cat-badge {
  background: rgba(20, 148, 106, 0.12);
  color: var(--hcfq-teal-light);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Gender-Badge in der Frage-Karte (für ♀/♂ Markierung) */
.hcfq-q-meta .hcfq-q-gender-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hcfq-q-gender-badge--women {
  background: rgba(244, 114, 182, 0.12);
  color: var(--hcfq-pill-women);
}

.hcfq-q-gender-badge--men {
  background: rgba(96, 165, 250, 0.12);
  color: var(--hcfq-pill-men);
}

/* HIGHLIGHT — Markierung des Suchbegriffs in Frage-Text */
.hcfq-hl {
  background: rgba(212, 168, 67, 0.3);
  color: #fbe096;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 700;
}

/* Tag-Highlight wenn Suchbegriff exakt einem Tag entspricht */
.hcfq-q-tag.is-match {
  background: rgba(212, 168, 67, 0.18);
  color: #fbe096;
  font-weight: 700;
}

.hcfq-q-tag.is-match::before {
  content: '';
}

/* ─── 12. QUELLEN-BANNER (ganz unten unter den Kategorien) ───────────────── */

.hcfq-source {
  margin: 20px 14px 30px;
  padding: 14px;
  background: rgba(212, 168, 67, 0.04);
  border: 1px solid var(--hcfq-gold-border);
  border-radius: var(--hcfq-radius);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

/* Im Such-Modus verstecken (Platz für Treffer) */
#hcfq-app.is-searching .hcfq-source {
  display: none;
}

.hcfq-source-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.hcfq-source-body {
  flex: 1;
  min-width: 0;
}

.hcfq-source-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--hcfq-gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.hcfq-source-title {
  font-size: 13px;
  color: var(--hcfq-gold);
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.hcfq-source-author {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 3px;
}

.hcfq-source-meta {
  font-size: 10px;
  color: var(--hcfq-text-dim);
  line-height: 1.5;
}

/* ─── 13. SETTINGS-SHEET (Phase 7) ───────────────────────────────────────── */

.hcfq-sheet {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: hcfq-fade-in 200ms ease-out;
}

.hcfq-sheet.is-open {
  display: flex;
}

@keyframes hcfq-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hcfq-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.hcfq-sheet-panel {
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  background: linear-gradient(180deg, #0d2419 0%, #0a1814 100%);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--hcfq-gold-border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  animation: hcfq-slide-up 250ms cubic-bezier(0.32, 0.72, 0.0, 1.0);
  overflow: hidden;
}

.hcfq-sheet-head {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--hcfq-border);
  flex-shrink: 0;
}

.hcfq-sheet-title {
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--hcfq-gold);
  letter-spacing: 0.3px;
}

.hcfq-sheet-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--hcfq-text);
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.hcfq-sheet-close:hover { background: rgba(255, 255, 255, 0.15); }

.hcfq-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 24px;
}

/* Sektion-Karte im Settings-Sheet */
.hcfq-stg-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--hcfq-radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.hcfq-stg-section-title {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--hcfq-gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hcfq-stg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  gap: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-stg-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hcfq-stg-row-label {
  font-size: 13px;
  color: var(--hcfq-text);
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.hcfq-stg-row-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* Toggle-Switch */
.hcfq-toggle {
  width: 36px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  position: relative;
  transition: background 180ms;
  flex-shrink: 0;
}

.hcfq-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 180ms, background 180ms;
}

.hcfq-toggle.is-on {
  background: var(--hcfq-gold);
}

.hcfq-toggle.is-on::after {
  transform: translateX(16px);
  background: #1a1410;
}

/* Size-Picker (S/M/L) */
.hcfq-size-picker {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.hcfq-size-btn {
  width: 30px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  color: var(--hcfq-text-mut);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.hcfq-size-btn.is-active {
  background: var(--hcfq-gold-soft);
  border-color: var(--hcfq-gold);
  color: var(--hcfq-gold);
}

/* Sprach-Picker (kompakter Selector) */
.hcfq-stg-select {
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--hcfq-text);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
}

/* Schließen-Button am Ende */
.hcfq-sheet-done {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  color: var(--hcfq-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
}

.hcfq-sheet-done:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ─── 14. LIGHT-MODE ─────────────────────────────────────────────────────── */

#hcfq-app.is-light {
  --hcfq-bg:           #f7f3e9;
  --hcfq-bg-grad-1:    #faf7ed;
  --hcfq-bg-grad-2:    #f7f3e9;
  --hcfq-bg-radial:    rgba(212, 168, 67, 0.08);

  --hcfq-text:         #1a1410;
  --hcfq-text-mut:     rgba(0, 0, 0, 0.65);
  --hcfq-text-dim:     rgba(0, 0, 0, 0.5);
  --hcfq-text-faint:   rgba(0, 0, 0, 0.4);

  --hcfq-surface:      rgba(0, 0, 0, 0.04);
  --hcfq-surface-hi:   rgba(0, 0, 0, 0.07);
  --hcfq-border:       rgba(0, 0, 0, 0.1);
  --hcfq-border-soft:  rgba(0, 0, 0, 0.15);

  --hcfq-teal:         #0d6e54;
  --hcfq-teal-light:   #0d6e54;
  --hcfq-teal-soft:    rgba(13, 110, 84, 0.12);
  --hcfq-teal-border:  rgba(13, 110, 84, 0.25);
}

/* Light-Mode-spezifische Anpassungen für Cards die transparent-weiße Farbtöne brauchen */
#hcfq-app.is-light .hcfq-search-input {
  background: rgba(255, 255, 255, 0.7);
  color: var(--hcfq-text);
}
#hcfq-app.is-light .hcfq-stat-card,
#hcfq-app.is-light .hcfq-cat,
#hcfq-app.is-light .hcfq-q-card,
#hcfq-app.is-light .hcfq-filter-pill,
#hcfq-app.is-light .hcfq-stg-section {
  background: rgba(255, 255, 255, 0.6);
}
#hcfq-app.is-light .hcfq-q-card {
  background: rgba(255, 255, 255, 0.55);
}
#hcfq-app.is-light .hcfq-cat.is-expanded {
  background: rgba(212, 168, 67, 0.1);
}
#hcfq-app.is-light .hcfq-q-tag {
  background: rgba(0, 0, 0, 0.05);
}

/* ─── 15. FONT-SIZE-KLASSEN ──────────────────────────────────────────────── */

#hcfq-app.is-size-s .hcfq-q-text  { font-size: 10.5px; }
#hcfq-app.is-size-s .hcfq-cat-name { font-size: 12px; }

#hcfq-app.is-size-l .hcfq-q-text  { font-size: 13.5px; }
#hcfq-app.is-size-l .hcfq-cat-name { font-size: 15px; }
#hcfq-app.is-size-l .hcfq-q-num,
#hcfq-app.is-size-l .hcfq-q-page,
#hcfq-app.is-size-l .hcfq-q-tag   { font-size: 10.5px; }

/* ─── 16. DETAIL-ANSICHT (Phase 5) ───────────────────────────────────────── */

/* In Detail-Modus: alle Listen-Elemente verbergen */
#hcfq-app.is-detail .hcfq-search-box,
#hcfq-app.is-detail .hcfq-filter-strip,
#hcfq-app.is-detail .hcfq-stats-strip,
#hcfq-app.is-detail .hcfq-results-header,
#hcfq-app.is-detail .hcfq-results-list,
#hcfq-app.is-detail .hcfq-content,
#hcfq-app.is-detail .hcfq-source {
  display: none;
}

.hcfq-detail {
  display: none;
  padding: 0 0 30px;
}

#hcfq-app.is-detail .hcfq-detail {
  display: block;
}

/* Zurück-Link oben */
.hcfq-detail-back {
  margin: 12px 14px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--hcfq-gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-detail-back-arrow {
  font-size: 16px;
  line-height: 1;
}

.hcfq-detail-back:hover { color: #f0c060; }

/* Meta-Bar mit Badges + Action-Buttons */
.hcfq-detail-meta {
  margin: 12px 14px 0;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.hcfq-detail-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hcfq-detail-badge--cat {
  background: var(--hcfq-teal-soft);
  color: var(--hcfq-teal-light);
}

.hcfq-detail-badge--page {
  background: var(--hcfq-gold-soft);
  color: var(--hcfq-gold);
}

.hcfq-detail-badge--women {
  background: rgba(244, 114, 182, 0.15);
  color: var(--hcfq-pill-women);
}

.hcfq-detail-badge--men {
  background: rgba(96, 165, 250, 0.15);
  color: var(--hcfq-pill-men);
}

.hcfq-detail-actions {
  margin-left: auto;
  display: flex;
  gap: 5px;
}

.hcfq-detail-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hcfq-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--hcfq-text-mut);
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  transition: background 150ms, border-color 150ms, color 150ms;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-detail-action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hcfq-detail-action.is-active {
  background: var(--hcfq-gold-soft);
  border-color: var(--hcfq-gold);
  color: var(--hcfq-gold);
}

/* Frage-Block (rot) */
.hcfq-q-block {
  margin: 14px 14px 0;
  padding: 12px 13px;
  background: linear-gradient(135deg, rgba(226, 75, 74, 0.08), rgba(226, 75, 74, 0.03));
  border: 1px solid rgba(226, 75, 74, 0.3);
  border-left: 3px solid #e24b4a;
  border-radius: 10px;
}

.hcfq-q-block-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #f09595;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hcfq-q-block-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

/* Antwort-Block (grün) */
.hcfq-a-block {
  margin: 8px 14px 0;
  padding: 12px 13px;
  background: linear-gradient(135deg, rgba(99, 153, 34, 0.08), rgba(99, 153, 34, 0.03));
  border: 1px solid rgba(99, 153, 34, 0.3);
  border-left: 3px solid #639922;
  border-radius: 10px;
}

.hcfq-a-block-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #97c459;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hcfq-a-block-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}

/* **bold** Hervorhebungen in der Antwort werden grün+fett */
.hcfq-strong {
  color: #97c459;
  font-weight: 700;
}

/* Wenn qaColorSplit OFF: neutrale Boxen */
#hcfq-app.is-no-qa-color .hcfq-q-block,
#hcfq-app.is-no-qa-color .hcfq-a-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--hcfq-border);
  border-left: 3px solid var(--hcfq-gold-border);
}

#hcfq-app.is-no-qa-color .hcfq-q-block-label,
#hcfq-app.is-no-qa-color .hcfq-a-block-label {
  color: var(--hcfq-gold);
}

#hcfq-app.is-no-qa-color .hcfq-strong {
  color: var(--hcfq-gold);
}

/* Light-Mode-Adjustments für Q&A-Blöcke */
#hcfq-app.is-light .hcfq-q-block {
  background: rgba(226, 75, 74, 0.08);
}
#hcfq-app.is-light .hcfq-a-block {
  background: rgba(99, 153, 34, 0.1);
}
#hcfq-app.is-light .hcfq-q-block-text,
#hcfq-app.is-light .hcfq-a-block-text {
  color: #1a1410;
}
#hcfq-app.is-light .hcfq-q-block-label { color: #a32d2d; }
#hcfq-app.is-light .hcfq-a-block-label { color: #3b6d11; }
#hcfq-app.is-light .hcfq-strong        { color: #3b6d11; }

/* Arabisches-Original-Akkordeon */
.hcfq-arabic-toggle {
  margin: 8px 14px 0;
  background: rgba(212, 168, 67, 0.05);
  border: 1px solid var(--hcfq-gold-border);
  border-radius: 10px;
  overflow: hidden;
}

.hcfq-arabic-head {
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-arabic-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.hcfq-arabic-label {
  flex: 1;
  font-size: 12px;
  color: var(--hcfq-gold);
  font-weight: 600;
}

.hcfq-arabic-chevron {
  color: var(--hcfq-gold);
  font-size: 11px;
  transition: transform 200ms;
}

.hcfq-arabic-toggle.is-open .hcfq-arabic-chevron {
  transform: rotate(180deg);
}

.hcfq-arabic-content {
  display: none;
  padding: 0 13px 13px;
  font-family: 'Scheherazade New', 'Amiri', serif;
  direction: rtl;
  text-align: right;
  font-size: 18px;
  line-height: 2;
  color: rgba(255, 255, 255, 0.92);
}

#hcfq-app.is-light .hcfq-arabic-content { color: #1a1410; }

.hcfq-arabic-toggle.is-open .hcfq-arabic-content {
  display: block;
}

.hcfq-arabic-q,
.hcfq-arabic-a {
  margin-bottom: 14px;
}

.hcfq-arabic-q-label,
.hcfq-arabic-a-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 800;
  color: var(--hcfq-gold);
  letter-spacing: 1px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  direction: ltr;
  text-align: left;
}

/* ─── 17. VERWANDTE FRAGEN (Phase 6) ─────────────────────────────────────── */

.hcfq-related {
  margin: 18px 14px 0;
}

.hcfq-related-title {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--hcfq-text-dim);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 2px;
}

.hcfq-related-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
  -webkit-tap-highlight-color: transparent;
}

.hcfq-related-card:hover {
  background: rgba(212, 168, 67, 0.05);
  border-color: rgba(212, 168, 67, 0.25);
}

.hcfq-related-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.hcfq-related-text {
  flex: 1;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#hcfq-app.is-light .hcfq-related-card { background: rgba(255, 255, 255, 0.55); }
#hcfq-app.is-light .hcfq-related-text { color: #1a1410; }

.hcfq-related-arrow {
  color: var(--hcfq-text-faint);
  font-size: 14px;
  flex-shrink: 0;
}

/* ─── 6. SCROLLBAR (subtle, Webkit) ──────────────────────────────────────── */

#hcfq-app::-webkit-scrollbar {
  width: 6px;
}

#hcfq-app::-webkit-scrollbar-track {
  background: transparent;
}

#hcfq-app::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

#hcfq-app::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── 7. UTILITY: SR-Only ────────────────────────────────────────────────── */

.hcfq-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   END Phase 3 — bereit für Phase 4 (4-Pillen-Filter-Logik),
   Phase 5 (Detail-Ansicht Q&A rot/grün), Phase 6 (Verwandte Fragen),
   Phase 7 (Settings-Modal), Phase 8 (Heller Modus).
   ════════════════════════════════════════════════════════════════════════════ */
