@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg: #080610;
  --bg2: #0e0b1a;
  --primary-glow: #7c3aed;
  --purple-l: #a78bfa;
  --purple-d: #4c1d95;
  --cyan: #06b6d4;
  --cyan-l: #67e8f9;
  --pink: #ec4899;
  --gold: #f59e0b;
  --green: #10b981;
  --text: #ede9f6;
  --text-dim: #6b6080;
  --text-mid: #9d8ec0;
  --glass: rgba(255,255,255,0.04);
  --glass-b: rgba(255,255,255,0.09);
  --card: rgba(16,12,28,0.9);
}

/* ── Kontrast-Stufen ──────────────────────────────────────────── */
body.echo-hc {
  --text-dim:  #b8aad4;
  --text-mid:  #cfc0ec;
  --bg:        #0d0a1e;
  --bg2:       #161030;
  --glass:     rgba(255,255,255,0.07);
  --glass-b:   rgba(255,255,255,0.14);
}
body.echo-hc2 {
  --text-dim:  #d8cef2;
  --text-mid:  #eae4ff;
  --bg:        #110e26;
  --bg2:       #1c1640;
  --glass:     rgba(255,255,255,0.11);
  --glass-b:   rgba(255,255,255,0.22);
}
body.echo-light {
  --bg:           #f2effe;
  --bg2:          #e6e0fa;
  --text:         #14102a;
  --text-dim:     #4a3d72;
  --text-mid:     #2e2258;
  --glass:        rgba(0,0,0,0.05);
  --glass-b:      rgba(0,0,0,0.12);
  --card:         rgba(255,255,255,0.80);
  --primary-glow: #6d28d9;
  --purple-l:     #6d28d9;   /* dunkler für besseren Kontrast auf Weiß */
  --cyan-l:       #0891b2;   /* dunkler für besseren Kontrast */
  --purple-d:     #4c1d95;
}

/* ── Hell-Modus: Gezielte Overrides ──────────────────────────── */

/* Living Void Canvas: Partikel dunkel auf hellem Grund */
body.echo-light canvas { mix-blend-mode:multiply; opacity:.72; }

/* ── Karten: "Innere Stille"-Stil (Gradient wie der Tagesimpuls) */
body.echo-light .gc {
  background: linear-gradient(135deg,rgba(124,58,237,.09),rgba(6,182,212,.05)) !important;
  border-color: rgba(109,40,217,.22) !important;
}
body.echo-light .mood-card,
body.echo-light .stat-card {
  background: linear-gradient(135deg,rgba(124,58,237,.07),rgba(6,182,212,.04)) !important;
}

/* Journal Entry Cards */
body.echo-light .j-card,
body.echo-light .entry-card,
body.echo-light .e-top {
  background: linear-gradient(135deg,rgba(124,58,237,.08),rgba(6,182,212,.04)) !important;
  border-color: rgba(109,40,217,.18) !important;
}
body.echo-light .entry-weather-badge { color: rgba(46,34,88,.5) !important; }

/* entry text colors */
body.echo-light .e-date   { color: rgba(46,34,88,.5) !important; }
body.echo-light .e-title  { color: rgba(20,16,42,.88) !important; }
body.echo-light .e-preview{ color: rgba(46,34,88,.65) !important; }
body.echo-light .tag      {
  background: rgba(109,40,217,.12) !important;
  border-color: rgba(109,40,217,.25) !important;
  color: #6d28d9 !important;
}

/* Write Screen */
body.echo-light .w-body { color: #14102a !important; }
body.echo-light .w-body::placeholder { color: rgba(74,61,114,.3) !important; }
body.echo-light .w-title-input {
  background: rgba(255,255,255,.55) !important;
  border-color: rgba(109,40,217,.2) !important;
  color: #14102a !important;
}
body.echo-light .w-title-input::placeholder { color: rgba(74,61,114,.3) !important; }
body.echo-light .w-capsule-btn {
  border-color: rgba(109,40,217,.2) !important;
  color: rgba(46,34,88,.55) !important;
}
body.echo-light .w-weather,
body.echo-light .w-weather-temp,
body.echo-light .w-weather-label { color: rgba(46,34,88,.65) !important; }
body.echo-light .w-tag-del {
  background: rgba(109,40,217,.1) !important;
  color: rgba(46,34,88,.6) !important;
}
body.echo-light .wc-bar-bg { background: rgba(0,0,0,.08) !important; }
body.echo-light .wc-stat-label { color: rgba(46,34,88,.5) !important; }
body.echo-light .w-label { color: rgba(46,34,88,.6) !important; }

/* Mood / Energy / MSE Chips */
body.echo-light .mood-chip,
body.echo-light .energy-chip {
  background: rgba(255,255,255,.55) !important;
  border-color: rgba(109,40,217,.2) !important;
  color: rgba(46,34,88,.75) !important;
}
body.echo-light .mood-chip.sel,
body.echo-light .energy-chip.sel { color: #fff !important; }
body.echo-light .mse-pill { color: rgba(46,34,88,.6) !important; }
body.echo-light .mse-pill.has-selection { color: rgba(20,16,42,.9) !important; }
body.echo-light .mse-pill-sep,
body.echo-light .mse-pill-arrow { color: rgba(46,34,88,.35) !important; }
body.echo-light .mse-overlay { background: rgba(180,150,230,.45) !important; }

/* Impulse / AI */
body.echo-light .impulse { color: rgba(20,16,42,.85) !important; }
body.echo-light .imp-txt  { color: rgba(46,34,88,.72) !important; }
body.echo-light .imp-tag  { color: #0891b2 !important; }
body.echo-light .imp-action {
  background: rgba(255,255,255,.45) !important;
  border-color: rgba(109,40,217,.2) !important;
  color: rgba(46,34,88,.7) !important;
}
body.echo-light .impulse-line { background: rgba(0,0,0,.08) !important; }

/* Voice / Response */
body.echo-light .voice-mic-btn { color: rgba(46,34,88,.6) !important; }
body.echo-light .v-response-edit {
  background: rgba(255,255,255,.45) !important;
  border-color: rgba(109,40,217,.18) !important;
  color: rgba(46,34,88,.7) !important;
}

/* Chat / Echo-Dialog */
body.echo-light .ci-textarea,
body.echo-light .ci-preview,
body.echo-light .ci-popup {
  background: rgba(255,255,255,.5) !important;
  border-color: rgba(109,40,217,.18) !important;
  color: rgba(20,16,42,.85) !important;
}
body.echo-light .ci-chip { color: rgba(46,34,88,.55) !important; }
body.echo-light .ed-bubble-ai  { color: rgba(20,16,42,.82) !important; background: rgba(109,40,217,.08) !important; }
body.echo-light .ed-bubble-user{ color: rgba(20,16,42,.75) !important; background: rgba(255,255,255,.45) !important; }
body.echo-light .ed-dialog-input{ background: rgba(255,255,255,.5) !important; border-color: rgba(109,40,217,.2) !important; color: rgba(20,16,42,.85) !important; }

/* Home Recent Header */
body.echo-light .rh-sep   { background: rgba(0,0,0,.1) !important; }
body.echo-light .rh-title { color: rgba(46,34,88,.55) !important; }

/* KI Insights */
body.echo-light .insight-sub { color: rgba(46,34,88,.7) !important; }

/* Profile / XP / Level */
body.echo-light .s-bg,
body.echo-light .xp-bg,
body.echo-light .sd-bar-bg,
body.echo-light .lv-xp-mini,
body.echo-light .lv-bar-bg { background: rgba(0,0,0,.08) !important; }
body.echo-light .prof-ico  { border-color: rgba(109,40,217,.2) !important; }
body.echo-light .lv-sub    { color: rgba(46,34,88,.6) !important; }
body.echo-light .lv-xp-txt { color: rgba(46,34,88,.55) !important; }

/* Badges */
body.echo-light .b-card.unlocked .b-name { color: #5b21b6 !important; }
body.echo-light .b-card.locked  .b-name  { color: rgba(46,34,88,.4) !important; }
body.echo-light .b-card.locked .b-ico-wrap { filter: grayscale(1) brightness(.65) !important; }

/* Badge Popup (unlocked) */
body.echo-light .bu-card {
  background: linear-gradient(135deg,rgba(255,255,255,.97),rgba(240,235,255,.97)) !important;
  border-color: rgba(109,40,217,.3) !important;
}
body.echo-light .bu-name { color: #14102a !important; }
body.echo-light .bu-desc { color: rgba(46,34,88,.75) !important; }
body.echo-light #badgeOverlay { background: rgba(109,40,217,.35) !important; backdrop-filter: blur(14px) !important; }

/* Impuls-Popup */
body.echo-light #impulsePopupOv { background: rgba(109,40,217,.35) !important; backdrop-filter: blur(14px) !important; }

/* Settings */
@media(hover:hover){body.echo-light .setting-row:hover { background: rgba(109,40,217,.06) !important; }}
body.echo-light .sr-toggle { background: rgba(0,0,0,.1) !important; }
body.echo-light .sr-sub    { color: rgba(46,34,88,.55) !important; }
body.echo-light .toggle::after { background: #fff !important; box-shadow: 0 1px 4px rgba(0,0,0,.15) !important; }

/* Scroll & Tabs */
body.echo-light .scroll-indicator { background: rgba(0,0,0,.2) !important; }
body.echo-light .tab-scroll { background: rgba(109,40,217,.06) !important; }
body.echo-light .wt-chip {
  background: rgba(255,255,255,.5) !important;
  border-color: rgba(109,40,217,.18) !important;
  color: rgba(46,34,88,.65) !important;
}
body.echo-light .wt-chip.active {
  background: rgba(109,40,217,.15) !important;
  border-color: rgba(109,40,217,.45) !important;
  color: #5b21b6 !important;
}

/* Soul Screen — Dimensionen + Bars */
body.echo-light .sd-name  { color: rgba(46,34,88,.8) !important; }
body.echo-light .sd-desc  { color: rgba(46,34,88,.65) !important; }
/* Radar (Canvas) — invertieren damit Labels/Gitter lesbar werden */
body.echo-light #radarBig { filter: invert(1); border-radius: 8px; }

/* Soul Writing-Time Bars (#rhChart) — invertieren */
body.echo-light #rhChart { filter: invert(1); }

/* ── Charts & Stats: filter:invert(1) macht weiße Texte lesbar ── */
/* Heatmap (enthält hardcoded weiße Texte via JS) */
body.echo-light .heatmap-wrap  { filter: invert(1); border-radius: 12px; }
/* Titel zurück invertieren (war bereits dunkel → doppelt invertiert = original) */
body.echo-light .hm-title      { filter: invert(1); }

/* Stimmungsverlauf Line Chart */
body.echo-light .linechart-wrap { filter: invert(1); border-radius: 12px; }
/* Top-Bereich (Titel + Durchschnitt) zurück */
body.echo-light .lc-top        { filter: invert(1); }

/* Stats-Dashboard: Wörter, Schreibzeiten, Stimmungsverteilung, Wetter */
body.echo-light #statsWordsWeekChart,
body.echo-light #statsWordsWeekLabels { filter: invert(1); }
body.echo-light #statsTimesChart { filter: invert(1); }
body.echo-light #statsMoodDist   { filter: invert(1); }
body.echo-light #statsWeatherMood{ filter: invert(1); }

/* ── Homescreen: Fakten-Card ────────────────────────────────── */
body.echo-light #homeFactsCard { filter: invert(1) hue-rotate(180deg); border-radius: 16px; }

/* ── Journal: Mood-Chip (hsla hohe Helligkeit → dunkler) ─────── */
body.echo-light .e-chip { filter: saturate(1.3) brightness(0.55) !important; }

/* ── Journal: Tag-Filter Chips ───────────────────────────────── */
body.echo-light .j-tag-pill {
  background: rgba(109,40,217,.12) !important;
  border-color: rgba(109,40,217,.3) !important;
  color: #5b21b6 !important;
}
body.echo-light .j-tag-pill.active {
  background: rgba(109,40,217,.2) !important;
  color: #4c1d95 !important;
}

/* ── Write Screen: Tages-Impuls + Zähler ────────────────────── */
body.echo-light .write-prompt-card {
  background: rgba(109,40,217,.07) !important;
  border-color: rgba(109,40,217,.25) !important;
}
body.echo-light .write-prompt-text  { color: rgba(20,16,42,.82) !important; }
body.echo-light .write-prompt-label { color: rgba(109,40,217,.65) !important; }
body.echo-light #wWordCount { color: rgba(46,34,88,.5) !important; }
body.echo-light .w-date { color: rgba(46,34,88,.5) !important; }
/* AI-Icons im Light-Mode: Bilder brauchen keinen brightness-filter mehr */
body.echo-light .w-ai-icon { filter: grayscale(1) !important; }

/* ── Soul Screen: Inline-Text-Fixes ─────────────────────────── */
/* "DEIN INNERER KOSMOS" + Stats-Zahlen: alle Elemente im Intro-Card */
body.echo-light #screenSoul .gc [style*="color:#a78bfa"],
body.echo-light #screenSoul .gc [style*="color:#67e8f9"],
body.echo-light #screenSoul .gc [style*="color:#ec4899"] {
  filter: brightness(0.55) saturate(1.4);
}
/* Kosmos-Titel + kleine Labels mit rgba(255,255,255,.25) */
body.echo-light #screenSoul [style*="color:rgba(255,255,255,.25)"],
body.echo-light #screenSoul [style*="color:rgba(255,255,255,.3)"],
body.echo-light #screenSoul [style*="color:rgba(167,139,250,.6)"],
body.echo-light #screenSoul [style*="color:rgba(167,139,250,.5)"],
body.echo-light #screenSoul [style*="color:rgba(167,139,250,.4)"] {
  filter: saturate(1.5) brightness(0.45);
}
/* Soul-Quote */
body.echo-light .soul-quote { color: rgba(46,34,88,.65) !important; }
/* Echo Charakter-Profil Badge inner text */
body.echo-light #echoInsightText { color: rgba(46,34,88,.75) !important; }
/* sd-desc links/rechts Pole */
body.echo-light .sd-desc span { filter: brightness(0.55) saturate(1.3); }
/* Achsen-Mittellinie */
body.echo-light #traitBarsSection [style*="rgba(255,255,255,.18)"] { background: rgba(0,0,0,.18) !important; }
/* Relationale Muster Trennlinie */
body.echo-light #traitBarsSection [style*="rgba(255,255,255,.05)"] { background: rgba(0,0,0,.08) !important; }
/* 30-Tage Verlauf Legende */
body.echo-light .radar-hist [style*="rgba(255,255,255,.3)"] { filter: invert(1); }
body.echo-light .radar-hist [style*="rgba(255,255,255,.08)"] { background: rgba(0,0,0,.08) !important; }
body.echo-light .rh-lbl { color: rgba(46,34,88,.55) !important; }

/* ── SAI-Panels: Tages/Wochen/Monats-Impuls-Text ─────────────── */
body.echo-light .sai-panel p,
body.echo-light .sai-state-wrap span:not([style]) { color: rgba(46,34,88,.72) !important; }
body.echo-light .sai-panel p[style*="rgba(200"] { color: rgba(46,34,88,.75) !important; }
/* "Volltext lesen" Button */
body.echo-light .sai-panel button[style*="rgba(167"] { color: #5b21b6 !important; }
/* Footer-Zeile (claude haiku · heute) */
body.echo-light .sai-panel [style*="rgba(255,255,255,.2)"] { color: rgba(46,34,88,.4) !important; }
/* Wochenanalyse-Datum Label */
body.echo-light [style*="color:rgba(167,139,250,.5)"] { filter: saturate(1.3) brightness(0.55); }

/* ── SAI Volltext-Popup ──────────────────────────────────────── */
body.echo-light #saiPopupOverlay {
  background: rgba(109,40,217,.35) !important;
  backdrop-filter: blur(14px) !important;
}
body.echo-light #saiPopupOverlay > div {
  background: linear-gradient(160deg,rgba(255,255,255,.97),rgba(240,235,255,.97)) !important;
  border-color: rgba(109,40,217,.25) !important;
}
body.echo-light #saiPopupLabel { color: #5b21b6 !important; }
body.echo-light #saiPopupBody  { color: rgba(20,16,42,.82) !important; }
body.echo-light #saiPopupOverlay button { color: rgba(46,34,88,.5) !important; }

/* ── Dynamics Popup ──────────────────────────────────────────── */
body.echo-light #dynPopupOverlay {
  background: rgba(109,40,217,.35) !important;
  backdrop-filter: blur(14px) !important;
}
body.echo-light #dynPopupOverlay > div {
  background: linear-gradient(160deg,rgba(255,255,255,.97),rgba(240,235,255,.97)) !important;
  border-color: rgba(109,40,217,.25) !important;
}

/* ── Fakten-Bibliothek + Detail-Popup ───────────────────────── */
body.echo-light #factsLibOverlay {
  background: rgba(240,235,255,.97) !important;
  backdrop-filter: blur(14px) !important;
}
body.echo-light #factsLibOverlay [style*="color:#a78bfa"],
body.echo-light #factsLibOverlay [style*="color:rgba(255,255,255"] {
  filter: brightness(0.5) saturate(1.3);
}
body.echo-light #factDetailPopup {
  background: rgba(109,40,217,.3) !important;
  backdrop-filter: blur(14px) !important;
}
body.echo-light #factDetailPopup > div {
  background: linear-gradient(160deg,rgba(255,255,255,.97),rgba(240,235,255,.97)) !important;
  border-color: rgba(109,40,217,.25) !important;
}
body.echo-light #factDetailPopup [style*="color:rgba(230"] { color: rgba(20,16,42,.9) !important; }
body.echo-light #factDetailPopup [style*="color:rgba(200"] { color: rgba(46,34,88,.7) !important; }
body.echo-light #factDetailPopup [style*="color:rgba(255"] { color: rgba(46,34,88,.45) !important; }
body.echo-light #factDetailPopup [style*="color:#a78bfa"]  { filter: brightness(0.6); }

