/* =====================================================================
   Spirit6 – Design-System "6 Kreise" (Build 2)
   Dunkel als Standard (Nachtblau), gleichwertige warme helle Variante.
   Theme-Mechanik: :root = Hell, body.theme-dark = Dunkel (Toggle in header.php).
   Keine externen Fonts, kein Glassmorphism, Bewegung nur leise und abschaltbar.

   Inhalt
   1  Tokens (Hell / Dunkel) + Legacy-Aliase fuer bestehende Inline-Styles
   2  Basis & Typografie
   3  Layout-Primitive (.container .stack .cluster .grid-2 .grid-3 .band)
   4  Header / Navigation / Krisen-Leiste / Footer
   5  Komponenten (.card .btn .chip .badge .field .choice-group .notice .page-head ...)
   6  Signatur: .flower .ring .cat
   7  Landing (index.php)
   8  Wiki (library.php / article.php), Rechtstexte (.prose)
   9  Bestehende App-Klassen (Ritual, Werkzeuge, Feuerstelle, Chat, Verlauf …) – umgemappt
   10 Utilities, Druck, Reduced Motion
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Hell: "Morgenlicht" – warmes Papier statt Blaugrau */
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --surface-2: #F4ECE2;
  --surface-3: #EADFD1;
  --line: #E3D6C6;            /* nur Deko-Linien */
  --control: #8A7C70;         /* Konturen interaktiver Elemente >= 3:1 */
  --text: #231B2E;            /* Pflaumen-Tinte */
  --text-muted: #5A4F64;
  --accent: #FF6B35;          /* Markenorange: Flaechen, Buttons, Grafik */
  --accent-strong: #F2551B;
  --accent-text: #A8390C;     /* Orange als Text auf hellem Grund */
  --accent-soft: #FFE4D6;
  --on-accent: #1E1424;       /* dunkle Schrift auf Orange */
  --violet: #5B45C9;
  --teal: #0D6E61;
  --c1: #FF6B35; --c2: #9A88FF; --c3: #34BBA6;   /* Bluetenfarben (nur Grafik) */
  --petal-op: .5;
  --blend: multiply;
  --care-bg: #EEF4F1;
  --care-line: #0D6E61;
  --success: #1F6B3A;
  --error: #A3261C;
  --ring: #1D4ED8;            /* Fokus-Ring */
  --scrim: rgba(35, 27, 46, .55);
  --shadow: 0 1px 2px rgba(60, 40, 30, .05), 0 8px 24px -8px rgba(60, 40, 30, .12);
  --shadow-lg: 0 2px 4px rgba(60, 40, 30, .05), 0 24px 48px -16px rgba(60, 40, 30, .18);

  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-pill: 999px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: .25s;
  --maxw: 1160px;
  color-scheme: light;
}

body.theme-dark {
  /* Dunkel: "Nachtblau" – aus Starry-Dark weiterentwickelt */
  --bg: #10142A;
  --surface: #1A2142;
  --surface-2: #232B55;
  --surface-3: #2C3566;
  --line: #343E72;
  --control: #6C77B3;
  --text: #ECEEF8;
  --text-muted: #A9B0D0;
  --accent: #FF6B35;
  --accent-strong: #FF7F4F;
  --accent-text: #FF8A5E;
  --accent-soft: #3A2A3E;
  --on-accent: #10142A;
  --violet: #B3A7FF;
  --teal: #5ED3C0;
  --c1: #FF6B35; --c2: #A99BFF; --c3: #5ED3C0;
  --petal-op: .62;
  --blend: screen;
  --care-bg: #18304A;
  --care-line: #5ED3C0;
  --success: #6EDC9A;
  --error: #FF9A8A;
  --ring: #FFD27A;
  --scrim: rgba(5, 7, 20, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px -10px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 60px -20px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* Legacy-Aliase: Seiten mit Inline-Styles (var(--panel-bg) usw.) folgen automatisch dem neuen System.
   Auf body definiert, damit sie im Dunkel-Theme gegen die dunklen Tokens aufgeloest werden. */
body {
  --bg-color: var(--bg);
  --bg-gradient: none;
  --panel-bg: var(--surface);
  --panel-light-bg: var(--surface-2);
  --panel-border: var(--line);
  --border-glass: 1px solid var(--line);
  --text-main: var(--text);
  --accent-primary: var(--accent);
  --accent-primary-hover: var(--accent-strong);
  --accent-primary-text: var(--teal);
  --accent-orange: var(--accent-text);
  --accent-orange-bright: var(--accent-text);
  --accent-orange-deco: var(--accent);
  --accent-orange-glow: var(--accent-soft);
  --input-border: var(--control);
  --focus-ring: var(--ring);
  --color-success: var(--success);
  --color-error: var(--error);
  --shadow-main: var(--shadow);
  --shadow-glow: var(--shadow);
  --shadow-gold-glow: var(--shadow);
}

html { background: #FBF7F1; }
html[data-theme="dark"] { background: #10142A; }

/* ---------- 2. Basis & Typografie ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

main { flex: 1; padding: var(--space-6) 0 var(--space-7); }
main:focus { outline: none; }
main.main--full { padding: 0 0 var(--space-7); }

img, svg, video { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.06; letter-spacing: -.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.1; }
h3 { font-size: 1.22rem; letter-spacing: -.01em; }
h4 { font-size: 1.02rem; }
p { color: inherit; text-wrap: pretty; }
strong, b { font-weight: 700; }
small { font-size: .875em; }

a { color: var(--accent-text); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--text); }
/* Links im Fliesstext unterstreichen (nicht nur Farbe, WCAG 1.4.1) */
p a:not(.btn), .prose a:not(.btn), .sources a, .faq-item a, .notice a, .care-card a, .crisis-box a, .alert a, td a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-5) 0; }
::selection { background: var(--accent); color: var(--on-accent); }

.num, .tabular { font-variant-numeric: tabular-nums; }

/* Fokus (WCAG 2.4.7) */
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [role="button"]:focus-visible,
input[type="radio"]:focus-visible, input[type="checkbox"]:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: var(--space-4); top: -100px; z-index: 1000;
  background: var(--accent); color: var(--on-accent);
  padding: .65rem 1.1rem; border-radius: var(--radius-pill); font-weight: 700;
}
.skip-link:focus { top: var(--space-3); color: var(--on-accent); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---------- 3. Layout-Primitive ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.container--narrow { max-width: 800px; }
.container--prose { max-width: 760px; }

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-4)); }
.stack--s { --stack-gap: var(--space-2); }
.stack--l { --stack-gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-3)); }
.cluster--center { justify-content: center; }
.cluster--between { justify-content: space-between; }

