/* =========================================================================
   shii · haa — Mobile App Overrides
   Works for: Capacitor native (body.native-app) AND PWA mobile (body.mobile-app)
   On desktop (>768px) the bottom tab bar is hidden entirely
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Safe Areas (notch, home indicator, rounded corners)
   --------------------------------------------------------------------------- */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --keyboard-height: 0px;
  --bottom-nav-height: 48px;
  --tab-bar-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

/* ---------------------------------------------------------------------------
   Bottom Tab Bar — hidden by default, shown only on small screens
   --------------------------------------------------------------------------- */
.bottom-tab-bar {
  display: none !important;
}

@media (max-width: 768px) {
  /* Show tab bar on mobile */
  .bottom-tab-bar.visible {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: auto;
    background: transparent;
    z-index: 1000;
    padding: 0 8px;
    padding-bottom: var(--safe-bottom);
    align-items: center;
    justify-content: space-around;
  }

  /* Android: move tab bar above system navigation bar */
  body.platform-android .bottom-tab-bar.visible {
    bottom: var(--safe-bottom);
    padding-bottom: 0;
  }

  /* Android: fill the gap behind system nav bar with app background */
  body.platform-android .bottom-tab-bar.visible::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: var(--safe-bottom);
    background: var(--tab-bar-bg, rgba(245, 240, 232, 0.96));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  /* Background shape with notch for breathing button */
  .bottom-tab-bar.visible::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--tab-bar-bg, rgba(245, 240, 232, 0.96));
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    -webkit-mask-image: radial-gradient(circle 38px at 50% 0, transparent 100%, black 100%);
    mask-image: radial-gradient(circle 38px at 50% 0, transparent 100%, black 100%);
    z-index: -1;
  }

  /* Add bottom padding to views so content doesn't hide behind tab bar
     Extra 24px breathing room above the tab bar for a more spacious feel */
  .view,
  .app-main,
  main {
    padding-bottom: calc(var(--tab-bar-height) + 24px) !important;
  }

  /* Hide the existing desktop header nav links (Empfangen/Gestalten/Loslassen text) */
  .header-nav-links,
  .site-header .nav-links {
    display: none !important;
  }

  /* Footer: hide on mobile when tab bar is visible */
  .site-footer {
    display: none !important;
  }

  /* ---------------------------------------------------------------------------
     Mobile body tweaks
     --------------------------------------------------------------------------- */
  body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
  }

  /* Prevent zoom on input focus (iOS) */
  input, textarea, select {
    font-size: 16px !important;
  }

  /* Minimum touch target */
  button, a.btn, .card, .essay-card, .section-card {
    min-height: 44px;
  }

  /* Cards — press feedback */
  .card:active,
  .essay-card:active,
  .section-card:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
  }

  /* Scrollbar — hide on mobile */
  ::-webkit-scrollbar {
    display: none;
  }
  * {
    scrollbar-width: none;
  }

  /* ---------------------------------------------------------------------------
     Slim header on mobile
     --------------------------------------------------------------------------- */
  .app-header,
  .site-header {
    padding-top: calc(var(--safe-top) + 8px);
  }

  .header-inner {
    min-height: 40px;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-header {
    padding-top: var(--safe-top);
    padding-bottom: 2px;
  }

  /* Logo vertikal zentrieren */
  .header-logo {
    display: flex;
    align-items: center;
  }

  .header-logo svg {
    display: block;
  }

  /* Avatar etwas nach links */
  .header-auth {
    margin-right: 0;
  }

  .user-avatar-btn {
    margin-right: 4px;
  }

  /* ---------------------------------------------------------------------------
     Breathing Session — Immersive fullscreen
     --------------------------------------------------------------------------- */
  body.session-active .bottom-tab-bar,
  body.warmup-session-active .bottom-tab-bar {
    display: none !important;
  }

  body.warmup-session-active .app-header,
  body.warmup-session-active .site-header {
    display: none !important;
  }

  body.reise-session-active .bottom-tab-bar {
    display: none !important;
  }

  body.reise-session-active .app-header,
  body.reise-session-active .site-header {
    display: none !important;
  }

  body.session-active .app-header,
  body.session-active .site-header {
    display: none !important;
  }

  .breathwork-session-view,
  .active-session-container {
    padding-top: 0;
    padding-bottom: var(--safe-bottom);
  }

  /* Breathing circle — larger on mobile */
  .breath-circle,
  .session-circle {
    width: min(280px, 70vw) !important;
    height: min(280px, 70vw) !important;
  }

  /* Timer text — larger for glanceability */
  .session-timer-display,
  .timer-text {
    font-size: 2.5rem !important;
    font-variant-numeric: tabular-nums;
  }

  /* Session controls — thumb-friendly */
  .session-controls button,
  .session-btn {
    min-height: 48px;
    min-width: 48px;
    border-radius: 24px;
    padding: 12px 28px;
  }

  /* ---------------------------------------------------------------------------
     View transitions — smooth
     --------------------------------------------------------------------------- */
  .view {
    animation: mobileViewIn 0.2s ease-out;
  }

  @keyframes mobileViewIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ---------------------------------------------------------------------------
     Toast notifications — above tab bar
     --------------------------------------------------------------------------- */
  .toast, .notification-toast {
    bottom: calc(var(--tab-bar-height) + 12px) !important;
  }

  /* ---------------------------------------------------------------------------
     Keyboard open state
     --------------------------------------------------------------------------- */
  body.keyboard-open .bottom-tab-bar {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Tab Bar Styling (shared, only visible on mobile)
   --------------------------------------------------------------------------- */
.bottom-tab-bar .tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 6px 0;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  font-family: "DM Sans", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow: visible;
}

.bottom-tab-bar .tab-item.active {
  color: var(--color-text);
}

.bottom-tab-bar .tab-item svg {
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;       /* etwas kräftiger */
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.bottom-tab-bar .tab-item.active svg {
  stroke-width: 2.1;
}

.bottom-tab-bar .tab-label {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-tab-bar .tab-item.active .tab-label {
  font-weight: 600;
}

/* Center breathing button — large, 3D, rises above bar */
.bottom-tab-bar .tab-item.tab-breathe {
  padding-top: 0;
  position: relative;
  z-index: 2;
}

.bottom-tab-bar .tab-item.tab-breathe .tab-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #b5c8a5, #8a9e7a 40%, #6b7d5e 75%, #556849);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -28px;
  box-shadow:
    0 6px 16px rgba(85, 104, 73, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.12),
    inset 0 2px 4px rgba(255, 255, 255, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 3px solid rgba(245, 240, 232, 0.97);
}

.bottom-tab-bar .tab-item.tab-breathe .tab-icon-wrap svg {
  stroke: rgba(255, 255, 255, 0.88);
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
  fill: none;
}

.bottom-tab-bar .tab-item.tab-breathe.active .tab-icon-wrap {
  transform: scale(1.1);
  box-shadow:
    0 8px 22px rgba(85, 104, 73, 0.5),
    0 3px 6px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12);
}

/* Yantra-Label „Atmen“ komplett ausblenden — !important wegen body.native-app override in style.css */
.bottom-tab-bar .tab-item.tab-breathe .tab-label,
body.native-app .bottom-tab-bar .tab-item.tab-breathe .tab-label {
  display: none !important;
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   Capacitor Native — Extra overrides
   --------------------------------------------------------------------------- */
body.native-app {
  -webkit-user-select: none;
  user-select: none;
}

/* Cover the bottom safe area with app background color.
   ONLY shown during fullscreen sessions when tab bar is hidden.
   Normal views: the tab bar itself covers the safe area via its own padding-bottom. */
body.native-app::after {
  content: '';
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: var(--color-bg, #f5f0e8);
  z-index: 9998;
  pointer-events: none;
  /* Hidden by default — only sessions turn it on */
  display: none;
}
/* During fullscreen sessions (tab bar hidden) — show safe-area cover */
body.native-app.breath-session-active::after {
  display: block;
  background: #2a2218;
}
body.native-app.warmup-session-active::after {
  display: block;
  background: var(--color-bg, #f5f0e8);
}
body.native-app.reise-session-active::after {
  display: block;
  background: var(--color-bg, #f5f0e8);
}
/* When breath session runs inside reise, dark wins */
body.native-app.breath-session-active.reise-session-active::after {
  background: #2a2218;
}

/* Ensure scrolling works in Capacitor WebView — only for non-native (PWA) */
html:not(.native-app-html), body:not(.native-app) {
  height: auto !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

body.native-app .essay-content,
body.native-app .wissen-content,
body.native-app textarea,
body.native-app input {
  -webkit-user-select: text;
  user-select: text;
}

/* ---------------------------------------------------------------------------
   Android Navigation Bar — handled via capacitor-bridge.js
   Sets --safe-bottom: 48px on Android so the tab bar and views
   automatically get the right padding via --tab-bar-height.
   No extra CSS needed — the existing --safe-bottom plumbing handles it.
   --------------------------------------------------------------------------- */

/* =============================================================================
   APP TYPOGRAPHY SYSTEM
   —————————————————————————————————————————————————————————————————————————————
   5 Text-Rollen. 1 UI-Schrift (DM Sans). Cormorant nur für Pillar-Hero-Momente.

   Rollen:
     .t-display  → Cormorant 26px 500  — Pillar-Opener, Splash (kein UI)
     .t-title    → DM Sans   19px 600  — Screen-Titel, primäre Karten-Überschrift
     .t-subtitle → DM Sans   15px 500  — Abschnitts-Header, Karten-Titel in Listen
     .t-body     → DM Sans   15px 400  — Beschreibungen, Inhaltstext
     .t-label    → DM Sans   13px 500  — Labels, Metadaten
     .t-micro    → DM Sans   11px 500  — Badges, Zeitstempel (+ Uppercase)

   Regeln:
     • letter-spacing: 0 überall ausser Uppercase-Labels (0.05em)
     • Gewichte: 400 / 500 / 600 — 300 und 700 nur für Timer/Metriken
     • Textfarbe: ausschliesslich --color-text / -muted / -faint
     • Keine hardcodierten Farb-Hex-Werte in Text-Regeln
   ============================================================================= */

/* --- Utility-Klassen (direktes Verwenden in HTML/JS möglich) --- */
.t-display {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.t-title {
  font-family: var(--font-body);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}
.t-subtitle {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
.t-body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}
.t-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
.t-micro {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =============================================================================
   CORMORANT → DM SANS: Alle navigierbaren / funktionalen App-Elemente
   Pillar-Hero (pillar-number, pillar-title, pillar-philosophy) bleibt Cormorant —
   das sind bewusste Display-Momente, keine Navigation.
   ============================================================================= */

/* --- Atmen-View: Übersichtskarten --- */
.breath-overview-card-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.breath-category-header h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.breath-settings-header h3 {
  font-family: var(--font-body);
  font-size: 1.75rem;      /* 28px — hervorgehoben wie ein Seitenheader */
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}
.breath-settings-header .breath-settings-timing {
  font-family: var(--font-body);
  font-size: 0.9375rem;   /* 15px — klar lesbar */
  font-weight: 400;
  color: var(--color-text-muted, #7a7a6a);
  letter-spacing: 0;
}
.mood-picker-title,
.mood-picker-heading {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Pillar-Karten (Empfangen / Gestalten / Loslassen) --- */
.pillar-card h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.pillar-card p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.55;
}
/* Uppercase-Labels auf Karten behalten spacing, aber vereinheitlichte Grösse */
.pillar-card-label {
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

/* --- Pillar-Philosophy: kein Italic in App-Kontext --- */
.pillar-philosophy {
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

/* --- Atemgestaltung: Kategorie-Karten & Technik-Karten --- */
.breath-cat-tech-card .technique-label,
.technique-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
}
.round-info-card-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.info-modal-name {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Session-UI: Atem-Text, Timer, Phasen-Labels --- */
.breath-text {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
}
.apnoe-phase-label {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}
.apnoe-results-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}
/* Timer-Display: DM Sans bold — Zahlen brauchen kein Serif */
.bh-timer-display,
.bh-result-time {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.bh-breath-text,
.bh-recovery-text {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
}
.bh-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}
.breathwork-complete h2,
.breathwork-setup h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Warmup --- */
.warmup-title,
.warmup-standalone h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.warmup-active-name,
.warmup-exercise-name {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
}
.warmup-active-timer {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.warmup-complete-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Reise --- */
.reise-session-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.reise-next-desc {
  color: var(--color-text-muted);
}
.reise-milestone-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}
.reise-eval-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.reise-stagnation-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.reise-reflection-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Profil --- */
.profile-info h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.profile-section h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.streak-num {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.first-breath-title,
.first-breath-done-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.first-breath-text {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}

/* --- Assessment & Patientenverfügung --- */
.pv-step-title {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}
.pv-scenario-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.pv-subsection-title {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}
.pv-summary-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.reflection-question,
.summary-question,
.reflection-history-q {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}
.reflection-summary h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Auth --- */
.auth-header h2 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Praxis-Dashboard --- */
.praxis-card-section-head h3,
.praxis-empty h3,
.praxis-list-title h2 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.praxis-patient-email {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}

/* --- Wissen --- */
.wissen-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.wissen-chapter-title {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.wissen-chapter-number {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0;
}
.wissen-cta-text {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}
/* Wissen-Chapter-Content Überschriften bleiben lesbar und ruhig */
.wissen-chapter-content h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* --- Gift-Flow --- */
.gift-title,
.gift-step-title,
.gift-my-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.gift-type-name {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}
.gift-price-amount {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Abo/Dana --- */
.cta-title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.delete-confirm-card h3,
.invite-code-card h4,
.user-chat-header h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* =============================================================================
   GLOBAL LETTER-SPACING BEREINIGUNG
   Verhindert, dass verstreute 0.01–0.03em-Werte die Ruhigkeit stören.
   Betrifft nur App-Ansichten (view-Sections + tab-spezifische Elemente).
   ============================================================================= */
#view-gestalten, #view-empfangen, #view-loslassen, #view-breathe,
#view-profile, #view-pv, #view-reflect, #view-wissen, #view-warmup,
#view-reise, #view-assessment {
  /* Alle direkten Kinder-Textelemente erben 0 letter-spacing */
  --ls-default: 0;
}

/* Breathwork-Tab: Pill-Segmentcontrol ruhiger */
.breathwork-tab {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
}
.breathwork-tab[data-tab="reise"] {
  letter-spacing: 0;
}

/* Bottom-Nav-Labels: einheitlich */
.bottom-tab-bar .tab-label {
  font-size: 0.6875rem;
  letter-spacing: 0;
  font-weight: 500;
}


/* =============================================================================
   KONTRAST & FARBSYSTEM
   —————————————————————————————————————————————————————————————————————————————
   ① Karten heben sich klar vom Cream-Hintergrund ab (weiss + Schatten)
   ② Sage-Grün reserviert für: primäre Buttons · aktive States · GIVE-Kategorie
   ③ Jede Atem-Kategorie hat eine eigene Signalfarbe
   ============================================================================= */

/* --- Schatten-Token für Karten --- */
:root {
  --card-shadow:      0 1px 3px rgba(30,42,34,0.08), 0 2px 8px rgba(30,42,34,0.04);
  --card-shadow-up:   0 4px 12px rgba(30,42,34,0.12), 0 1px 4px rgba(30,42,34,0.06);
  --card-border:      #B8C4B0;

  /* Kategorie-Signalfarben */
  --clr-receive:      #C4784A;   /* Amber-Orange — Einatmen, Energie, Feuer */
  --clr-receive-bg:   rgba(196,120,74,0.12);
  --clr-hold:         #5278A8;   /* Slate-Blau  — Halten, Stille, Tiefe   */
  --clr-hold-bg:      rgba(82,120,168,0.12);
  --clr-give:         #5B8A72;   /* Sage-Grün   — Ausatmen, Loslassen      */
  --clr-give-bg:      rgba(91,138,114,0.12);
  --clr-journey:      #A87840;   /* Warm-Braun  — Die Reise, Progression   */
  --clr-journey-bg:   rgba(168,120,64,0.12);
  --clr-breathhold:   #3E6E8A;   /* Ozean-Blau  — Apnoe, Tauchen          */
  --clr-breathhold-bg:rgba(62,110,138,0.12);
  --clr-skills:       #A89078;   /* Sand        — Skills, Lernen           */
  --clr-skills-bg:    rgba(168,144,120,0.12);
  --clr-recs:         #B89050;   /* Gold        — Empfehlungen, Kuratiert  */
  --clr-recs-bg:      rgba(184,144,80,0.12);
}

/* =============================================================================
   ① KARTEN — Weiss + Schatten statt Farbfläche
   ============================================================================= */

/* All cards: use theme surface color — no hardcoded white */
.pillar-card,
.breath-overview-card,
.breath-cat-tech-card,
.mood-tile,
.technique-card,
.warmup-block-card,
.skills-page-card {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
}
.pillar-card:hover,
.pillar-card:focus-visible,
.breath-overview-card:hover,
.breath-cat-tech-card:hover,
.warmup-block-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

/* Empfangen: Featured-Karten (linker Akzentbalken bleibt, aber dezenter) */
.pillar-card-featured {
  border-left: 3px solid var(--color-primary);
}

/* =============================================================================
   ② AKZENTFARBE — Sage-Grün nur auf Interaktives
   ============================================================================= */

/* Warmup-Icon: neutral statt sage-grün */
.warmup-block-icon {
  color: var(--color-text-muted);
}
.warmup-block-number {
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

/* Mood-Tile-Icons: neutral im Ruhezustand — Farbe kommt erst bei Hover */
.mood-tile .mood-tile-icon {
  color: var(--color-text-muted);
}
.mood-tile:hover .mood-tile-icon,
.mood-tile.selected .mood-tile-icon {
  color: var(--color-primary);
}

/* =============================================================================
   ③ KATEGORIE-SIGNALFARBEN
   Jede Kategorie hat eine eindeutige Farbe — GIVE = Sage-Grün (bewusst reserviert)
   ============================================================================= */

/* Icon-Kontainer: rund, farbig */
.breath-overview-card-icon {
  border-radius: 14px;
  width: 56px;
  height: 56px;
}

/* RECEIVE — Amber-Orange */
.breath-overview-card[data-card="receive"] .breath-overview-card-icon {
  background: var(--clr-receive-bg);
  color: var(--clr-receive);
}

/* HOLD — Slate-Blau */
.breath-overview-card[data-card="hold"] .breath-overview-card-icon {
  background: var(--clr-hold-bg);
  color: var(--clr-hold);
}

/* GIVE — Sage-Grün (THE bewusste Sage-Grün-Verwendung) */
.breath-overview-card[data-card="give"] .breath-overview-card-icon {
  background: var(--clr-give-bg);
  color: var(--clr-give);
}

/* Die Reise — Warm-Braun */
.breath-overview-card[data-card="reise"] .breath-overview-card-icon {
  background: var(--clr-journey-bg);
  color: var(--clr-journey);
}

/* Warmup — Sand */
.breath-overview-card[data-card="warmup"] .breath-overview-card-icon {
  background: var(--clr-skills-bg);
  color: var(--clr-skills);
}

/* Breathhold — Ozean-Blau */
.breath-overview-card[data-card="breathhold"] .breath-overview-card-icon {
  background: var(--clr-breathhold-bg);
  color: var(--clr-breathhold);
}

/* Skills — Sand */
.breath-overview-card--skills .breath-overview-card-icon {
  background: var(--clr-skills-bg);
  color: var(--clr-skills);
}
.breath-overview-card--skills .breath-overview-card-title {
  color: var(--color-text);
}

/* Meine Empfehlungen — Gold */
.breath-overview-card--recs .breath-overview-card-icon {
  background: var(--clr-recs-bg);
  color: var(--clr-recs);
}
.breath-overview-card--recs .breath-overview-card-icon svg {
  color: var(--clr-recs);
}

/* Suchtdruck (Quick-Start) — Ozean-Blau */
.breath-overview-card[data-card="craving"] .breath-overview-card-icon,
.breath-overview-card[data-card="suchtdruck"] .breath-overview-card-icon {
  background: var(--clr-breathhold-bg);
  color: var(--clr-breathhold);
}

/* Rescue — Amber */
.breath-overview-card[data-card="rescue"] .breath-overview-card-icon {
  background: rgba(184,100,90,0.12);
  color: #B8645A;
}


/* =============================================================================
   SESSION — ATEMKREIS-KONTRAST
   —————————————————————————————————————————————————————————————————————————————
   Nacht-Modus (#2a2218): Kreis leuchtet deutlich, äusserer Ring klar sichtbar
   Tag-Modus  (#f5f0e8): Kräftigere Füllung und Border gegen hellen Hintergrund
   ============================================================================= */

/* --- NACHT-MODUS --- */
body.breath-session-active .breathing-circle-inner {
  background: radial-gradient(circle at 40% 35%,
    rgba(110, 170, 140, 0.92) 0%,
    rgba(91,  138, 114, 0.58) 45%,
    rgba(91,  138, 114, 0.18) 100%
  ) !important;
}
body.breath-session-active .breathing-circle-outer {
  border: 2px solid rgba(120, 180, 150, 0.80) !important;
  box-shadow: 0 0 28px rgba(91, 138, 114, 0.30),
              0 0 60px rgba(91, 138, 114, 0.12) !important;
}
body.breath-session-active .breathing-circle-ring {
  border: 1.5px solid rgba(91, 138, 114, 0.40) !important;
}

/* --- TAG-MODUS --- */
body.breath-session-active.session-day-mode .breathing-circle-inner {
  background: radial-gradient(circle at 40% 35%,
    rgba(91, 138, 114, 0.75) 0%,
    rgba(91, 138, 114, 0.40) 50%,
    rgba(91, 138, 114, 0.10) 100%
  ) !important;
}
body.breath-session-active.session-day-mode .breathing-circle-outer {
  border: 2px solid rgba(91, 138, 114, 0.70) !important;
  box-shadow: 0 0 20px rgba(91, 138, 114, 0.18) !important;
}
body.breath-session-active.session-day-mode .breathing-circle-ring {
  border: 1.5px solid rgba(91, 138, 114, 0.30) !important;
}


/* ─────────────────────────────────────────────────────────────
   Stimmungsverlauf — 30-day mood trend chart
   ───────────────────────────────────────────────────────────── */
.mood-trend-chart {
  padding-top: 0.25rem;
}
.mood-insight {
  font-size: 13px;
  color: var(--color-text-light, #7a6e60);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

/* 30-day calendar strip */
.mood-strip {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mood-strip::-webkit-scrollbar { display: none; }

.mood-strip-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 9px;
  flex: 1;
}
.mood-strip-day--today .mood-strip-num {
  color: var(--clr-give, #5B8A72);
  font-weight: 700;
}

.mood-strip-dots {
  display: flex;
  flex-direction: column;
  gap: 1px;
  align-items: center;
  min-height: 24px;
  justify-content: flex-end;
}

.mood-strip-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mood-strip-dot--neutral {
  background: rgba(0,0,0,0.1);
}

.mood-strip-num {
  font-size: 9px;
  color: var(--color-text-light, #aaa);
  line-height: 1;
  min-height: 10px;
}

/* Legend */
.mood-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.75rem;
}
.mood-legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 12px;
  color: var(--color-text, #3D3229);
}
.mood-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mood-legend-label {
  font-weight: 500;
}
.mood-legend-count {
  color: var(--color-text-light, #999);
  font-size: 11px;
}

/* Empty state */
.mood-trend-empty p {
  font-size: 13px;
  color: var(--color-text-light, #7a6e60);
  margin: 0.5rem 0;
}

/* Locked state */
.profile-section--locked {
  opacity: 0.7;
}
.profile-locked-desc {
  font-size: 13px;
  color: var(--color-text-light, #7a6e60);
  margin: 0.4rem 0 0.75rem;
}

/* ─────────────────────────────────────────────────────────────
   Atmen-Tab: Three-Zone Architecture
   ───────────────────────────────────────────────────────────── */

/* Zone 2: Featured Cards (compact horizontal) */
.zone-featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.featured-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  min-height: 60px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #E0D5C7);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
}
.featured-card:hover {
  border-color: var(--color-primary, #4a7a5e);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.featured-card:active {
  transform: scale(0.98);
}
.featured-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(196, 120, 74, 0.15);
  color: #C4784A;
}
.featured-card--recs .featured-card-icon {
  background: rgba(74, 122, 94, 0.15);
  color: var(--color-primary, #4a7a5e);
}
.featured-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.featured-card-title {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.featured-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #C4784A, #8B5E3C);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.featured-card-sub {
  font-size: 11px;
  color: var(--color-text-muted, #7a6e60);
  line-height: 1.3;
}
.featured-card-arrow {
  flex-shrink: 0;
  color: var(--color-text-faint, #bbb);
}

/* Zone 3: Bento Grid */
.zone-library {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bento-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.bento-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 8px 14px;
  background: var(--color-surface, #fff);
  border: 1.5px solid var(--color-border, #E0D5C7);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  min-height: 0;
}
.bento-card:hover {
  border-color: var(--color-primary, #4a7a5e);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.bento-card:active {
  transform: scale(0.97);
}
.bento-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bento-card-icon svg {
  width: 36px;
  height: 36px;
}
.bento-card-label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #3D3229);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bento-badge {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-warning, #b8860b);
  background: rgba(184, 134, 11, 0.12);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 3px;
  padding: 1px 4px;
}

/* Primary bento: category signal colors */
.bento-card--primary[data-card="receive"] .bento-card-icon { color: var(--clr-receive, #C4784A); }
.bento-card--primary[data-card="hold"]    .bento-card-icon { color: var(--clr-hold, #5278A8); }
.bento-card--primary[data-card="give"]    .bento-card-icon { color: var(--clr-give, #5B8A72); }

/* Secondary bento: muted tone */
.bento-card--secondary {
  padding: 14px 8px 10px;
}
.bento-card--secondary .bento-card-icon {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}
.bento-card--secondary .bento-card-icon svg {
  width: 28px;
  height: 28px;
}
.bento-card--secondary .bento-card-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted, #7a6e60);
}



/* ─────────────────────────────────────────────────────────────
   Atmen-Tab: Compact Mood Tiles + Zone Separation
   ───────────────────────────────────────────────────────────── */

/* Override mood tiles: compact, tighter spacing */
.mood-tiles {
  gap: 8px !important;
}
.mood-tile {
  padding: 10px 4px 8px !important;
  gap: 4px !important;
  border-radius: 10px !important;
}
.mood-tile-icon {
  width: 32px !important;
  height: 32px !important;
}
.mood-tile-icon svg {
  width: 28px !important;
  height: 28px !important;
}
.mood-tile-label {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

/* Rescue: standalone button */
.rescue-standalone {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: rgba(213, 90, 90, 0.04);
  border: 1.5px solid rgba(213, 90, 90, 0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}
.rescue-standalone:hover {
  border-color: #D45A5A;
  background: rgba(213, 90, 90, 0.07);
  transform: translateY(-1px);
}
.rescue-standalone:active {
  transform: scale(0.98);
}
.rescue-standalone-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D45A5A;
}
.rescue-standalone-icon svg {
  width: 28px;
  height: 28px;
}
.rescue-standalone-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rescue-standalone-label {
  font-size: 14px;
  font-weight: 600;
  color: #D45A5A;
}
.rescue-standalone-sub {
  font-size: 11px;
  color: var(--color-text-muted, #7a6e60);
}

/* Mood picker: less space below */
.mood-picker {
  margin-bottom: 16px !important;
}
.mood-picker-welcome {
  margin-bottom: 12px !important;
}
.mood-picker-title {
  font-size: 16px !important;
}
.mood-picker-subtitle {
  font-size: 12px !important;
}
.mood-picker-heading {
  font-size: 13px !important;
  margin-bottom: 10px !important;
}

/* Zone labels */
.zone-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted, #7a6e60);
  margin-bottom: 10px;
  opacity: 0.6;
}

/* Zone featured: tighter margins */
.zone-featured {
  margin-bottom: 20px;
}

/* Zone library: subtle top border to mark the section */
.zone-library {
  padding-top: 16px;
  border-top: 1px solid rgba(224, 213, 199, 0.4);
}

/* ─────────────────────────────────────────────────────────────
   Coverflow Carousel — Receive / Hold / Give
   ───────────────────────────────────────────────────────────── */
.coverflow-wrap {
  margin: 0 -16px 8px;
  overflow: hidden;
  touch-action: pan-y;
}
.coverflow {
  position: relative;
  height: 110px;
  width: 100%;
}
.cf-card {
  position: absolute;
  width: 52%;
  left: 50%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px 12px;
  background: var(--color-surface, #fff);
  border: 1.5px solid var(--color-border, #E0D5C7);
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
              opacity 0.4s ease,
              box-shadow 0.4s ease;
  will-change: transform;
}
.cf-card:active {
  filter: brightness(0.97);
}
.cf-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cf-card-icon svg {
  width: 30px;
  height: 30px;
}
.cf-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text, #3D3229);
}
.cf-card-sub {
  font-size: 10px;
  color: var(--color-text-muted, #7a6e60);
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

/* Category signal colors */
.cf-card[data-card="receive"] .cf-card-icon { color: var(--clr-receive, #C4784A); }
.cf-card[data-card="hold"]    .cf-card-icon { color: var(--clr-hold, #5278A8); }
.cf-card[data-card="give"]    .cf-card-icon { color: var(--clr-give, #5B8A72); }

.cf-card[data-card="receive"] { border-color: rgba(196,120,74,0.2); }
.cf-card[data-card="hold"]    { border-color: rgba(82,120,168,0.2); }
.cf-card[data-card="give"]    { border-color: rgba(91,138,114,0.2); }

/* ─── Prominent Mood Heading ─── */
.mood-picker-heading {
  font-family: 'Cormorant Garamond', 'Georgia', serif !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  color: var(--color-text, #3D3229) !important;
  text-align: center !important;
  margin: 16px 0 16px !important;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.mood-picker-title {
  font-family: 'Cormorant Garamond', 'Georgia', serif !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
}

/* ─── Bigger Mood Tiles ─── */
.mood-tile {
  padding: 16px 6px 14px !important;
  gap: 6px !important;
  border-radius: 14px !important;
}
.mood-tile-icon {
  width: 40px !important;
  height: 40px !important;
}
.mood-tile-icon svg {
  width: 34px !important;
  height: 34px !important;
}
.mood-tile-label {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

/* Mood picker spacing */
.mood-picker {
  margin-bottom: 20px !important;
}

/* ─────────────────────────────────────────────────────────────
   Calendar / Schedule Button — Journal-style card
   ───────────────────────────────────────────────────────────── */
/* Calendar icon-only button — centered, no text */
.calendar-toggle-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  color: var(--color-text, #3D3229) !important;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s, background 0.2s !important;
  opacity: 0.7;
}
.calendar-toggle-btn:hover {
  opacity: 1;
  transform: scale(1.12) !important;
  background: rgba(61, 50, 41, 0.04) !important;
  color: var(--clr-give, #5B8A72) !important;
}
.calendar-toggle-btn:active {
  transform: scale(0.95) !important;
}
.calendar-section {
  border-top: none !important;
  margin-top: 8px !important;
  padding-top: 0 !important;
}

/* ─── Android edge-to-edge: header respects status bar ─── */
body.native-app .site-header,
body.native-app .app-header {
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px) !important;
}