/* ── Profil: Easter Eggs Zeile ───────────────────────────────── */
body.echo-light #eggCounterRow {
  background: rgba(109,40,217,.07) !important;
  border-color: rgba(109,40,217,.2) !important;
}
body.echo-light #eggCounterRow [style*="rgba(255,255,255,.45)"] { color: rgba(46,34,88,.75) !important; }
body.echo-light #eggCounterRow [style*="rgba(255,255,255,.25)"] { color: rgba(46,34,88,.5) !important; }
body.echo-light #eggCounterVal { color: rgba(109,40,217,.55) !important; }

/* Generische Overlays */
body.echo-light [id$="Popup"],
body.echo-light [id$="Overlay"],
body.echo-light [id$="Screen"] {
  backdrop-filter: blur(12px) !important;
}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{width:100%;height:100%;overflow:hidden;background:var(--bg);font-family:'Rajdhani',sans-serif;color:var(--text);overscroll-behavior:none;}
/* iOS PWA: Inhalt unterhalb der Statusleiste/Notch starten */
body{padding-top:env(safe-area-inset-top);}

/* ===== APP SHELL ===== */
#shell{
  position:relative;width:100%;height:100%;
  display:flex;flex-direction:column;
  max-width:430px;margin:0 auto;
  overflow:hidden;
  padding-bottom: calc(68px + env(safe-area-inset-bottom)); /* iOS: Nav (60px) + 8px */
}

/* ===== LIVING VOID ===== */
#voidCanvas{position:fixed;inset:0;z-index:0;pointer-events:none;}

/* ===== SCREENS ===== */
.screen{
  position:absolute;inset:0;z-index:2;
  display:flex;flex-direction:column;
  overflow:hidden;
  padding-bottom: calc(68px + env(safe-area-inset-bottom)); /* iOS: Nav (60px) + 8px */
  opacity:0;pointer-events:none;
  transition:opacity .35s ease, transform .35s cubic-bezier(.4,0,.2,1);
  transform:translateX(30px);
}
.screen.active{opacity:1;pointer-events:all;transform:translateX(0);}
.screen.exit-left{opacity:0;transform:translateX(-30px);}

.scroll-area{
  flex:1;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding-bottom:16px;
}
.scroll-area::-webkit-scrollbar{display:none;}

/* ===== STATUS BAR ===== */
.sb{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 20px 6px;flex-shrink:0;
  font-size:12px;color:var(--text-dim);
  position:relative;z-index:5;
}
.sb-time{font-weight:700;font-size:13px;color:var(--text);}

/* ===== BOTTOM NAV ===== */
#bottomNav{
  position:fixed;bottom:0;left:0;right:0;z-index:20;
  background:rgba(8,6,16,0.92);
  border-top:1px solid var(--glass-b);
  backdrop-filter:blur(24px);
  display:flex;justify-content:space-around;align-items:center;
  padding-top:8px;
  padding-bottom:env(safe-area-inset-bottom);
  min-height:60px;
  flex-shrink:0;
}
.nav-btn{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  cursor:pointer;padding:6px 14px;opacity:.45;
  min-height:44px;
  transition:opacity .2s,transform .2s;
  position:relative;border:none;background:none;color:var(--text);
}
.nav-btn.on{opacity:1;}
.nav-btn.on .nav-lbl{color:var(--purple-l);}
.nav-btn:active{transform:scale(.92);}
.nav-ico{font-size:21px;line-height:1;}
.nav-lbl{font-size:9px;letter-spacing:1.5px;text-transform:uppercase;}
.nav-dot{
  position:absolute;top:2px;right:10px;
  width:7px;height:7px;border-radius:50%;
  background:var(--pink);border:1.5px solid var(--bg);
  animation:pulse2 2s infinite;
}
@keyframes pulse2{0%,100%{transform:scale(1);}50%{transform:scale(1.4);}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fadeInUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@keyframes tourPulse{0%,100%{box-shadow:0 0 0 100vmax rgba(0,0,0,.80),0 0 0 3px rgba(167,139,250,.95)}50%{box-shadow:0 0 0 100vmax rgba(0,0,0,.80),0 0 0 7px rgba(167,139,250,.25)}}
@keyframes slideUpIn{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes slideDownIn{from{transform:translateY(-100%)}to{transform:translateY(0)}}
@keyframes moodWarnFlash{0%,100%{border-color:rgba(167,139,250,.2);box-shadow:none}25%,75%{border-color:rgba(239,68,68,.8);box-shadow:0 0 12px rgba(239,68,68,.45)}50%{border-color:rgba(239,68,68,.5);box-shadow:0 0 6px rgba(239,68,68,.25)}}
.mood-warn{animation:moodWarnFlash .55s ease 2;}

/* ===== FAB ===== */
#fab{
  position:absolute;right:18px;z-index:21;
  width:54px;height:54px;border-radius:50%;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  border:none;color:#fff;font-size:24px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 20px rgba(124,58,237,.5),0 0 40px rgba(6,182,212,.2);
  transition:all .2s;
  animation:fabFloat 3s ease-in-out infinite;
}
@keyframes fabFloat{0%,100%{transform:translateY(0);}50%{transform:translateY(-5px);}}
#fab:active{transform:scale(.92)!important;animation:none;}

/* ===== GLASS CARD ===== */
.gc{
  background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(6,182,212,.03));
  border:1px solid rgba(124,58,237,.18);
  border-radius:20px;
  position:relative;overflow:hidden;
}
.gc::before{
  content:'';position:absolute;top:0;left:0;right:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(167,139,250,.2),transparent);
}