.grid-2, .grid-3, .grid-auto { display: grid; gap: var(--grid-gap, var(--space-5)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.band { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.band--surface { background: var(--surface); }
.band--soft { background: var(--surface-2); }
.band--tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }

/* ---------- 4. Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .4s var(--ease);
}
.site-header__inner { display: flex; align-items: center; gap: var(--space-4); min-height: 72px; }

.logo {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); font-weight: 750; font-size: 1.28rem; letter-spacing: -.02em;
  border-radius: var(--radius-pill);
}
.logo:hover { color: var(--text); }
.logo-mark { display: block; flex: none; }
.logo-mark__petal { fill: currentColor; opacity: .78; }
.logo-mark__today { fill: var(--accent); }
.logo:hover .logo-mark__today { fill: var(--accent-strong); }

.site-nav { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.site-nav__list { list-style: none; display: flex; align-items: center; gap: .1rem; }
.site-nav__list a {
  white-space: nowrap; display: inline-flex; align-items: center; gap: .45rem;
  min-height: 44px; padding: .45rem .8rem; border-radius: var(--radius-pill);
  color: var(--text-muted); font-weight: 600; font-size: .95rem;
  background: none; border: 0; cursor: pointer;
}
.site-nav__list a:hover { color: var(--text); background: var(--surface-2); }
.site-nav__list a.active, .site-nav__list a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.site-nav__list a.active::before, .site-nav__list a[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.site-nav__list a.nav-admin { color: var(--teal); }
.site-nav__list .icon { width: 18px; height: 18px; }
.nav-logout-form { margin: 0; display: inline; }

.site-nav__tools { display: flex; align-items: center; gap: .4rem; }

.icon-btn, .nav-icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--control); background: transparent; color: var(--text);
  cursor: pointer; font-weight: 700; font-size: .82rem; letter-spacing: .02em;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.icon-btn:hover, .nav-icon-btn:hover { border-color: var(--text); background: var(--surface-2); color: var(--text); }
.icon-btn .icon, .nav-icon-btn .icon { width: 20px; height: 20px; }
/* Theme-Toggle: Sonne im Dunkel-, Mond im Hell-Modus */
.theme-icon-sun { display: none; }
body.theme-dark .theme-icon-sun { display: block; }
body.theme-dark .theme-icon-moon { display: none; }

.btn-nav-login, .btn-nav-premium {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: .45rem 1rem; border-radius: var(--radius-pill); font-weight: 700; font-size: .95rem;
}
.btn-nav-login { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--control); }
.btn-nav-login:hover, .btn-nav-login.active { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn-nav-premium { background: var(--accent); color: var(--on-accent); }
.btn-nav-premium:hover, .btn-nav-premium:focus-visible, .btn-nav-premium.active { background: var(--accent-strong); color: var(--on-accent); }

/* Krisenlink im Header: immer sichtbar, ruhig, nicht alarmierend */
.nav-help, .crisis-link {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  min-height: 44px; padding: .45rem 1rem; border-radius: var(--radius-pill);
  background: var(--care-bg); color: var(--text); font-weight: 700; font-size: .95rem;
  box-shadow: inset 0 0 0 1.5px var(--care-line);
}
.nav-help:hover, .crisis-link:hover { color: var(--text); background: var(--surface-2); }
.nav-help .icon, .crisis-link .icon { color: var(--care-line); width: 18px; height: 18px; }

.nav-toggle { display: none; }

/* Admin / Abmelden als Icon-Buttons (Text fuer Screenreader; im mobilen Menue sichtbar) */
.nav-tool__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.nav-tool.nav-admin { color: var(--teal); }
.nav-tool.active { background: var(--surface-2); border-color: var(--text); }
@media (max-width: 1180px) {
  .site-nav { gap: var(--space-2); }
  .site-nav__list a { padding: .45rem .6rem; font-size: .92rem; }
  .crisis-link { padding-inline: .8rem; }
}

/* Mobil: Menue-Button; ohne JS bleibt die Navigation sichtbar (umbrechend) */
@media (max-width: 1040px) {
  .site-header__inner { flex-wrap: wrap; min-height: 64px; gap: var(--space-2) var(--space-3); padding-block: .5rem; }
  .crisis-link { margin-left: auto; padding: .4rem .85rem; font-size: .9rem; }
  .js .nav-toggle { display: inline-grid; }
  .site-nav { width: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: var(--space-3); padding: var(--space-2) 0 var(--space-4); }
  .js .site-nav { display: none; }
  .js .site-header.is-open .site-nav { display: flex; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: .15rem; }
  .site-nav__list a { width: 100%; justify-content: flex-start; font-size: 1.02rem; padding: .7rem 1rem; border-radius: var(--radius-m); }
  .nav-tool { width: auto; padding: 0 1rem 0 .8rem; border-radius: var(--radius-pill); display: inline-flex; gap: .45rem; }
  .nav-tool__label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
  .site-nav__tools { flex-wrap: wrap; justify-content: flex-start; gap: .5rem; padding: 0 .25rem; }
  .btn-nav-login, .btn-nav-premium { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 380px) {
  .crisis-link__long { display: none; }
}
@media (min-width: 381px) {
  .crisis-link__short { display: none; }
}

/* Hinweisleiste unter dem Header */
.disclaimer-bar {
  background: var(--surface-2); color: var(--text-muted);
  font-size: .82rem; line-height: 1.5; padding: .4rem 0; text-align: center;
}
.disclaimer-bar .icon { width: 15px; height: 15px; color: var(--care-line); margin-right: .25rem; }
.disclaimer-bar a, .disclaimer-full a, .crisis-bar a, .care-card a, .crisis-box a {
  font-weight: 700; white-space: nowrap; text-decoration: underline; text-underline-offset: .2em;
}
.disclaimer-bar a { color: var(--text); }

/* Krisen-Leiste (Footer, dauerhaft) */
.crisis-bar {
  background: var(--care-bg);
  border-top: 1px solid var(--line);
  padding: var(--space-6) 0;
}
.crisis-bar__inner { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-5); align-items: start; }
.crisis-bar__title { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; }
.crisis-bar__title .icon { color: var(--care-line); }
.crisis-bar p { color: var(--text); font-size: .98rem; line-height: 1.85; max-width: 62rem; }
.crisis-bar a.tel-link, .crisis-box a.tel-link, .notice--care a.tel-link {
  display: inline-block; text-decoration: none; color: var(--text);
  background: var(--surface); border-radius: var(--radius-pill);
  padding: .05rem .65rem; margin: .1rem 0; box-shadow: inset 0 0 0 1.5px var(--care-line);
  font-variant-numeric: tabular-nums;
}
.crisis-bar a.tel-link:hover, .crisis-box a.tel-link:hover, .notice--care a.tel-link:hover { background: var(--care-line); color: var(--surface); }
.crisis-bar a.tel-link[href="tel:112"], .crisis-box a.tel-link[href="tel:112"], .notice--care a.tel-link[href="tel:112"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
@media (max-width: 720px) { .crisis-bar__inner { grid-template-columns: 1fr; } }

.disclaimer-full {
  background: var(--surface); border-top: 1px solid var(--line);
  padding: var(--space-5) 0; font-size: .88rem; line-height: 1.6;
}
.disclaimer-full p { color: var(--text-muted); max-width: 52rem; }
.disclaimer-full a { color: var(--text); }

/* Footer */
.site-footer, footer.site-footer {
  margin-top: 0; padding: var(--space-6) 0 var(--space-7);
  background: var(--surface); border-top: 1px solid var(--line);
  color: var(--text-muted); font-size: .92rem;
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-5); }
.site-footer .logo { font-size: 1.1rem; }
.site-footer p { color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.footer-links a { color: var(--text); padding: .35rem 0; display: inline-block; font-weight: 600; }
.footer-links a:hover { color: var(--accent-text); }
.footer-tagline { font-size: .92rem; margin-top: .35rem; }

/* ---------- 5. Komponenten ---------- */

/* Karten */
.card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.card--soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card--flat { box-shadow: none; }
.card--accent, .panel-gold { border-color: var(--accent); box-shadow: var(--shadow); }
.card--link, a.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  color: var(--text); text-decoration: none;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card--link:hover, a.card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card__meta { display: flex; align-items: center; gap: .5rem; color: var(--text-muted); font-size: .9rem; }
.card__more { margin-top: auto; padding-top: var(--space-2); display: inline-flex; align-items: center; gap: .4rem; color: var(--accent-text); font-weight: 700; font-size: .92rem; }
.card__more .icon { width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
a.card:hover .card__more .icon { transform: translateX(3px); }
body.theme-dark .card, body.theme-dark .panel { border-color: rgba(255, 255, 255, .06); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: var(--radius-pill); border: 0;
  font-family: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer;
  background: var(--surface-2); color: var(--text);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 20px; height: 20px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn--primary, .btn-primary, .btn-orange, .btn-gold {
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 18px -8px rgba(255, 107, 53, .7);
}
.btn--primary:hover, .btn-primary:hover, .btn-orange:hover, .btn-gold:hover { background: var(--accent-strong); color: var(--on-accent); }

.btn--ghost, .btn-outline {
  background: transparent; color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--control);
  border: 0;
}
.btn--ghost:hover, .btn-outline:hover { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }

.btn--quiet { background: transparent; color: var(--text); padding-inline: .9rem; }
.btn--quiet:hover { background: var(--surface-2); }

.btn--soft { background: var(--surface-2); color: var(--text); }
.btn--soft:hover { background: var(--surface-3); }

.btn--sm { min-height: 40px; padding: .45rem 1rem; font-size: .92rem; }
.btn--lg { min-height: 56px; padding: 1rem 1.8rem; font-size: 1.08rem; }
.btn--block { width: 100%; }

.btn-link {
  background: none; border: 0; padding: .4rem .25rem; min-height: 36px; cursor: pointer;
  color: var(--accent-text); font: inherit; font-size: .92rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: .2em;
}
.btn-link:hover { color: var(--text); }

/* Chips & Badges */
.chip {
  position: relative; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 40px; padding: .4rem .95rem; border-radius: var(--radius-pill);
  background: transparent; color: var(--text); font-size: .95rem; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px var(--control); border: 0; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.chip[aria-pressed="true"], .chip[aria-selected="true"], .chip.is-active, .chip:has(input:checked) {
  background: var(--accent); color: var(--on-accent); box-shadow: none;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
span.chip, .chip--static { cursor: default; background: var(--surface-2); box-shadow: none; min-height: 32px; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .15rem .7rem; border-radius: var(--radius-pill);
  background: var(--surface-2); color: var(--text); font-size: .8rem; font-weight: 700; letter-spacing: .01em;
}
.badge--accent { background: var(--accent); color: var(--on-accent); }
.badge--care { background: var(--care-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--care-line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Seitenkopf */
.page-head { display: grid; gap: var(--space-3); max-width: 44rem; margin-bottom: var(--space-6); }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-head--center { text-align: center; margin-inline: auto; justify-items: center; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--text-muted); line-height: 1.6; max-width: 40rem; }
.section-head { display: grid; gap: var(--space-3); max-width: 42rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }
.section-head--center { text-align: center; margin-inline: auto; justify-items: center; }

/* Formulare */
.field, .form-group { display: grid; gap: .4rem; margin-bottom: var(--space-4); }
.field > label, .field__label, .form-group > label, .mood-picker legend {
  display: block; font-size: .95rem; font-weight: 700; color: var(--text);
  text-transform: none; letter-spacing: 0; margin: 0;
}
.field__hint, .form-hint { font-size: .88rem; color: var(--text-muted); }
.input, .textarea, .select, .form-input, .form-textarea, .form-select,
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"], .field input[type="search"], .field textarea, .field select {
  width: 100%; min-height: 48px;
  background: var(--surface); color: var(--text);
  border: 1.5px solid var(--control); border-radius: var(--radius-m);
  padding: .7rem 1rem; font-size: 1rem; font-family: inherit; line-height: 1.5;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea, .form-textarea, .field textarea { min-height: 110px; resize: vertical; }
.input::placeholder, .textarea::placeholder, .form-input::placeholder, .form-textarea::placeholder, .field textarea::placeholder, .field input::placeholder { color: var(--text-muted); opacity: .85; }
.input:hover, .textarea:hover, .form-input:hover, .form-textarea:hover, .form-select:hover { border-color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus, .form-input:focus, .form-textarea:focus, .form-select:focus,
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--text);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 20px; height: 20px; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
@media (max-width: 768px) { .input, .textarea, .select, .form-input, .form-textarea, .form-select { font-size: 16px; } }

/* Radio-/Checkbox-Karten: <fieldset class="choice-group"><legend>…</legend><label class="choice"><input type="radio"><span class="choice__body">…</span></label> */
.choice-group { border: 0; min-width: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
.choice-group > legend { font-weight: 700; margin-bottom: var(--space-2); }
.choice-group--row { grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); }
.choice {
  position: relative; display: flex; align-items: flex-start; gap: .7rem;
  padding: .9rem 1rem; min-height: 56px; border-radius: var(--radius-m);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--control);
  cursor: pointer; color: var(--text);
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.choice:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__body { display: grid; gap: .15rem; }
.choice__title { font-weight: 700; }
.choice__desc { font-size: .9rem; color: var(--text-muted); }
.choice:has(input:checked), .choice.is-selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--ring); outline-offset: 2px; }
.choice::after {
  content: ""; flex: none; order: -1; width: 20px; height: 20px; margin-top: .1rem; border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--control); background: var(--surface);
}
.choice:has(input[type="checkbox"])::after { border-radius: 6px; }
.choice:has(input:checked)::after { box-shadow: inset 0 0 0 6px var(--accent); }
.choice--plain::after { display: none; }

/* Hinweise */
.notice, .alert {
  display: block; padding: var(--space-4) var(--space-5); border-radius: var(--radius-m);
  background: var(--surface-2); color: var(--text); font-size: .98rem; line-height: 1.6;
  border: 0; box-shadow: inset 4px 0 0 var(--control);
  margin-bottom: var(--space-4);
}
.notice p, .alert p { color: inherit; }
.notice--care, .care-card, .crisis-box {
  background: var(--care-bg); color: var(--text);
  box-shadow: inset 4px 0 0 var(--care-line); border: 0;
  border-radius: var(--radius-m); padding: var(--space-4) var(--space-5); text-align: left;
}
.care-card p, .crisis-box p { color: var(--text); }
.notice--success, .alert-success { background: var(--surface-2); color: var(--text); box-shadow: inset 4px 0 0 var(--success); }
.notice--error, .alert-error { background: var(--surface-2); color: var(--text); box-shadow: inset 4px 0 0 var(--error); }
.alert-success strong { color: var(--success); }
.alert-error strong { color: var(--error); }
.notice__title { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .25rem; }
.notice__title .icon { color: var(--care-line); }

.muted { color: var(--text-muted); }
.text-accent { color: var(--accent-text); }
.brand-gold { color: var(--accent-text); font-weight: 750; }

/* Details / FAQ */
.faq { display: grid; gap: var(--space-3); max-width: 52rem; }
.faq-item, .faq details {
  background: var(--surface); border-radius: var(--radius-m); border: 1px solid var(--line);
  transition: background var(--dur) var(--ease);
}
body.theme-dark .faq-item { border-color: rgba(255, 255, 255, .06); }
.faq-item summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.4rem; font-weight: 700; font-size: 1.05rem; color: var(--text); border-radius: var(--radius-m);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--accent); background: radial-gradient(circle, var(--accent) 0 3px, transparent 4px);
  transition: background var(--dur) var(--ease);
}
.faq-item[open] summary::after { background: var(--accent); }
.faq-item > p, .faq-item .answer { padding: 0 1.4rem 1.3rem; color: var(--text-muted); line-height: 1.7; max-width: 46rem; }

/* Breadcrumb */
.breadcrumb { font-size: .9rem; color: var(--text-muted); margin-bottom: var(--space-5); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--control); }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* Tabellen (Admin, Verlauf) */
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--text-muted); font-weight: 700; }

/* ---------- 6. Signatur: Blume, Ring, Katze ---------- */

/* Atemblume: .flower (optional .flower--auto) – JS-Sync ueber .is-inhale/.is-exhale + --breath-ms */
.flower { position: relative; aspect-ratio: 1; width: 100%; max-width: 440px; margin-inline: auto; --breath-ms: 5000ms; }
.flower__svg { position: absolute; inset: 9%; width: 82%; height: 82%; overflow: visible; }
.flower__ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.flower__petal {
  opacity: var(--petal-op); mix-blend-mode: var(--blend);
  transform-box: view-box; transform-origin: 100px 100px;
  transform: rotate(var(--a)) translateY(-22px) scale(.8);
  transition: transform var(--breath-ms) ease-in-out;
}
.flower__petal--c1 { fill: var(--c1); }
.flower__petal--c2 { fill: var(--c2); }
.flower__petal--c3 { fill: var(--c3); }
.flower__core { fill: var(--bg); transition: r var(--breath-ms) ease-in-out; }
.band--surface .flower__core { fill: var(--surface); }
.band--soft .flower__core { fill: var(--surface-2); }
.flower.is-inhale .flower__petal { transform: rotate(calc(var(--a) + 30deg)) translateY(-55px) scale(1); }
.flower.is-exhale .flower__petal { transform: rotate(var(--a)) translateY(-22px) scale(.8); }
.flower--auto .flower__petal { animation: flower-breathe 10s ease-in-out infinite; transition: none; }
@keyframes flower-breathe {
  0%   { transform: rotate(var(--a)) translateY(-22px) scale(.8); }
  40%  { transform: rotate(calc(var(--a) + 30deg)) translateY(-55px) scale(1); }
  100% { transform: rotate(var(--a)) translateY(-22px) scale(.8); }
}
.flower.is-paused .flower__petal, .flower.is-paused .ring__live, .is-paused .flower__petal, .is-paused .ring__live, .is-paused .breath-word { animation-play-state: paused; }