/* ===== SECTION HEADER ===== */
.sh{
  display:flex;justify-content:space-between;align-items:center;
  padding:4px 20px 10px;
}
.sh-title{font-size:10px;letter-spacing:3px;text-transform:uppercase;color:var(--text-dim);}
.sh-link{font-size:12px;color:var(--purple-l);cursor:pointer;letter-spacing:.5px;}

/* ===== TYPOGRAPHY ===== */
.lora{font-family:'Lora',serif;}
.lora-i{font-family:'Lora',serif;font-style:italic;}
.grad-text{
  background:linear-gradient(135deg,var(--purple-l),var(--cyan-l));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;
}

/* =========================================
   ONBOARDING
   ========================================= */
#screenOnboard{background:var(--bg);}
.ob-wrap{
  flex:1;display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  padding:40px 32px;gap:0;
}
.ob-slides{width:100%;position:relative;height:320px;}
.ob-slide{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:20px;
  opacity:0;transform:translateX(40px);
  transition:all .5s cubic-bezier(.4,0,.2,1);pointer-events:none;
}
.ob-slide.show{opacity:1;transform:translateX(0);pointer-events:all;}
.ob-slide.hide-l{opacity:0;transform:translateX(-40px);}
.ob-emoji{font-size:72px;filter:drop-shadow(0 0 30px rgba(124,58,237,.6));
  animation:obFloat 3s ease-in-out infinite;}
@keyframes obFloat{0%,100%{transform:translateY(0);}50%{transform:translateY(-12px);}}
.ob-title{font-family:'Lora',serif;font-weight:700;font-size:26px;text-align:center;line-height:1.3;}
.ob-sub{font-family:'Lora',serif;font-style:italic;font-size:15px;color:var(--text-mid);text-align:center;line-height:1.7;}
.ob-dots{display:flex;gap:8px;margin-top:24px;}
.ob-dot{width:8px;height:8px;border-radius:50%;background:var(--glass-b);transition:all .3s;}
.ob-dot.on{width:24px;border-radius:4px;background:var(--purple-l);}
.ob-name-wrap{width:100%;margin-top:12px;}
.ob-input{
  width:100%;background:var(--glass);border:1px solid var(--glass-b);
  border-radius:14px;padding:14px 18px;
  color:var(--text);font-family:'Lora',serif;font-size:16px;
  outline:none;text-align:center;
  transition:border-color .2s;
}
.ob-input:focus{border-color:var(--primary-glow);}
.ob-input::placeholder{color:var(--text-dim);font-style:italic;}
.ob-btn{
  width:100%;margin-top:16px;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  border:none;border-radius:14px;padding:15px;
  color:#fff;font-family:'Rajdhani';font-weight:700;
  font-size:15px;letter-spacing:2px;cursor:pointer;
  box-shadow:0 4px 20px rgba(124,58,237,.4);
  transition:all .2s;
}
.ob-btn:active{transform:scale(.97);}
.ob-skip{
  background:none;border:none;color:var(--text-dim);
  font-family:'Rajdhani';font-size:13px;letter-spacing:1px;
  cursor:pointer;margin-top:10px;padding:8px;
}

/* =========================================
   HOME
   ========================================= */
.home-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:4px 20px 14px;
}
.home-greeting{font-size:12px;color:var(--text-dim);margin-bottom:2px;font-style:italic;}
.home-name{font-family:'Lora',serif;font-weight:700;font-size:26px;}
.avatar-btn{
  width:46px;height:46px;border-radius:50%;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  display:flex;align-items:center;justify-content:center;
  font-size:20px;cursor:pointer;border:2px solid var(--glass-b);
  box-shadow:0 0 20px rgba(124,58,237,.4);position:relative;
  flex-shrink:0;
}
.avatar-lvl{
  position:absolute;bottom:-3px;right:-3px;
  background:var(--gold);color:#000;
  border-radius:50%;width:18px;height:18px;
  font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;
}

/* Mood card — Glass/Shimmer wie Schreibanregung */
.mood-card {
  margin:0 16px 14px; padding:18px;
  background:linear-gradient(135deg,rgba(124,58,237,.1),rgba(6,182,212,.06));
  border:1px solid rgba(124,58,237,.25); border-radius:20px;
  backdrop-filter:blur(12px); position:relative; overflow:hidden;
  cursor:pointer; transition:border-color .2s;
}
.mood-card:hover, .mood-card:active { border-color:rgba(124,58,237,.5); }
.mood-card::before {
  content:''; position:absolute; top:-50%; left:-50%;
  width:30%; height:200%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.05),transparent);
  transform:skewX(-20deg);
  animation:impShimmer 10s ease-in-out infinite;
  animation-delay:5s;
}
.mood-card::after {
  content:''; position:absolute; top:-20px; left:-20px;
  width:80px; height:80px; border-radius:50%;
  background:radial-gradient(circle,rgba(124,58,237,.12),transparent 70%);
  pointer-events:none;
}
.mood-lbl{font-size:10px;letter-spacing:3px;color:var(--text-dim);text-transform:uppercase;margin-bottom:14px;}
.slider-wrap{position:relative;height:44px;margin-bottom:12px;}
.s-bg{position:absolute;top:50%;transform:translateY(-50%);width:100%;height:6px;border-radius:3px;background:rgba(255,255,255,.07);}
.s-fill{position:absolute;top:50%;transform:translateY(-50%);height:6px;border-radius:3px;
  background:linear-gradient(90deg,var(--primary-glow),var(--cyan));
  box-shadow:0 0 10px rgba(6,182,212,.4);transition:width .1s;}
.s-thumb{
  position:absolute;top:50%;transform:translate(-50%,-50%);
  width:30px;height:30px;border-radius:50%;background:#fff;
  box-shadow:0 0 0 3px var(--cyan),0 0 18px rgba(6,182,212,.5);
  cursor:grab;display:flex;align-items:center;justify-content:center;font-size:15px;
  transition:left .1s;
}
.mood-range-lbl{display:flex;justify-content:space-between;font-size:10px;color:var(--text-dim);}
.write-prompt{
  width:100%;margin-top:14px;
  background:linear-gradient(135deg,rgba(124,58,237,.18),rgba(6,182,212,.1));
  border:1px solid rgba(124,58,237,.3);
  border-radius:13px;padding:13px 16px;
  color:var(--text-dim);font-family:'Lora',serif;font-style:italic;font-size:14px;
  text-align:left;cursor:pointer;display:flex;align-items:center;gap:10px;
  transition:all .2s;
}
.write-prompt:hover{border-color:rgba(124,58,237,.6);color:var(--text);}

/* Quick stats row */
.qstats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 16px 14px;}
.qstat{
  padding:14px 16px;border-radius:20px;
  background:linear-gradient(135deg,rgba(124,58,237,.1),rgba(6,182,212,.05));
  border:1px solid rgba(124,58,237,.22);
  position:relative;overflow:hidden;
  backdrop-filter:blur(12px);
}
.qstat::after{
  content:'';position:absolute;top:-16px;right:-16px;
  width:60px;height:60px;border-radius:50%;
  background:radial-gradient(circle,rgba(6,182,212,.1),transparent 70%);
  pointer-events:none;
}
.qstat-ico{font-size:20px;margin-bottom:4px;position:relative;z-index:1;}
.qstat-val{font-family:'Lora',serif;font-weight:700;font-size:24px;line-height:1;position:relative;z-index:1;}
.qstat-lbl{font-size:9px;letter-spacing:2px;color:var(--text-dim);text-transform:uppercase;margin-top:3px;position:relative;z-index:1;}
.xp-mini{margin-top:8px;}
.xp-bg{height:3px;background:rgba(255,255,255,.07);border-radius:2px;}
.xp-fill{height:3px;border-radius:2px;background:linear-gradient(90deg,var(--primary-glow),var(--cyan));
  box-shadow:0 0 6px var(--cyan);transition:width 1.5s ease;}
.xp-txt{font-size:9px;color:var(--text-dim);margin-top:3px;letter-spacing:1px;}

/* AI Impulse */
.impulse{
  margin:0 16px 14px;padding:18px;
  background:linear-gradient(135deg,rgba(124,58,237,.1),rgba(6,182,212,.06));
  border:1px solid rgba(124,58,237,.25);border-radius:20px;
  backdrop-filter:blur(12px);position:relative;overflow:hidden;
}
.impulse::after{
  content:'';position:absolute;top:-20px;right:-20px;
  width:80px;height:80px;border-radius:50%;
  background:radial-gradient(circle,rgba(6,182,212,.12),transparent 70%);
}
.imp-hdr{display:flex;gap:10px;align-items:center;margin-bottom:10px;}
.imp-orb{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  display:flex;align-items:center;justify-content:center;font-size:17px;
  box-shadow:0 0 16px rgba(124,58,237,.4);
}
.imp-tag{font-size:9px;letter-spacing:3px;color:var(--cyan-l);text-transform:uppercase;}
.imp-ttl{font-family:'Lora',serif;font-weight:600;font-size:14px;}
.imp-txt{font-family:'Lora',serif;font-style:italic;font-size:13px;color:var(--text-mid);line-height:1.7;}

/* Entry preview cards */
.entry{
  margin:0 16px 12px;padding:18px 18px 14px;border-radius:18px;
  cursor:pointer;transition:all .2s;position:relative;overflow:hidden;
}
.entry:hover{transform:translateY(-2px);box-shadow:0 8px 30px rgba(124,58,237,.15);}
.entry:active{transform:scale(.98);}
.entry-stripe{
  position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 2px 2px 0;
}
.e-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.e-date{font-size:10px;color:var(--text-dim);letter-spacing:2px;}
.e-chip{
  display:flex;align-items:center;gap:4px;
  background:rgba(255,255,255,.05);border-radius:20px;padding:3px 9px;
  font-size:10px;
}
.e-title{font-family:'Lora',serif;font-weight:600;font-size:15px;margin-bottom:5px;}
.e-preview{font-size:12px;color:var(--text-dim);line-height:1.6;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.e-tags{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap;}
.tag{
  background:rgba(124,58,237,.12);border:1px solid rgba(124,58,237,.22);
  border-radius:20px;padding:2px 9px;font-size:9px;color:var(--purple-l);letter-spacing:1px;
}

/* =========================================
   JOURNAL SCREEN
   ========================================= */
.j-header{padding:4px 20px 16px;display:flex;justify-content:space-between;align-items:center;}
.j-title{font-family:'Lora',serif;font-weight:700;font-size:26px;}
.j-count{font-size:11px;color:var(--text-dim);letter-spacing:2px;margin-top:2px;}
.j-context{font-family:'Lora',serif;font-style:italic;font-size:12px;color:rgba(200,184,224,.42);margin-top:3px;line-height:1.4;}
.j-context em{font-style:normal;color:rgba(200,184,224,.7);}
.j-words-badge{font-family:'Rajdhani',sans-serif;font-size:11px;letter-spacing:1px;color:rgba(255,255,255,.22);}
.j-search{
  margin:0 16px 16px;
  background:var(--glass);border:1px solid var(--glass-b);
  border-radius:13px;padding:11px 16px;
  display:flex;align-items:center;gap:10px;
}
.j-search input{
  flex:1;background:none;border:none;color:var(--text);
  font-family:'Rajdhani';font-size:14px;outline:none;
}
.j-search input::placeholder{color:var(--text-dim);}
.j-search.focused{border-color:rgba(167,139,250,.35);background:rgba(167,139,250,.06);}

/* Month group */
.month-hdr{display:flex;align-items:center;gap:10px;padding:16px 20px 8px;}
.month-hdr-line{flex:1;height:1px;background:rgba(255,255,255,.06);}
.month-hdr-label{display:flex;align-items:center;gap:6px;flex-shrink:0;}
.month-mood-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;}
.month-hdr-name{font-family:'Cinzel',serif;font-size:9px;letter-spacing:2px;color:rgba(200,184,224,.4);text-transform:uppercase;}
.month-hdr-count{font-family:'Rajdhani',sans-serif;font-size:9px;letter-spacing:.5px;color:rgba(255,255,255,.25);background:rgba(255,255,255,.05);border-radius:10px;padding:1px 7px;}