/* Ring aus sechs Segmenten */
.ring { display: block; width: 100%; height: auto; overflow: visible; }
.ring__seg { fill: none; stroke: var(--line); stroke-width: var(--ring-w, 10); stroke-linecap: round; transition: stroke .3s var(--ease); }
.ring__seg.is-on { stroke: var(--accent); }
.ring--butt .ring__seg, .ritual-ring .ring__seg { stroke-linecap: butt; }
.ring__maskseg { fill: none; stroke: #fff; stroke-width: calc(var(--ring-w, 10) + 2); stroke-linecap: round; }
.ring__live { fill: none; stroke: var(--accent); stroke-width: var(--ring-w, 10); stroke-dasharray: 360; stroke-dashoffset: 360; }
.ring--live .ring__live { animation: ring-fill 360s linear infinite; }
@keyframes ring-fill { to { stroke-dashoffset: 0; } }
.ring__label { font-size: 15px; font-weight: 700; fill: var(--text-muted); text-anchor: middle; dominant-baseline: central; transition: fill .3s var(--ease); }
.ring__label.is-on { fill: var(--on-accent); }
.ring__center { font-size: 56px; font-weight: 700; fill: var(--text); text-anchor: middle; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.ring__center-sub { font-size: 15px; fill: var(--text-muted); text-anchor: middle; }

/* Katze (eingerollt, "7. Kreis") – states: --sleep --breathe --stretch --wait */
.cat {
  --breath-ms: 4000ms;
  display: inline-block; width: var(--cat-size, 120px); aspect-ratio: 1; color: var(--text-muted);
  vertical-align: middle; flex: none;
}
.cat__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.cat__line { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cat__line--soft { opacity: .45; }
.cat__line--fine { stroke-width: 2; }
.cat__eyes--open circle { fill: currentColor; }
.cat__nose { fill: var(--accent); }
.cat__shadow { fill: currentColor; opacity: .08; }
.cat__body, .cat__head { transform-box: view-box; transform-origin: 60px 104px; transition: transform var(--breath-ms) ease-in-out; }
.cat__eyes--open { display: none; }
.cat--wait .cat__eyes--open, .cat--stretch .cat__eyes--open { display: inline; }
.cat--wait .cat__eyes--closed, .cat--stretch .cat__eyes--closed { display: none; }
.cat__tail { transform-box: view-box; transform-origin: 30px 90px; }
.cat__ear { transform-box: fill-box; transform-origin: 50% 100%; }

/* Schlafen: sehr langsames, selbststaendiges Atmen */
.cat--sleep .cat__body { animation: cat-sleep 5.5s ease-in-out infinite; }
.cat--sleep .cat__head { animation: cat-sleep-head 5.5s ease-in-out infinite; }
@keyframes cat-sleep { 0%, 100% { transform: scale(1, 1); } 45% { transform: scale(1.025, 1.045); } }
@keyframes cat-sleep-head { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-1.6px); } }

/* Atmen im Takt: JS setzt .is-inhale / .is-exhale und --breath-ms */
.cat--breathe .cat__body { animation: cat-sleep 8s ease-in-out infinite; }
.cat--breathe.is-inhale .cat__body, .cat--breathe.is-exhale .cat__body,
.cat--breathe.is-inhale .cat__head, .cat--breathe.is-exhale .cat__head { animation: none; }
.cat.is-inhale .cat__body { transform: scale(1.04, 1.08); }
.cat.is-inhale .cat__head { transform: translateY(-3px); }
.cat.is-exhale .cat__body { transform: scale(1, 1); }
.cat.is-exhale .cat__head { transform: translateY(0); }

/* Strecken (Ritual-Abschluss): einmaliges, langsames Strecken, dann ruhig */
.cat--stretch .cat__body { animation: cat-stretch 3.2s ease-in-out 1 both; }
.cat--stretch .cat__head { animation: cat-stretch-head 3.2s ease-in-out 1 both; }
.cat--stretch .cat__ear { animation: cat-ear 3.2s ease-in-out 1; }
@keyframes cat-stretch { 0%, 100% { transform: none; } 40%, 60% { transform: scale(1.1, .94); } }
@keyframes cat-stretch-head { 0%, 100% { transform: none; } 40%, 60% { transform: translate(5px, -5px) rotate(-6deg); } }
@keyframes cat-ear { 0%, 100% { transform: none; } 50% { transform: scaleY(1.15); } }

/* Warten (leere Zustaende): Augen offen, Schwanzspitze wippt selten */
.cat--wait .cat__tail { animation: cat-tail 7s ease-in-out infinite; }
@keyframes cat-tail { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(-4deg); } }