/* =========================================
   WRITE SCREEN
   ========================================= */
#screenWrite{background:transparent;}
.w-header{
  display:flex;justify-content:space-between;align-items:center;
  padding:8px 20px 14px;
}
.w-back{
  background:none;border:none;cursor:pointer;
  font-size:13px;font-weight:600;letter-spacing:1px;
  color:var(--text-dim);font-family:'Rajdhani',sans-serif;
  transition:color .2s;padding:4px 2px;
}
.w-back:hover{color:var(--purple-l);}
.w-save{
  background:linear-gradient(90deg,rgba(124,58,237,.22),rgba(236,72,153,.12));
  border:1px solid rgba(167,139,250,.35);border-radius:20px;padding:8px 16px;
  color:var(--purple-l);font-family:'Rajdhani';font-weight:700;
  font-size:12px;letter-spacing:1.5px;cursor:pointer;
  transition:all .2s;
}
.w-save:hover{border-color:rgba(167,139,250,.6);background:linear-gradient(90deg,rgba(124,58,237,.3),rgba(236,72,153,.18));}
.w-save:active{transform:scale(.95);}
/* ── Zeitkapsel ──────────────────────────────────────────── */
.w-capsule-btn{
  background:none;border:1px solid rgba(255,255,255,.1);
  border-radius:10px;padding:7px 11px;cursor:pointer;
  font-size:11px;letter-spacing:.8px;color:rgba(255,255,255,.35);
  font-family:'Rajdhani',sans-serif;transition:all .2s;
}
.w-capsule-btn:hover{border-color:rgba(245,158,11,.35);color:rgba(245,158,11,.7);}
.w-capsule-btn.active{
  background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.5);
  color:rgba(245,158,11,.95);
}
.capsule-selector{
  display:flex;align-items:center;gap:8px;
  padding:10px 16px 4px;flex-wrap:wrap;
}
.capsule-sel-label{
  font-family:'Rajdhani',sans-serif;font-size:10px;
  letter-spacing:1.5px;color:rgba(245,158,11,.6);
  text-transform:uppercase;margin-right:2px;
}
.capsule-chip{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;padding:5px 12px;
  color:rgba(255,255,255,.4);
  font-family:'Rajdhani',sans-serif;font-size:11px;
  letter-spacing:.8px;cursor:pointer;transition:all .2s;
}
.capsule-chip.sel{
  background:rgba(245,158,11,.15);border-color:rgba(245,158,11,.5);
  color:rgba(245,158,11,.95);
}
/* Versiegelte Karte im Journal */
.entry-capsule{
  background:linear-gradient(135deg,rgba(245,158,11,.06),rgba(245,158,11,.03));
  border:1px solid rgba(245,158,11,.2);
  border-left:3px solid rgba(245,158,11,.55);
}
.w-date{padding:0 20px 6px;font-size:10px;color:var(--text-dim);letter-spacing:2px;}
.w-title-input{
  width:100%;background:none;border:none;
  padding:6px 20px 12px;
  color:var(--text);font-family:'Lora',serif;font-weight:700;font-size:24px;
  outline:none;
}
.w-title-input::placeholder{color:rgba(255,255,255,.12);font-style:italic;}
/* ── Wetter Write-Screen ─────────────────────────────────── */
.w-weather-badge{
  display:flex;align-items:center;gap:4px;
  font-family:'Rajdhani',sans-serif;font-size:10px;
  letter-spacing:.8px;color:rgba(255,255,255,.3);
}
.w-weather-icon{font-size:13px;line-height:1;}
.w-weather-temp{color:rgba(255,255,255,.45);}
.w-weather-label{color:rgba(255,255,255,.22);}
/* Wetter in Entry-Karten */
.entry-weather-badge{
  font-size:9px;color:rgba(255,255,255,.28);
  font-family:'Rajdhani',sans-serif;letter-spacing:.5px;
  margin-right:2px;
}
.w-divider{height:1px;background:var(--glass-b);margin:0 20px 14px;}
.w-body{
  width:100%;background:none;border:none;
  padding:0 20px;color:var(--text);
  font-family:'Lora',serif;font-size:15px;line-height:1.85;
  outline:none;resize:none;min-height:200px;
  overflow:hidden;box-sizing:border-box;
}
.w-body::placeholder{color:rgba(255,255,255,.18);font-style:italic;}
/* Mobile: Textarea auf max-height begrenzen + intern scrollbar
   → verhindert das "Sprung zum Cursor"-Problem bei langen Texten */