.cat--s { --cat-size: 64px; }
.cat--m { --cat-size: 120px; }
.cat--l { --cat-size: 180px; }
.cat--warm { color: var(--accent-text); }
body.no-cat .cat { display: none !important; }

/* Leerer Zustand mit Katze */
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--space-3); padding: var(--space-6) var(--space-4); color: var(--text-muted); }

/* ---------- 7. Landing (index.php) ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
.hero .lead { margin-top: var(--space-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.hero__fine { margin-top: var(--space-5); color: var(--text-muted); font-size: .95rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.hero__fine span { display: inline-flex; align-items: center; gap: .4rem; }
.hero__fine .icon { width: 17px; height: 17px; color: var(--teal); }
.hero__visual { position: relative; }
.hero__stage { position: relative; }
.hero__breath-label { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.breath-word { grid-area: 1 / 1; font-weight: 700; font-size: clamp(.95rem, 1.8vw, 1.15rem); color: var(--text); animation: word-in 10s ease-in-out infinite; }
.breath-word + .breath-word { animation-name: word-out; }
@keyframes word-in { 0%, 36% { opacity: 1; } 42%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes word-out { 0%, 38% { opacity: 0; } 44%, 94% { opacity: 1; } 100% { opacity: 0; } }
.hero__ctrl { display: flex; justify-content: center; margin-top: var(--space-3); }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; max-width: min(250px, 66vw); width: 100%; margin-inline: auto; }
  .hero { padding-top: var(--space-5); }
  .hero__ctrl { margin-top: 0; }
}

.care-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.care-strip p { display: flex; align-items: center; gap: .6rem; }

/* Ritual-Dial + Tabs */
.ritual { display: grid; grid-template-columns: minmax(240px, 400px) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.ritual__dial { max-width: 400px; width: 100%; margin-inline: auto; }
@media (max-width: 900px) { .ritual { grid-template-columns: 1fr; } .ritual__dial { max-width: 300px; } }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-5); }
.tab {
  min-height: 44px; padding: .5rem 1rem; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  background: transparent; color: var(--text-muted); font-weight: 600; font-size: .98rem;
  box-shadow: inset 0 0 0 1.5px var(--control);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tab:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; font-weight: 700; }