@media (max-width: 768px) {
  .w-body {
    max-height: 55vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
.w-mood-row{
  display:flex;align-items:center;gap:10px;
  padding:14px 20px;margin-top:8px;
}
.w-mood-lbl{font-size:11px;color:var(--text-dim);letter-spacing:2px;text-transform:uppercase;}
.mood-chips{display:flex;gap:6px;flex-wrap:wrap;}
.mood-chip{
  background:var(--glass);border:1px solid var(--glass-b);
  border-radius:20px;padding:5px 12px;font-size:13px;cursor:pointer;
  transition:all .15s;
}
.mood-chip.sel{
  background:rgba(124,58,237,.3);border-color:#a78bfa;
  box-shadow:0 0 14px rgba(124,58,237,.55), 0 0 4px rgba(167,139,250,.4);
  color:#fff;transform:scale(1.08);
}
.sleep-chips,.energy-chips{display:flex;gap:6px;}
.sleep-chip,.energy-chip{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:8px 4px;border-radius:12px;font-size:20px;cursor:pointer;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);
  transition:all .2s;user-select:none;
}
.sleep-chip.sel{
  background:rgba(6,182,212,.25);border-color:rgba(6,182,212,.8);
  box-shadow:0 0 16px rgba(6,182,212,.45), 0 0 4px rgba(6,182,212,.3);
  transform:scale(1.1);
}
.energy-chip.sel{
  background:rgba(245,158,11,.25);border-color:rgba(245,158,11,.8);
  box-shadow:0 0 16px rgba(245,158,11,.45), 0 0 4px rgba(245,158,11,.3);
  transform:scale(1.1);
}
/* ── MSE Pill ────────────────────────────────────────────── */
.mse-pill{
  display:inline-flex;align-items:center;gap:10px;
  background:transparent;border:none;
  padding:8px 4px;cursor:pointer;
  color:rgba(255,255,255,.45);font-family:'Rajdhani',sans-serif;
  font-size:14px;font-weight:600;letter-spacing:.5px;
  transition:all .2s;
}
.mse-pill.has-selection{color:rgba(255,255,255,.9);}
.mse-pill-sep{color:rgba(255,255,255,.15);}
.mse-pill-arrow{color:rgba(255,255,255,.2);font-size:13px;margin-left:2px;}
/* ── Tages-Impuls ────────────────────────────────────────── */
.write-prompt-card{
  position:relative;
  background:rgba(167,139,250,.06);
  border:1px solid rgba(167,139,250,.14);
  border-left:3px solid rgba(167,139,250,.45);
  border-radius:12px;
  padding:11px 40px 11px 14px;
  margin:0 16px 14px;
}
.write-prompt-label{
  display:block;
  font-family:'Rajdhani',sans-serif;
  font-size:9px;letter-spacing:2px;
  color:rgba(167,139,250,.55);
  text-transform:uppercase;
  margin-bottom:5px;
}
.write-prompt-text{
  font-size:13.5px;
  color:rgba(255,255,255,.72);
  line-height:1.55;
  transition:opacity .16s ease, transform .16s ease;
}
.write-prompt-shuffle{
  background:none;border:none;
  color:rgba(167,139,250,.4);
  font-size:17px;cursor:pointer;
  padding:2px 5px;border-radius:6px;
  transition:color .2s, transform .2s;
  line-height:1;
}
.write-prompt-shuffle:hover{color:rgba(167,139,250,.9);transform:rotate(90deg);}
#wPromptCollapseBtn:hover{color:rgba(167,139,250,.8);}
/* ── Guided Session Templates ────────────────────────────── */
.write-templates-row{
  display:flex;gap:6px;overflow-x:auto;padding:0 16px 14px;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.write-templates-row::-webkit-scrollbar{display:none;}
.wt-chip{
  flex-shrink:0;padding:6px 13px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);
  color:rgba(255,255,255,.45);border-radius:20px;cursor:pointer;
  font-family:'Rajdhani',sans-serif;font-size:11px;font-weight:700;letter-spacing:.5px;
  white-space:nowrap;transition:all .2s;
}
.wt-chip:hover{background:rgba(167,139,250,.1);border-color:rgba(167,139,250,.3);color:rgba(167,139,250,.8);}
.wt-chip.active{background:rgba(167,139,250,.15);border-color:rgba(167,139,250,.5);color:#a78bfa;}
/* ── Voice-to-Text ───────────────────────────────────────── */
.voice-mic-btn{
  display:flex;align-items:center;gap:7px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;padding:8px 18px;
  color:rgba(255,255,255,.35);
  font-family:'Rajdhani',sans-serif;
  font-size:12px;letter-spacing:1.2px;
  cursor:pointer;transition:all .2s;
}
.voice-mic-btn:hover{
  background:rgba(167,139,250,.08);
  border-color:rgba(167,139,250,.25);
  color:rgba(255,255,255,.6);
}
.voice-mic-btn.recording{
  background:rgba(239,68,68,.1);
  border-color:rgba(239,68,68,.45);
  color:rgba(239,68,68,.9);
  animation:voicePulse 1.4s ease-in-out infinite;
}
.voice-mic-icon{font-size:15px;line-height:1;}

/* ── Soul-Screen: Panel-Gewichtshierarchie ───────────────────── */
.sai-panel--weekly{
  padding:18px 20px !important;
  border-color:rgba(167,139,250,.16) !important;
}
.sai-panel--monthly{
  border-color:rgba(236,72,153,.2) !important;
  background:linear-gradient(135deg,rgba(124,58,237,.07),rgba(236,72,153,.06)) !important;
  position:relative;overflow:hidden;
}
.sai-panel--monthly::before{
  content:'';position:absolute;top:0;left:15%;right:15%;height:1px;
  background:linear-gradient(to right,transparent,rgba(236,72,153,.35),transparent);
}
.section-breath{
  border:none;border-top:1px solid rgba(167,139,250,.07);
  margin:8px 20px 18px;
}

/* ── Home: Kontext-Satz unter dem Namen ───────────────────────── */
.home-context{
  display:flex;align-items:center;gap:6px;
  font-family:'Rajdhani',sans-serif;font-size:11px;font-weight:600;
  letter-spacing:.5px;color:var(--text-dim);margin-top:5px;
}
.home-context-dot{
  width:5px;height:5px;border-radius:50%;flex-shrink:0;
  background:var(--ctx-color,var(--purple-l));
  box-shadow:0 0 6px var(--ctx-color,var(--purple-l));
}
.home-context em{font-style:normal;color:var(--ctx-color,var(--purple-l));}

/* ── Mood-Card: dominanter CTA ────────────────────────────────── */
.mood-card-arrow{
  margin-left:auto;width:32px;height:32px;border-radius:50%;flex-shrink:0;
  border:1px solid rgba(167,139,250,.25);
  display:flex;align-items:center;justify-content:center;
}
.mood-card-arrow svg{
  width:14px;height:14px;stroke:rgba(167,139,250,.5);
  fill:none;stroke-width:2;stroke-linecap:round;
}

/* ── Impulse: sekundär, horizontaler KI-Stil ──────────────────── */
.impulse-body{flex:1;}
.impulse-edit{flex-shrink:0;margin-top:2px;opacity:.3;}
.impulse-edit svg{width:14px;height:14px;stroke:var(--text-mid);fill:none;stroke-width:1.5;stroke-linecap:round;}

/* ── Entry Cards: Mood-Atmosphäre ─────────────────────────────── */
.entry.mood-high{
  background:linear-gradient(135deg,rgba(16,185,129,.06),rgba(6,182,212,.02));
  border-color:rgba(16,185,129,.18);
}
.entry.mood-mid{
  background:linear-gradient(135deg,rgba(245,158,11,.05),rgba(124,58,237,.03));
  border-color:rgba(245,158,11,.15);
}
.entry.mood-low{
  background:linear-gradient(135deg,rgba(236,72,153,.05),rgba(124,58,237,.03));
  border-color:rgba(236,72,153,.15);
}
.entry.mood-neutral{
  background:linear-gradient(135deg,rgba(124,58,237,.06),rgba(6,182,212,.02));
  border-color:rgba(124,58,237,.14);
}
/* Stripe-Farben per Mood-Klasse */
.entry.mood-high .entry-stripe{background:linear-gradient(to bottom,#10b981,rgba(16,185,129,.3));}
.entry.mood-mid  .entry-stripe{background:linear-gradient(to bottom,#f59e0b,rgba(245,158,11,.3));}
.entry.mood-low  .entry-stripe{background:linear-gradient(to bottom,#ec4899,rgba(236,72,153,.3));}
.entry.mood-neutral .entry-stripe{background:linear-gradient(to bottom,#a78bfa,rgba(167,139,250,.3));}
/* Mood-Chips farbig */
.e-chip.chip-high{background:rgba(16,185,129,.12);border:1px solid rgba(16,185,129,.25);color:rgba(16,185,129,.9);}
.e-chip.chip-mid {background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.25);color:rgba(245,158,11,.9);}
.e-chip.chip-low {background:rgba(236,72,153,.1); border:1px solid rgba(236,72,153,.22);color:rgba(236,72,153,.9);}
.e-chip.chip-neutral{background:rgba(167,139,250,.1);border:1px solid rgba(167,139,250,.2);color:rgba(167,139,250,.8);}

/* ── Premium Teaser: Neugier statt Feature-Liste ──────────────── */
.premium-teaser-inner{
  padding:16px 18px;
  background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(236,72,153,.05));
  border:1px solid rgba(124,58,237,.2);border-radius:16px;
  position:relative;overflow:hidden;
  display:flex;align-items:center;gap:14px;
  cursor:pointer;transition:border-color .2s;
}
.premium-teaser-inner:active{border-color:rgba(124,58,237,.4);}
.premium-teaser-inner::before{
  content:'';position:absolute;top:0;left:20%;right:20%;height:1px;
  background:linear-gradient(to right,transparent,rgba(167,139,250,.3),transparent);
}
.premium-teaser-symbol{
  font-family:'Cinzel',serif;font-size:22px;
  color:rgba(167,139,250,.3);flex-shrink:0;line-height:1;
}
.premium-teaser-body{flex:1;}
.premium-teaser-question{
  font-family:'Lora',serif;font-style:italic;font-size:14px;
  line-height:1.55;color:rgba(200,184,224,.75);margin-bottom:8px;
}
.premium-teaser-question em{font-style:normal;color:var(--purple-l);}
.premium-teaser-cta{
  font-family:'Rajdhani',sans-serif;font-size:10px;font-weight:700;
  letter-spacing:1.5px;text-transform:uppercase;color:rgba(167,139,250,.6);
}
.premium-teaser-cta::after{content:' ›';font-size:14px;line-height:1;}

/* ── Write-Screen: Fokus-Modus ───────────────────────────────── */
.write-meta-row{
  transition:opacity .35s ease,transform .35s ease;
}
.scroll-area.writing .write-meta-row{
  opacity:.4;transform:translateY(-2px);pointer-events:none;
}
.scroll-area:not(.writing) .write-meta-row{
  opacity:1;transform:translateY(0);pointer-events:auto;
}
.scroll-area.writing #wWordCount{color:rgba(255,255,255,.3);}
.scroll-area.words-60 #wWordCount{color:rgba(167,139,250,.55);}

/* ── KI-Feature-Indikatoren (Wort-Counter) ──────────────────── */
.w-ai-icon{
  display:inline-block;font-size:15px;line-height:1;
  filter:grayscale(1);opacity:.25;
  transition:filter .5s ease,opacity .5s ease;
  cursor:default;user-select:none;vertical-align:middle;
}
@keyframes aiIconPop{
  0%  {transform:scale(1);}
  40% {transform:scale(1.5);}
  70% {transform:scale(.88);}
  100%{transform:scale(1);}
}
.ai-icon-pop{animation:aiIconPop .45s cubic-bezier(.36,.07,.19,.97);}
/* ── Zeitkapsel-Animations ──────────────────────────────────────── */
@keyframes capsuleBounce{
  0%  {transform:scale(0);opacity:0;}
  60% {transform:scale(1.25);}
  80% {transform:scale(.92);}
  100%{transform:scale(1);opacity:1;}
}
@keyframes capsuleFloat{
  0%   {transform:translateY(0);opacity:.6;}
  100% {transform:translateY(-120vh) rotate(15deg);opacity:0;}
}
@keyframes capsulePulse{
  0%,100%{box-shadow:0 8px 30px rgba(251,191,36,.35);}
  50%    {box-shadow:0 8px 44px rgba(251,191,36,.65);}
}
@keyframes voicePulse{
  0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.35);}
  50%{box-shadow:0 0 0 7px rgba(239,68,68,0);}
}
/* ── SoulAI Panels ───────────────────────────────────────── */
.sai-panel{min-height:80px;}
.sai-state-wrap{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px 0;}
.sai-spinner{
  width:20px;height:20px;
  border:2px solid rgba(167,139,250,.2);
  border-top-color:rgba(167,139,250,.8);
  border-radius:50%;
  animation:saiSpin .8s linear infinite;
}
@keyframes saiSpin{to{transform:rotate(360deg);}}
.sai-impulse-badge{
  display:none;gap:8px;align-items:flex-start;
  padding:10px 14px;
  background:rgba(167,139,250,.06);
  border:1px solid rgba(167,139,250,.15);
  border-radius:10px;margin-top:8px;width:100%;box-sizing:border-box;
}
.sai-badge-icon{flex-shrink:0;font-size:13px;}
.sai-badge-text{
  font-size:11px;color:rgba(200,184,224,.65);
  font-style:italic;line-height:1.5;font-family:'Lora',serif;
}
/* ── Avatar Pulse Animation ─────────────────────────────── */
@keyframes sePulse {
  0%,100% { transform:scale(1);   opacity:.5; }
  50%      { transform:scale(1.08);opacity:.15; }
}
/* ── Entry Detail — Redesign ─────────────────────────────── */
.ed-mood-bar{height:3px;border-radius:2px;margin-bottom:16px;background:linear-gradient(90deg,rgba(124,58,237,.5),rgba(124,58,237,.1));}
.ed-meta-chip{display:inline-flex;align-items:center;gap:3px;font-family:'Rajdhani',sans-serif;font-size:11px;font-weight:700;letter-spacing:.4px;padding:3px 9px;border-radius:20px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);color:rgba(200,184,224,.65);}
.ed-ki-divider{display:flex;align-items:center;gap:10px;margin:20px 0 12px;}
.ed-ki-divider::before,.ed-ki-divider::after{content:'';flex:1;height:1px;background:rgba(167,139,250,.12);}
.ed-ki-header{font-family:'Rajdhani',sans-serif;font-size:9px;letter-spacing:2px;color:rgba(167,139,250,.4);flex-shrink:0;}
.ed-impulse-text{font-family:'Lora',serif;font-size:13px;line-height:1.8;color:rgba(200,184,224,.75);font-style:italic;border-left:2px solid rgba(167,139,250,.22);padding-left:14px;margin-bottom:16px;}
.ed-deep-btn{width:100%;padding:12px;margin-bottom:10px;background:linear-gradient(90deg,rgba(124,58,237,.12),rgba(236,72,153,.08));border:1px solid rgba(167,139,250,.3);color:#a78bfa;border-radius:14px;cursor:pointer;font-family:'Rajdhani',sans-serif;font-size:12px;font-weight:700;letter-spacing:1px;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:8px;}
.ed-deep-btn:hover{background:linear-gradient(90deg,rgba(124,58,237,.2),rgba(236,72,153,.14));border-color:rgba(167,139,250,.5);}
.ed-deep-btn.ed-deep-disabled{background:rgba(255,255,255,.03);border-color:rgba(255,255,255,.07);color:rgba(255,255,255,.25);cursor:default;}

/* ── Echo-Dialog Chat ────────────────────────────────────── */
.ed-bubble-ai{
  font-family:'Lora',serif;font-size:13px;line-height:1.75;
  color:rgba(200,184,224,.85);font-style:italic;
  background:rgba(167,139,250,.06);border:1px solid rgba(167,139,250,.12);
  border-radius:0 12px 12px 12px;padding:10px 14px;margin-bottom:10px;
}
.ed-bubble-user{
  font-family:'Lora',serif;font-size:13px;line-height:1.75;
  color:rgba(220,210,240,.7);
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);
  border-radius:12px 0 12px 12px;padding:10px 14px;margin-bottom:10px;
  text-align:right;
}
.ed-dialog-input{
  width:100%;background:rgba(255,255,255,.04);
  border:1px solid rgba(167,139,250,.2);border-radius:10px;
  color:rgba(220,200,240,.85);font-family:'Lora',serif;
  font-size:13px;line-height:1.6;padding:10px 12px;margin-bottom:8px;
  resize:none;outline:none;box-sizing:border-box;
}
.ed-dialog-input:focus{border-color:rgba(167,139,250,.45);}
/* ── Echo-Bubble (Resonanz Write Anchor) ─────────────────── */
.echo-bubble{
  position:fixed;bottom:88px;right:16px;z-index:500;
  display:flex;flex-direction:column;align-items:flex-end;gap:8px;
}
.echo-bubble__icon{
  width:44px;height:44px;border-radius:50%;
  background:linear-gradient(135deg,rgba(109,40,217,.55),rgba(139,92,246,.32));
  border:1px solid rgba(139,92,246,.5);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;box-shadow:0 4px 18px rgba(109,40,217,.28);
  flex-shrink:0;transition:transform .18s;
}
.echo-bubble__icon:active{transform:scale(.9);}
.echo-bubble__panel{
  max-width:220px;
  background:rgba(10,7,24,.94);
  border:1px solid rgba(139,92,246,.28);
  border-radius:14px 0 14px 14px;
  padding:12px 14px;
  transform-origin:bottom right;
  transform:scale(0) translateY(8px);
  opacity:0;
  transition:transform .28s cubic-bezier(.34,1.56,.64,1),opacity .2s;
}
.echo-bubble--open .echo-bubble__panel{
  transform:scale(1) translateY(0);
  opacity:1;
}
.echo-bubble__question{
  font-family:'Lora',serif;font-size:13px;line-height:1.7;
  color:rgba(220,200,248,.82);font-style:italic;margin-bottom:8px;
}
.echo-bubble__hint{
  font-family:'Rajdhani',sans-serif;font-size:9px;letter-spacing:1.5px;
  color:rgba(139,92,246,.5);text-transform:uppercase;
}
/* ── Check-In Sheet Chips ────────────────────────────────── */
.ci-chip{
  flex:1;display:flex;flex-direction:column;align-items:center;
  gap:3px;padding:10px 4px;border-radius:12px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);
  cursor:pointer;transition:all .15s;
}
.ci-chip:active{transform:scale(.95);}
.ci-chip.active{
  background:rgba(167,139,250,.18);
  border-color:rgba(167,139,250,.5);
  transform:translateY(-2px);
}
.ci-lbl{
  font-family:'Rajdhani',sans-serif;font-size:9px;
  letter-spacing:.5px;color:rgba(255,255,255,.3);font-weight:700;
}
.ci-chip.active .ci-lbl{color:rgba(167,139,250,.8);}
/* ── MSE Overlay ─────────────────────────────────────────── */
.mse-overlay{
  position:absolute;inset:0;background:rgba(0,0,0,.55);
  z-index:50;display:none;
}
/* ── MSE Sheet ───────────────────────────────────────────── */
.mse-sheet{
  position:absolute;bottom:0;left:0;right:0;
  background:#120f20;
  border-radius:22px 22px 0 0;
  padding:0 20px 28px;
  z-index:51;
  transform:translateY(100%);
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.mse-sheet::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,#7c3aed,#06b6d4,#f59e0b);
  border-radius:2px 2px 0 0;
}
.mse-sheet.open{transform:translateY(0);}
.mse-sheet-handle{
  width:40px;height:4px;background:rgba(255,255,255,.15);
  border-radius:2px;margin:12px auto 20px;
}
.mse-section-label{
  font-family:'Rajdhani',sans-serif;font-size:11px;font-weight:700;
  letter-spacing:1.5px;color:rgba(255,255,255,.35);
  text-transform:uppercase;margin-bottom:8px;
}
.mse-optional{
  font-style:italic;font-weight:400;letter-spacing:0;
  text-transform:none;font-size:10px;margin-left:4px;opacity:.6;
}
.mse-mood-scroll{
  overflow-x:auto;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;margin-bottom:16px;
  padding:5px 2px;
}
.mse-mood-scroll::-webkit-scrollbar{display:none;}
.mse-chips-row{display:flex;gap:6px;width:100%;margin-bottom:16px;}
.mse-save-btn{
  width:100%;padding:13px;margin-top:4px;
  background:linear-gradient(135deg,#7c3aed,#4f46e5);
  border:none;border-radius:14px;color:#fff;
  font-family:'Rajdhani',sans-serif;font-size:14px;
  font-weight:700;letter-spacing:1px;cursor:pointer;
  transition:opacity .15s;
}
.mse-save-btn:active{opacity:.8;}
/* ── MSE Wizard Carousel ─────────────────────────────────── */
.mse-dot{
  width:6px;height:6px;border-radius:50%;
  background:rgba(255,255,255,.15);transition:all .3s;
}
.mse-dot-active{
  width:20px;border-radius:3px;background:rgba(167,139,250,.7);
}
.mse-car-item{-webkit-tap-highlight-color:transparent;}
.mse-car-center{z-index:2;}
.w-tags-row{padding:0 20px 14px;display:flex;gap:6px;flex-wrap:wrap;}
.w-tag-add{
  background:var(--glass);border:1px dashed var(--glass-b);
  border-radius:20px;padding:4px 12px;font-size:11px;
  color:var(--text-dim);cursor:pointer;letter-spacing:1px;
}
.w-tag-add:hover{border-color:var(--primary-glow);color:var(--purple-l);}
.w-tag-pill{
  background:var(--glass);border:1px solid var(--glass-b);
  border-radius:20px;padding:4px 12px;font-size:11px;
  color:var(--text-dim);cursor:pointer;letter-spacing:.5px;
  transition:all .2s;user-select:none;
  display:inline-flex;align-items:center;gap:4px;
}
.w-tag-pill.sel{
  background:rgba(124,58,237,.25);border-color:rgba(124,58,237,.6);
  color:var(--purple-l);box-shadow:0 0 8px rgba(124,58,237,.2);
}
.w-tag-pill:hover{border-color:var(--primary-glow);color:var(--purple-l);}
.w-tag-del{
  display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:50%;
  background:rgba(255,255,255,.15);color:rgba(255,255,255,.7);
  font-size:14px;line-height:1;cursor:pointer;margin-left:2px;
  font-weight:700;transition:background .15s,color .15s;
  flex-shrink:0;
}
.w-tag-del:hover{background:rgba(239,68,68,.55);color:#fff;}
/* Vordef. Pills: zeigt × wenn selektiert → Tipp zum Deselektieren */
.w-tag-pill.sel:not(:has(.w-tag-del))::after{
  content:'×';font-size:11px;opacity:.6;margin-left:2px;
}

/* AI Analysis */
.ai-panel{
  margin:0 20px 16px;padding:16px;
  background:linear-gradient(135deg,rgba(124,58,237,.12),rgba(6,182,212,.07));
  border:1px solid rgba(124,58,237,.25);border-radius:16px;
}
.ai-hdr{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
.ai-orb{
  width:30px;height:30px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  display:flex;align-items:center;justify-content:center;font-size:14px;
}
.ai-lbl{font-size:9px;letter-spacing:3px;color:var(--cyan-l);}
.ai-ttl{font-family:'Lora',serif;font-size:13px;font-weight:600;}
.ai-txt{font-family:'Lora',serif;font-style:italic;font-size:13px;color:var(--text-mid);line-height:1.7;}
.ai-loading{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text-dim);}
.ai-dots{display:flex;gap:3px;}
.ai-dot{width:5px;height:5px;border-radius:50%;background:var(--purple-l);
  animation:db 1.2s ease-in-out infinite;}
.ai-dot:nth-child(2){animation-delay:.2s;}
.ai-dot:nth-child(3){animation-delay:.4s;}
@keyframes db{0%,60%,100%{transform:translateY(0);}30%{transform:translateY(-7px);}}

/* =========================================
   SOUL MIRROR
   ========================================= */
.soul-orb-wrap{
  margin:0 16px 14px;padding:22px 20px;
  display:flex;flex-direction:column;align-items:center;gap:16px;
}
#radarBig{display:block;}
.soul-quote{
  font-family:'Lora',serif;font-style:italic;
  font-size:14px;color:var(--text-mid);text-align:center;line-height:1.7;
  padding:0 12px;
}
.soul-dims-full{display:flex;flex-direction:column;gap:12px;padding:0 20px;}
.sd-row{display:flex;flex-direction:column;gap:5px;}
.sd-top{display:flex;justify-content:space-between;align-items:center;}
.sd-name{font-size:13px;letter-spacing:1px;}
.sd-pct{font-size:13px;font-weight:600;}
.sd-bar-bg{height:6px;background:rgba(255,255,255,.06);border-radius:3px;overflow:hidden;}
.sd-bar{height:100%;border-radius:3px;transition:width 1.5s cubic-bezier(.4,0,.2,1);}
.sd-desc{font-size:11px;color:var(--text-dim);line-height:1.5;}

/* Radar history mini */
.radar-hist{
  margin:0 16px 14px;padding:16px 20px;
}
.rh-title{font-family:'Lora',serif;font-weight:600;font-size:15px;margin-bottom:14px;}
.rh-chart{display:flex;gap:8px;align-items:flex-end;height:70px;}
.rh-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:4px;align-items:center;height:100%;}
.rh-bar{
  width:100%;border-radius:4px;
  background:linear-gradient(180deg,var(--cyan),var(--primary-glow));
  box-shadow:0 0 8px rgba(6,182,212,.3);
  transition:height 1.2s cubic-bezier(.34,1.56,.64,1);
}
.rh-lbl{font-size:9px;color:var(--text-dim);}

/* =========================================
   STATS SCREEN
   ========================================= */
/* ── Stat Rows (neue Kernzahlen) ── */
.stat-row{display:flex;align-items:center;gap:16px;padding:10px 0;position:relative;border-bottom:1px solid rgba(255,255,255,.04);}
.stat-row:last-child{border-bottom:none;}
.stat-number{font-family:'Cinzel',serif;font-size:38px;font-weight:500;min-width:88px;letter-spacing:-1px;line-height:1;}
.stat-purple{color:#a78bfa;text-shadow:0 0 24px rgba(167,139,250,.35);}
.stat-pink{color:#ec4899;text-shadow:0 0 24px rgba(236,72,153,.35);}
.stat-cyan{color:#67e8f9;text-shadow:0 0 24px rgba(103,232,249,.3);}
.stat-green{color:#10b981;text-shadow:0 0 24px rgba(16,185,129,.3);}
.stat-meta{flex:1;min-width:0;}
.stat-label{font-family:'Rajdhani',sans-serif;font-size:10px;font-weight:700;letter-spacing:2px;text-transform:uppercase;color:rgba(255,255,255,.28);}
.stat-context{font-family:'Lora',serif;font-style:italic;font-size:12px;color:rgba(200,184,224,.38);line-height:1.4;margin-top:2px;}

.stats-summary{
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;
  margin:0 16px 14px;
}
.ss-card{padding:12px 10px;border-radius:14px;text-align:center;}
.ss-val{font-family:'Lora',serif;font-weight:700;font-size:20px;line-height:1;}
.ss-lbl{font-size:8px;letter-spacing:2px;color:var(--text-dim);text-transform:uppercase;margin-top:4px;}

/* Heatmap */
.heatmap-wrap{margin:0 16px 14px;padding:16px 20px;}
.hm-title{font-family:'Lora',serif;font-weight:600;font-size:15px;margin-bottom:14px;}
.hm-grid{display:grid;grid-template-columns:repeat(13,1fr);gap:3px;}
.hm-cell{
  aspect-ratio:1;border-radius:2px;
  background:rgba(255,255,255,.04);
  cursor:pointer;transition:transform .1s;
}
.hm-cell:hover{transform:scale(1.3);}
.hm-cell.h1{background:rgba(124,58,237,.2);}
.hm-cell.h2{background:rgba(124,58,237,.4);}
.hm-cell.h3{background:rgba(124,58,237,.65);box-shadow:0 0 6px rgba(124,58,237,.4);}
.hm-cell.h4{background:rgba(167,139,250,.9);box-shadow:0 0 10px rgba(167,139,250,.5);}

/* Line chart */
.linechart-wrap{margin:0 16px 14px;padding:18px 20px;}
.lc-top{display:flex;justify-content:space-between;margin-bottom:16px;}
.lc-title{font-family:'Lora',serif;font-weight:600;font-size:15px;}
.lc-avg{font-size:11px;color:var(--text-dim);}
.lc-avg span{color:var(--cyan-l);font-weight:700;}
#lcCanvas{display:block;width:100%;}

/* Insights */
.insights-wrap{margin:0 16px 14px;padding:16px 20px;}
.insight{
  display:flex;gap:12px;align-items:flex-start;padding:12px 0;
  border-bottom:1px solid var(--glass-b);
}
.insight:last-child{border-bottom:none;}
.insight-ico{
  width:36px;height:36px;border-radius:50%;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:17px;
}
.insight-txt{flex:1;}
.insight-title{font-size:14px;font-weight:600;margin-bottom:2px;}
.insight-sub{font-size:12px;color:var(--text-dim);line-height:1.5;}

/* =========================================
   PROFILE SCREEN
   ========================================= */
.prof-hero{
  display:flex;flex-direction:column;align-items:center;
  padding:20px 20px 24px;gap:12px;
}
.prof-avatar{
  width:80px;height:80px;border-radius:50%;
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  display:flex;align-items:center;justify-content:center;font-size:36px;
  box-shadow:0 0 30px rgba(124,58,237,.5);
  border:3px solid rgba(255,255,255,.1);position:relative;
}
.prof-ring{
  position:absolute;inset:-6px;border-radius:50%;
  border:2px solid transparent;
  background:linear-gradient(var(--bg),var(--bg)) padding-box,
    linear-gradient(135deg,var(--primary-glow),var(--cyan)) border-box;
  animation:ringRot 4s linear infinite;
}
@keyframes ringRot{to{transform:rotate(360deg);}}
.prof-name{font-family:'Lora',serif;font-weight:700;font-size:24px;}
.prof-title{font-size:11px;color:var(--text-dim);letter-spacing:3px;text-transform:uppercase;}
.level-card{
  width:100%;margin:0 16px 14px;
  padding:18px 20px;
}
.lv-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;}
.lv-badge{
  background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  border-radius:30px;padding:6px 16px;
  font-family:'Rajdhani';font-weight:700;font-size:14px;letter-spacing:2px;
  position:relative;overflow:hidden;
}
.lv-badge::after{
  content:'';position:absolute;top:0;left:-60%;
  width:40%;height:100%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);
  animation:badge-shimmer 4s ease-in-out infinite;
}
@keyframes badge-shimmer{0%,60%,100%{left:-60%;}80%{left:120%;}}
.lv-xp{font-size:11px;color:var(--text-dim);}
.lv-bar-bg{height:8px;background:rgba(255,255,255,.06);border-radius:4px;overflow:hidden;margin-bottom:6px;}
.lv-bar{height:100%;border-radius:4px;background:linear-gradient(90deg,var(--primary-glow),var(--cyan));
  box-shadow:0 0 12px rgba(6,182,212,.4);transition:width 2s ease;}
.lv-label{font-size:10px;color:var(--text-dim);}
.lv-label span{color:var(--purple-l);}

/* Badges grid */
.badges-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
  padding:0 16px;margin-bottom:14px;
}
.b-card{
  padding:14px 10px;border-radius:16px;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  cursor:pointer;transition:all .2s;
}
.b-card:hover{transform:translateY(-3px);}
.b-ico-wrap{
  width:48px;height:48px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;font-size:22px;
  position:relative;
}
.b-card.unlocked .b-ico-wrap{
  background:linear-gradient(135deg,rgba(124,58,237,.25),rgba(6,182,212,.15));
  box-shadow:0 0 18px rgba(124,58,237,.3);
}
.b-card.unlocked .b-ico-wrap::after{
  content:'';position:absolute;inset:-3px;border-radius:50%;
  border:1px solid rgba(167,139,250,.4);
  animation:bpulse 2.5s ease-in-out infinite;
}
@keyframes bpulse{0%,100%{opacity:.3;transform:scale(1);}50%{opacity:.8;transform:scale(1.1);}}
.b-card.locked .b-ico-wrap{background:rgba(255,255,255,.04);filter:grayscale(1) brightness(.35);}
.b-name{font-size:10px;text-align:center;line-height:1.4;letter-spacing:.3px;}
.b-card.locked .b-name{color:var(--text-dim);}
.b-card.unlocked .b-name{color:var(--purple-l);}

/* Settings */
.group-label{
  font-family:'Rajdhani',sans-serif;font-size:9px;font-weight:700;
  letter-spacing:2px;color:rgba(167,139,250,.35);text-transform:uppercase;
  padding:10px 20px 4px;position:relative;
}
.group-label::after{
  content:'';position:absolute;right:16px;top:50%;
  width:38%;height:1px;
  background:linear-gradient(90deg,transparent,rgba(167,139,250,.12));
}
.version-line{
  text-align:center;padding:12px 0 4px;
  font-family:'Lora',serif;font-style:italic;
  font-size:11px;color:rgba(255,255,255,.15);letter-spacing:.3px;
}
.settings-group{margin:0 16px 14px;border-radius:18px;overflow:hidden;}
.setting-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:15px 18px;background:var(--glass);
  border-bottom:1px solid var(--glass-b);cursor:pointer;
  transition:background .15s;
}
.setting-row:last-child{border-bottom:none;}
@media(hover:hover){.setting-row:hover{background:rgba(255,255,255,.06);}}
.setting-row:active{background:rgba(124,58,237,.1);}
body.echo-light .setting-row:active{background:rgba(109,40,217,.08) !important;}
.sr-left{display:flex;align-items:center;gap:12px;}
.sr-ico{font-size:18px;width:28px;text-align:center;}
.sr-txt{}
.sr-name{font-size:14px;}
.sr-sub{font-size:11px;color:var(--text-dim);margin-top:1px;}
.sr-right{display:flex;align-items:center;gap:8px;color:var(--text-dim);font-size:13px;}
/* Toggle */
.toggle{
  width:44px;height:24px;border-radius:12px;
  background:rgba(255,255,255,.1);position:relative;
  cursor:pointer;transition:background .2s;flex-shrink:0;
}
.toggle.on{background:linear-gradient(135deg,var(--primary-glow),var(--cyan));}
.toggle::after{
  content:'';position:absolute;top:3px;left:3px;
  width:18px;height:18px;border-radius:50%;background:#fff;
  transition:transform .2s;box-shadow:0 1px 4px rgba(0,0,0,.3);
}
.toggle.on::after{transform:translateX(20px);}

/* =========================================
   OVERLAYS
   ========================================= */
/* Badge unlock */
#badgeOverlay{
  position:fixed;inset:0;z-index:100;
  background:rgba(0,0,0,.75);backdrop-filter:blur(10px);
  display:flex;align-items:center;justify-content:center;
  opacity:0;pointer-events:none;transition:opacity .3s;
}
#badgeOverlay.show{opacity:1;pointer-events:all;}
.bu-card{
  background:linear-gradient(135deg,rgba(20,14,40,.98),rgba(12,8,25,.98));
  border:1px solid rgba(167,139,250,.3);
  border-radius:28px;padding:36px 28px;text-align:center;
  max-width:320px;width:90%;
  transform:scale(.8);transition:transform .4s cubic-bezier(.175,.885,.32,1.275);
}
#badgeOverlay.show .bu-card{transform:scale(1);}
.bu-star-ring{font-size:64px;margin-bottom:10px;filter:drop-shadow(0 0 25px gold);
  animation:buSpin 1.4s ease;}
@keyframes buSpin{0%{transform:rotate(-15deg) scale(.5);}100%{transform:rotate(0) scale(1);}}
.bu-super{font-size:9px;letter-spacing:4px;color:var(--gold);text-transform:uppercase;margin-bottom:8px;}
.bu-name{font-family:'Lora',serif;font-weight:700;font-size:22px;margin-bottom:8px;}
.bu-desc{font-family:'Lora',serif;font-style:italic;font-size:13px;color:var(--text-mid);line-height:1.7;margin-bottom:24px;}
.bu-xp{
  background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.3);
  border-radius:20px;padding:6px 16px;font-size:12px;color:var(--gold);
  margin-bottom:20px;display:inline-block;letter-spacing:1px;
}
.bu-btn{
  width:100%;background:linear-gradient(135deg,var(--primary-glow),var(--cyan));
  border:none;border-radius:50px;padding:13px;
  color:#fff;font-family:'Rajdhani';font-weight:700;
  letter-spacing:2px;font-size:13px;cursor:pointer;
  box-shadow:0 4px 20px rgba(124,58,237,.4);
}

/* Notification toast */
#toast{
  position:fixed;top:60px;left:50%;transform:translateX(-50%) translateY(-80px);
  background:rgba(16,12,28,.95);border:1px solid var(--glass-b);
  border-radius:50px;padding:10px 20px;
  display:flex;align-items:center;gap:8px;
  font-size:13px;letter-spacing:.5px;
  backdrop-filter:blur(20px);z-index:200;
  transition:transform .4s cubic-bezier(.34,1.2,.64,1),opacity .3s;
  opacity:0;white-space:nowrap;
  max-width:80vw;overflow:hidden;text-overflow:ellipsis;
  box-shadow:0 8px 30px rgba(0,0,0,.5);
}
#toast.show{transform:translateX(-50%) translateY(0);opacity:1;}


/* ================================================================
   ✨ ANIMATIONS.CSS – SoulEcho Polish Layer
   Alle Animationen & Micro-Interactions
   ================================================================ */

/* ── 1. SCREEN TRANSITIONS (Richtungs-aware) ──────────────────── */
.screen {
  transition: opacity .38s ease, transform .38s cubic-bezier(.4,0,.2,1);
  /* will-change removed from base: causes premature compositing layer
     that traps newly injected SVG content in opacity:0 state */
}
.screen.slide-in-right,
.screen.slide-in-left,
.screen.slide-out-right,
.screen.slide-out-left {
  will-change: transform, opacity;
}
.screen.slide-in-right  { animation: slideInRight  .38s cubic-bezier(.4,0,.2,1); }
.screen.slide-in-left   { animation: slideInLeft   .38s cubic-bezier(.4,0,.2,1); }
.screen.slide-out-right { animation: slideOutRight .38s cubic-bezier(.4,0,.2,1); }
.screen.slide-out-left  { animation: slideOutLeft  .38s cubic-bezier(.4,0,.2,1); }

@keyframes slideInRight  { from{opacity:0;transform:translateX(48px)}  to{opacity:1;transform:translateX(0)} }
@keyframes slideInLeft   { from{opacity:0;transform:translateX(-48px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideOutRight { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(48px)}  }
@keyframes slideOutLeft  { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(-48px)} }

/* ── 2. NAV-BAR GLOW-INDICATOR ────────────────────────────────── */
/* #bottomNav position: relative entfernt - überschreibt position: fixed nicht */
.nav-glow-indicator {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 2px); height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-glow), var(--cyan), transparent);
  border-radius: 2px;
  transition: left .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  filter: blur(1px);
}
.nav-btn.on .nav-ico {
  filter: drop-shadow(0 0 6px var(--primary-glow));
  animation: navIconPop .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes navIconPop {
  from { transform: scale(0.7) translateY(4px); opacity: 0.5; }
  to   { transform: scale(1)   translateY(0);   opacity: 1;   }
}
.nav-btn.on .nav-lbl {
  animation: navLblFade .3s ease forwards;
}
@keyframes navLblFade {
  from { opacity: 0; transform: translateY(3px); }
  to   { opacity: 1; transform: translateY(0);   }
}

/* ── 3. ENTRY-CARDS STAGGER-ENTRANCE ──────────────────────────── */
.entry {
  animation: cardEntrance .45s cubic-bezier(.4,0,.2,1) both;
}
.entry:nth-child(1) { animation-delay: .04s; }
.entry:nth-child(2) { animation-delay: .10s; }
.entry:nth-child(3) { animation-delay: .16s; }
.entry:nth-child(4) { animation-delay: .22s; }
.entry:nth-child(5) { animation-delay: .28s; }
.entry:nth-child(n+6) { animation-delay: .32s; }

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}
/* Nach Entrance: will-change freigeben */
.entry { will-change: auto; }