.tab-panel { background: var(--surface-2); border-radius: var(--radius-l); padding: clamp(1.4rem, 3vw, 2.2rem); min-height: 15rem; display: grid; gap: var(--space-3); align-content: start; }
.tab-panel[hidden] { display: none; }
.tab-panel__when { color: var(--text-muted); font-size: .92rem; font-weight: 600; }
.tab-panel h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.tab-panel__prompt { font-size: 1.1rem; max-width: 36rem; }
.tab-panel__starter { margin-top: var(--space-2); padding: .9rem 1.1rem; border-radius: var(--radius-m); border: 1.5px dashed var(--control); color: var(--text-muted); font-style: italic; }
.ritual-frame { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.ritual-frame .card { display: grid; gap: var(--space-2); align-content: start; }

/* Werkzeuge */
.tool-card { display: grid; gap: var(--space-3); align-content: start; }
.tool-card__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); }
.tool-card__icon .icon { width: 30px; height: 30px; }
.tool-card p { color: var(--text-muted); }
.tool-card .tool-card__spec { color: var(--text); font-weight: 600; font-size: .95rem; }

/* Ort der Lichter */
.hearth-feature {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  background: var(--surface-2); border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 3rem); margin-top: var(--space-5);
}
.hearth-feature__art { position: relative; margin-right: 8%; width: clamp(160px, 22vw, 230px); aspect-ratio: 1; display: grid; place-items: center; }
.hearth-feature__art .fire { width: 80%; }
.hearth-feature__art .cat { position: absolute; right: -18%; bottom: -8%; --cat-size: 52%; }
.hearth-feature p { color: var(--text-muted); max-width: 40rem; }
.hearth-feature .chip { background: var(--surface); }
.hearth-feature .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--space-4) 0; }
@media (max-width: 720px) { .hearth-feature { grid-template-columns: 1fr; justify-items: start; } }

/* Feuer-Grafik: sechs Lichter um eine Glut */
.fire { display: block; overflow: visible; }
.fire__light { fill: var(--c1); opacity: .9; }
.fire__light:nth-child(2n) { fill: var(--c2); opacity: .75; }
.fire__light:nth-child(3n) { fill: var(--c3); opacity: .75; }
.fire__glow { fill: var(--accent); opacity: .18; }
.fire__core { fill: var(--accent); }
.fire__flame { fill: var(--accent-strong); transform-box: fill-box; transform-origin: 50% 100%; animation: flame 4.5s ease-in-out infinite; }
@keyframes flame { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.94, 1.06); } }

/* Wiki-Teaser / Karten-Kategoriepunkt */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--k, var(--accent)); flex: none; }
.k-conditions { --k: var(--c2); }
.k-breathwork { --k: var(--c1); }
.k-mindfulness { --k: var(--c3); }
.k-wellbeing { --k: #E8B04A; }

/* Vertrauen / Datenschutz */
.trust-grid { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.trust-grid li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); display: grid; gap: .4rem; align-content: start; }
.band--soft .trust-grid li { background: var(--surface); }
.trust-grid .icon { width: 28px; height: 28px; color: var(--teal); margin-bottom: .3rem; }
.trust-grid strong { font-size: 1.08rem; }
.trust-grid span { color: var(--text-muted); font-size: .97rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .trust-grid { grid-template-columns: 1fr; } }

.final-cta { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) var(--space-5); border-radius: 40px; background: var(--surface-2); display: grid; justify-items: center; gap: var(--space-5); }
.final-cta .flower { max-width: 120px; }

.install-steps { display: grid; gap: var(--space-3); }
.install-steps p { display: flex; gap: .6rem; align-items: flex-start; }
.install-steps .icon { color: var(--accent-text); margin-top: .2rem; }