/* Entry Stripe glow on hover */
.entry:hover .entry-stripe {
  box-shadow: 0 0 12px 2px var(--primary-glow);
  transition: box-shadow .2s;
}

/* ── 4. MOOD-CHIP RIPPLE ───────────────────────────────────────── */
.mood-chip {
  position: relative;
  overflow: hidden;
}
.mood-chip::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(124,58,237,.45) 0%, transparent 70%);
  transform: scale(0); opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
  border-radius: inherit;
  pointer-events: none;
}
.mood-chip.sel::after {
  transform: scale(2.2);
  opacity: 1;
  animation: rippleFade .5s ease forwards .05s;
}
@keyframes rippleFade {
  0%   { transform: scale(0);   opacity: .7; }
  100% { transform: scale(2.5); opacity: 0;  }
}
.mood-chip.sel {
  animation: chipPop .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes chipPop {
  from { transform: scale(.85); }
  to   { transform: scale(1);   }
}

/* ── 5. SAVE-BUTTON PULSE ─────────────────────────────────────── */
.w-save {
  position: relative;
  overflow: hidden;
}
.w-save::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform .5s ease;
  pointer-events: none;
}
.w-save:hover::before {
  transform: translateX(200%) skewX(-15deg);
}
.w-save.saving {
  animation: savePulse .6s cubic-bezier(.4,0,.2,1);
}
@keyframes savePulse {
  0%   { box-shadow: 0 3px 14px rgba(124,58,237,.4); }
  50%  { box-shadow: 0 0 0 10px rgba(124,58,237,.0), 0 0 30px rgba(6,182,212,.6); }
  100% { box-shadow: 0 3px 14px rgba(124,58,237,.4); }
}

/* ── 6. BADGE OVERLAY ENTRANCE ────────────────────────────────── */
#badgeOverlay.show .bu-card {
  animation: badgeReveal 1.1s cubic-bezier(.175,.885,.32,1.275) forwards;
}
@keyframes badgeReveal {
  0%   { transform: scale(.7) translateY(30px); opacity: 0; }
  60%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.bu-star-ring {
  animation: starSpin .7s ease !important;
}
@keyframes starGlow {
  from { filter: drop-shadow(0 0 15px gold); }
  to   { filter: drop-shadow(0 0 35px gold) drop-shadow(0 0 60px rgba(245,158,11,.5)); }
}

/* Konfetti-Burst via CSS (einfache Sterne die herausfliegen) */
.bu-card::before,
.bu-card::after {
  content: '✦';
  position: absolute; top: 20%; left: 50%;
  font-size: 12px; color: var(--gold);
  opacity: 0; pointer-events: none;
}
#badgeOverlay.show .bu-card::before {
  animation: confetti1 2.4s ease .6s forwards;
}
#badgeOverlay.show .bu-card::after {
  animation: confetti2 2.4s ease 1.0s forwards;
}
@keyframes confetti1 {
  0%   { transform: translate(0,0) scale(0); opacity: 1; }
  100% { transform: translate(-60px,-80px) scale(1.5) rotate(180deg); opacity: 0; }
}
@keyframes confetti2 {
  0%   { transform: translate(0,0) scale(0); opacity: 1; }
  100% { transform: translate(60px,-80px) scale(1.5) rotate(-180deg); opacity: 0; }
}