/* ---------- 8. Wiki & Rechtstexte ---------- */
.wiki-cat { margin-top: var(--space-7); }
.wiki-cat__title { display: flex; align-items: center; gap: .7rem; font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: var(--space-4); }
.wiki-cat__title .dot { width: 14px; height: 14px; }
.wiki-card-link { display: block; text-decoration: none; border-radius: var(--radius-l); color: var(--text); }
.wiki-card { height: 100%; }
.wiki-card h3 { font-size: 1.14rem; line-height: 1.3; }
.wiki-card p { color: var(--text-muted); font-size: .97rem; }
.wiki-card-link .panel { transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.wiki-card-link:hover .panel, .wiki-card-link:focus-visible .panel { border-color: var(--accent); transform: translateY(-2px); }

.prose { font-size: 1.08rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-top: 2em; line-height: 1.25; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose--legal { font-size: 1rem; }
.prose--legal h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); padding-bottom: var(--space-3); border-bottom: 2px solid var(--accent); margin-bottom: var(--space-4); }
.prose--legal h2 { font-size: 1.2rem; margin-top: 1.8em; color: var(--text); }
.prose--legal ul { margin-top: .5em; font-size: .97rem; }
.prose--legal p { color: var(--text); }

.article-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--text-muted); font-size: .95rem; font-weight: 600; }
.article-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.article-meta .icon { width: 17px; height: 17px; }
.sources { margin-top: var(--space-7); }
.sources h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; margin-bottom: var(--space-3); }
.sources ul { padding-left: 1.2em; display: grid; gap: .5rem; font-size: .95rem; }
.sources a .icon { width: 15px; height: 15px; vertical-align: -.15em; }

/* ---------- 9. Bestehende App-Klassen (umgemappt) ---------- */
.hero-title { color: var(--text); }

/* Ritual-Wizard (dashboard.php) */
.wizard-progress {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  margin-bottom: var(--space-5); background: var(--surface-2); padding: .6rem 1rem; border-radius: var(--radius-pill);
}
.step-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--control); opacity: .45; transition: opacity .3s var(--ease), background .3s var(--ease), transform .3s var(--ease); }
.step-dot.active { background: var(--accent); opacity: 1; transform: scale(1.25); }
.step-dot.done { background: var(--accent); opacity: .6; }
.ritual-step h4:focus, .sos-card-step h4:focus, .tool-dialog h2:focus, .tool-dialog h3:focus { outline: none; }
.ritual-step h4:focus-visible { outline: 2px dashed var(--accent); outline-offset: 4px; }
.wizard-hint { margin-top: .5rem; font-size: .92rem; color: var(--error); min-height: 1em; }
.wizard-hint:empty { display: none; }
.wizard-nav { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-top: var(--space-4); }
.wizard-nav.end { justify-content: flex-end; }

.mood-picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.mood-picker legend { margin-bottom: .5rem; }
.mood-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.mood-picker .mood-option {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  padding: .6rem .3rem; min-height: 72px; border-radius: var(--radius-m);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--control); border: 0;
  cursor: pointer; text-align: center; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0; font-weight: 600;
  transition: box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.mood-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mood-option:focus-within { outline: 3px solid var(--ring); outline-offset: 2px; }
.mood-option.selected, .mood-option:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mood-emoji { font-size: 1.4rem; line-height: 1.2; }
.mood-label { font-size: .8rem; color: var(--text); line-height: 1.25; word-break: break-word; }
@media (max-width: 420px) { .mood-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.dashboard-grid { grid-template-columns: 2fr 1.2fr; gap: var(--space-6); }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }
.tool-launch { justify-content: flex-start; text-align: left; padding: .8rem 1rem; width: 100%; }

.keyword-hint { position: relative; margin-top: .5rem; padding-right: 3rem; }
.keyword-hint[hidden] { display: none; }
.hint-close { position: absolute; top: .4rem; right: .4rem; width: 40px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 1.1rem; cursor: pointer; border-radius: 50%; }
.hint-close:hover { background: var(--surface); }