/* ── 7. PROFIL-AVATAR BREATHING ───────────────────────────────── */
.prof-avatar {
  animation: avatarBreathe 4s ease-in-out infinite;
}
@keyframes avatarBreathe {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.03); }
}

/* ── 8. XP-BAR ANIMATED FILL MIT OVERSHOOT ───────────────────── */
.lv-bar {
  transition: width 1.8s cubic-bezier(.34,1.15,.64,1) !important;
}
.lv-bar-bg {
  position: relative;
  overflow: visible;
}
.lv-bar::after {
  content: '';
  position: absolute; right: -1px; top: -2px; bottom: -2px; width: 4px;
  background: rgba(255,255,255,.6);
  border-radius: 2px;
  filter: blur(2px);
  opacity: 0;
  animation: xpGlow 1.8s ease forwards;
}
@keyframes xpGlow {
  0%,70% { opacity: 0; }
  80%    { opacity: 1; }
  100%   { opacity: 0; }
}

/* ── 9. HEATMAP WAVE-ENTRANCE ─────────────────────────────────── */
.hm-cell {
  animation: hmWave .4s ease both;
  transition: transform .15s, box-shadow .15s;
}
/* nth-child gestaffelt via JS, aber hier Basis-Delay definieren */
.hm-cell:hover {
  transform: scale(1.4);
  z-index: 2;
  box-shadow: 0 0 8px var(--primary-glow);
}
@keyframes hmWave {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: scale(1);  }
}

/* ── 10. GLASS-CARD SHIMMER beim Laden ────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.gc.loading::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
}

/* ── 11. SCROLL FADE-EDGES ────────────────────────────────────── */
.scroll-area {
  /* mask-image entfernt - zu teuer auf mobilen GPUs */
  padding-top: 4px;
}

/* ── 12. FAB VERBESSERUNG ─────────────────────────────────────── */
#fab {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s !important;
}
#fab:hover {
  transform: translateY(-3px) scale(1.08) !important;
  box-shadow: 0 8px 30px rgba(124,58,237,.65), 0 0 50px rgba(6,182,212,.3) !important;
}
#fab::before {
  content: '';
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.15) 0%, transparent 70%);
  animation: fabAura 3s ease-in-out infinite;
}
@keyframes fabAura {
  0%,100% { transform: scale(1); opacity: .5; }
  50%     { transform: scale(1.3); opacity: 1; }
}

/* ── 13. WRITE-SCREEN INK REVEAL ──────────────────────────────── */
#screenWrite.active .w-title-input,
#screenWrite.active .w-body {
  animation: inkReveal .5s ease forwards;
}
#screenWrite.active .w-body { animation-delay: .08s; }

@keyframes inkReveal {
  from {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
  }
  to {
    opacity: 1;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* ── 14. SOUL-DIMS BAR PULSE beim Update ──────────────────────── */
.sd-bar {
  transition: width 1.5s cubic-bezier(.4,0,.2,1) !important;
}
.sd-bar.updated {
  animation: barFlash .4s ease;
}
@keyframes barFlash {
  50% { filter: brightness(1.6); }
}

/* ── 15. TOAST VERBESSERUNG ───────────────────────────────────── */
#toast {
  transition: transform .4s cubic-bezier(.34,1.2,.64,1), opacity .3s !important;
}
#toast.show {
  animation: toastBounce .5s cubic-bezier(.34,1.4,.64,1) forwards;
}
@keyframes toastBounce {
  0%   { transform: translateX(-50%) translateY(-80px) scale(.8); opacity: 0; }
  60%  { transform: translateX(-50%) translateY(4px)   scale(1.03); opacity: 1; }
  100% { transform: translateX(-50%) translateY(0)     scale(1); opacity: 1; }
}

/* ── 16. IMPULSE CARD SHIMMER ─────────────────────────────────── */
.impulse {
  position: relative;
  overflow: hidden;
}
.impulse::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 30%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent);
  transform: skewX(-20deg);
  animation: impShimmer 10s ease-in-out infinite;
}
@keyframes impShimmer {
  0%,100% { left: -50%; }
  50%     { left: 130%;  }
}

/* ── 17. RADAR-CHART PULSE ────────────────────────────────────── */
#radarBig {
  /* filter-Animation durch opacity ersetzt - viel günstiger */
  animation: radarBreath 5s ease-in-out infinite;
  will-change: opacity;
}
@keyframes radarBreath {
  0%,100% { opacity: 0.9; }
  50%     { opacity: 1; }
}

/* ── 18. NUMBER COUNTER ANIMATION ─────────────────────────────── */
.count-up {
  animation: countPop .6s cubic-bezier(.34,1.56,.64,1);
}
@keyframes countPop {
  0%  { transform: scale(.6); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1);  opacity: 1; }
}

/* ── 19. SETTINGS TOGGLE SMOOTH ───────────────────────────────── */
.toggle {
  transition: background .25s ease !important;
}
.toggle.on {
  animation: toggleOn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes toggleOn {
  0%  { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
  50% { box-shadow: 0 0 0 6px rgba(124,58,237,.2); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}

/* ── 20. BADGES UNLOCK POP ────────────────────────────────────── */
.b-card.unlocked {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s !important;
}
.b-card.unlocked:active {
  transform: scale(.93) !important;
}
.b-card.just-unlocked {
  animation: badgeUnlock .7s cubic-bezier(.34,1.56,.64,1);
}
@keyframes badgeUnlock {
  0%  { transform: scale(0) rotate(-15deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* ── 21. OB DOTS IMPROVED ─────────────────────────────────────── */
.ob-dot {
  transition: width .35s cubic-bezier(.34,1.4,.64,1), background .3s !important;
}

/* ── 22. SECTION HEADER LINK HOVER ───────────────────────────── */
.sh-link {
  position: relative;
  transition: color .2s, transform .15s !important;
}
.sh-link:hover { transform: translateX(3px); }
.sh-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: var(--purple-l);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.sh-link:hover::after { transform: scaleX(1); }

/* ── 23. WRITE PROMPT HOVER EFFECT ────────────────────────────── */
.write-prompt {
  overflow: hidden;
  position: relative;
}
.write-prompt::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,.08), rgba(6,182,212,.05));
  opacity: 0;
  transition: opacity .3s;
}
.write-prompt:hover::after { opacity: 1; }

/* ── 24. GRAD TEXT ANIMATED ───────────────────────────────────── */
.grad-text-anim {
  background: linear-gradient(135deg, var(--purple-l), var(--cyan-l), var(--pink), var(--purple-l));
  background-size: 300% 300%;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradFlow 8s ease-in-out infinite;
}
@keyframes gradFlow {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

/* ── 25. STAT-CARDS POP-IN ────────────────────────────────────── */
.ss-card {
  animation: statCardIn .5s cubic-bezier(.34,1.3,.64,1) both;
}
.ss-card:nth-child(1) { animation-delay: .05s; }
.ss-card:nth-child(2) { animation-delay: .12s; }
.ss-card:nth-child(3) { animation-delay: .19s; }
@keyframes statCardIn {
  from { opacity: 0; transform: translateY(14px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 26. MOOD SLIDER THUMB GLOW PULSE ─────────────────────────── */
.s-thumb {
  animation: thumbPulse 3s ease-in-out infinite !important;
}
@keyframes thumbPulse {
  /* Vereinfacht: nur opacity statt box-shadow Änderung */
  0%,100% { opacity: 0.9; }
  50%     { opacity: 1; }
}
.s-thumb:active {
  animation: none !important;
  transform: translate(-50%,-50%) scale(1.25) !important;
  cursor: grabbing !important;
}



/* ================================================================
   PERFORMANCE: Animationen auf inaktiven Screens pausieren
   ================================================================ */

/* Alle infinite Animationen anhalten wenn Screen nicht aktiv */
.screen:not(.active) * {
  animation-play-state: paused !important;
}

/* GPU Compositing Hints - nur für animierte Elemente */
#fab,
.nav-btn {
  will-change: transform;
}

/* Nach Screen-Wechsel will-change freigeben (verhindert Memory-Leak) */
.screen:not(.active) {
  will-change: auto;
}

/* backdrop-filter nur auf Key-Elementen via @media */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Browser Autofill — verhindert weißen Text auf weißem Hintergrund */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1a0533 inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
body.echo-light input:-webkit-autofill,
body.echo-light input:-webkit-autofill:hover,
body.echo-light input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1a0533 !important;
  -webkit-box-shadow: 0 0 0px 1000px #f0ebff inset !important;
}

/* Auf schwachen Geräten: backdrop-filter deaktivieren */
@media (max-resolution: 1.5dppx) {
  .gc {
    backdrop-filter: none;
    background: rgba(16, 12, 28, 0.95);
  }
}