.share-pillar { border: 0; margin: .6rem 0 0; padding: 0 0 0 1.75rem; display: flex; flex-direction: column; gap: .35rem; }
.share-pillar[hidden] { display: none; }
.share-pillar legend { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.form-group .share-pillar label { display: flex; align-items: center; gap: .5rem; font-size: .92rem; font-weight: 500; color: var(--text); cursor: pointer; min-height: 36px; }
.share-pillar input { width: 18px; height: 18px; }
.share-preview { margin: .5rem 0 0 1.75rem; padding: .6rem .8rem; border: 1.5px dashed var(--control); border-radius: var(--radius-s); font-size: .9rem; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.share-preview-label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: .25rem; }

/* Atem-Kreis (bestehend) */
.breathing-container { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: var(--space-4) 0; padding: var(--space-5); background: var(--surface-2); border-radius: var(--radius-l); }
.breathing-circle-wrapper { width: 180px; height: 180px; display: flex; align-items: center; justify-content: center; position: relative; }
.breathing-circle {
  width: 104px; height: 104px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--c1), var(--accent-strong) 70%);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent), 0 0 0 22px color-mix(in srgb, var(--accent) 8%, transparent);
  transition: transform 4s ease-in-out; will-change: transform;
  display: flex; align-items: center; justify-content: center;
}
.breathing-label { font-size: .82rem; font-weight: 800; color: var(--on-accent); text-align: center; pointer-events: none; z-index: 10; letter-spacing: .02em; }
.breath-stats { font-size: .85rem; color: var(--text-muted); margin-top: var(--space-4); font-weight: 600; }
.breath-modes { display: flex; gap: .5rem; justify-content: center; margin-bottom: var(--space-5); flex-wrap: wrap; }
.breath-modes .btn { min-height: 40px; padding: .4rem .9rem; font-size: .9rem; }
.breath-modes .btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* Werkzeug-Dialoge (kein Blur-Glas: ruhiger, deckender Hintergrund) */
.tool-overlay { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 100; align-items: center; justify-content: center; padding: var(--space-4); overflow-y: auto; }
.tool-overlay.open { display: flex; }
.tool-overlay .panel { max-width: 540px; width: 100%; max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--bg); box-shadow: var(--shadow-lg); }
.tool-overlay.sos .panel { border-color: var(--care-line); }
.sos-card-step h4 { margin: .6rem 0; color: var(--text); font-size: 1.2rem; }
.sos-progress { font-size: .85rem; font-weight: 700; color: var(--text-muted); margin-bottom: .3rem; }
.slicer-steps label { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.slicer-steps input[type="checkbox"] { margin-top: .2rem; flex-shrink: 0; }

/* Feuerstelle (bestehende Beitraege) */
.hearth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); margin-bottom: var(--space-4); transition: border-color var(--dur) var(--ease); }
.hearth-card:hover { border-color: var(--control); }
.reaction-bar { display: flex; gap: .5rem; margin-top: var(--space-4); flex-wrap: wrap; }
.btn-react {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .9rem;
  border-radius: var(--radius-pill); background: transparent; border: 0; box-shadow: inset 0 0 0 1.5px var(--control);
  color: var(--text); font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-react:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.btn-react.active { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }

/* Chat (companions.php) */
.chat-container { display: flex; flex-direction: column; height: 380px; background: var(--surface-2); border-radius: var(--radius-l); overflow: hidden; }
.chat-history { flex: 1; padding: var(--space-4); overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.chat-bubble { max-width: 78%; padding: .6rem .9rem; border-radius: 18px; font-size: .95rem; line-height: 1.45; }
.chat-bubble.sent { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.chat-bubble.received { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 6px; }
.chat-input-bar { display: flex; gap: .5rem; padding: .5rem; background: var(--surface); }
.chat-input-bar input { flex: 1; min-height: 44px; border: 1.5px solid var(--control); border-radius: var(--radius-pill); background: var(--bg); padding: .5rem 1rem; color: var(--text); }
.chat-input-bar input:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.chat-input-bar button { background: var(--accent); color: var(--on-accent); border: 0; min-height: 44px; padding: 0 1.2rem; border-radius: var(--radius-pill); font-weight: 700; cursor: pointer; }
.chat-input-bar button:hover { background: var(--accent-strong); }

/* Verlauf (journal_history.php) */
.journal-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); margin-bottom: var(--space-4); }
.journal-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.journal-date { font-weight: 700; color: var(--text); font-size: 1.02rem; }
.journal-mood { font-size: .82rem; font-weight: 700; color: var(--text); background: var(--surface-2); padding: .15rem .7rem; border-radius: var(--radius-pill); }
.journal-answers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 768px) { .journal-answers-grid { grid-template-columns: 1fr; } }
.answer-box { background: var(--surface-2); border-radius: var(--radius-m); padding: .8rem 1rem; }
.answer-box h4 { font-size: .8rem; font-weight: 700; color: var(--accent-text); margin-bottom: .3rem; letter-spacing: .02em; }
.answer-box p { font-size: .95rem; color: var(--text); line-height: 1.55; }

/* Premium-Teaser */
.locked-container { position: relative; }
.locked-blur { filter: blur(6px); pointer-events: none; user-select: none; opacity: .5; }
.locked-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.paywall-card { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius-l); padding: var(--space-6); text-align: center; max-width: 440px; box-shadow: var(--shadow-lg); }

/* ---------- 10. Utilities ---------- */
.text-center { text-align: center; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-0 { margin-top: 0; }
.w-full { width: 100%; }
[hidden] { display: none !important; }

@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* alte Logo-Grafik (nur falls noch irgendwo eingebunden) */
.logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

@media (max-width: 600px) {
  .hero-title { font-size: 1.9rem !important; }
  .card, .panel { padding: 1.25rem; border-radius: var(--radius-m); }
}

@media print {
  .no-print, .site-header, header, footer, .disclaimer-bar, .crisis-bar, .disclaimer-full, .skip-link, .tool-overlay, .cat, .hero__visual { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .panel { box-shadow: none; border-color: #ccc; }
}

/* Reduzierte Bewegung (Angst-/Trauma-Betroffene, WCAG 2.3.3): alles steht still, Inhalte bleiben verstaendlich */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .flower__petal, .flower--auto .flower__petal { animation: none !important; transform: rotate(var(--a)) translateY(-44px) scale(.92) !important; }
  .flower.is-inhale .flower__petal, .flower.is-exhale .flower__petal { transform: rotate(var(--a)) translateY(-44px) scale(.92) !important; }
  .ring--live .ring__live { animation: none !important; stroke-dashoffset: 300; }
  .breath-word { animation: none !important; }
  .breath-word + .breath-word { display: none; }
  .hero__ctrl { display: none; }
  .cat__body, .cat__head, .cat__tail, .cat__ear, .fire__flame { animation: none !important; transform: none !important; }
  .btn:active, .card--link:hover, a.card:hover, .wiki-card-link:hover .panel { transform: none !important; }
  .breathing-circle { transform: none !important; transition: opacity 1s linear !important; }
  .breathing-circle:not(.expanded) { opacity: .7; }
}

/* Menue-Button-Icons */
.nav-toggle__close { display: none; }
.site-header.is-open .nav-toggle__close { display: block; }
.site-header.is-open .nav-toggle__open { display: none; }
.section-head .eyebrow, .page-head .eyebrow { color: var(--accent-text); font-size: .85rem; }

/* Rechtstexte (impressum.php) */
.prose--legal { line-height: 1.7; }
.prose--legal p + p { margin-top: .6em; }
.legal-h1 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); padding-bottom: var(--space-3); border-bottom: 2px solid var(--accent); margin-bottom: var(--space-4); }
.legal-h2 { font-size: 1.15rem; margin: 1.8em 0 .5em; color: var(--text); }
.legal-list { margin: .5em 0 0 1.3em; font-size: .97rem; }
.legal-list li + li { margin-top: .3em; }
a.chip { text-decoration: none; color: var(--text); }
a.chip.is-active { color: var(--on-accent); }

/* Koordinator: Katze nie neben Krisen-/Hilfehinweisen (Build-2-Vertrag) */
body:has(#lowmood-branch:not([hidden])) .s6-welcome .cat,
body:has(#letgo-hint:not([hidden])) .cat,
body:has(.s6f-hint:not([hidden])) .cat,
body:has(.js-kwhint:not([hidden])) .cat { display: none !important; }
