/* ============================================================
   dee-fit App — Kunden-Portal (Demo/Entwurf)
   dee-fit CI: primary #556F57 · secondary #FFEAB0 · heading-green #416645
   text #424242 · accent-dark #212121 · bg-warm #FCF5F0 · gray #757575
   ============================================================ */

* { box-sizing: border-box; }

:root {
  --training-proof-line: #D8D0C6;
  --training-proof-text: #424242;
  --training-proof-bg: #FCF5F0;
  --training-proof-backdrop: rgba(0,0,0,.45);
  --accent: #8F6F2E;
  --world-training: #8F6F2E;
  --world-training-deep: #654D20;
  --world-nutrition: #E8C49E;
  --world-nutrition-deep: #654329;
  --world-coaching: #4F6D56;
  --world-coaching-deep: #203B2B;
  --world-meditation: #DFECEF;
  --world-meditation-deep: #31505A;
  --radius-card: 28px;
  --radius-inset: 16px;
  --radius-control: 12px;
  --space-card: 24px;
  --space-section: 20px;
  --shadow-soft: 0 8px 24px rgba(65, 102, 69, 0.08);
  --shadow-elevated: 0 18px 40px rgba(65, 102, 69, 0.16);
  --motion-fast: 160ms;
  --motion-enter: 220ms;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", sans-serif;
  color: #424242;
  background: #FCF5F0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Abhaya Libre", Georgia, serif;
  color: #416645;
  font-weight: 800;
  margin: 0 0 10px;
}

a { color: #556F57; }
p { margin: 0 0 12px; line-height: 1.5; }

.btn {
  display: inline-block;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  padding: 11px 26px;
  border-radius: var(--radius-control);
  border: 2px solid #556F57;
  background: #556F57;
  color: #FFEAB0;
  cursor: pointer;
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease, border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.btn:hover { background: transparent; color: #556F57; }

.btn-outline {
  background: transparent;
  color: #556F57;
}
.btn-outline:hover { background: #556F57; color: #FFEAB0; }

.btn-sm { padding: 7px 16px; font-size: 12.5px; border-radius: var(--radius-control); }

/* ---------- Entwurf-Badge ---------- */

.draft-banner {
  background: #212121;
  color: #FFEAB0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 12px;
}
.draft-banner strong { color: #fff; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */

#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #FCF5F0 0%, #F3E7D8 100%);
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  padding: 44px 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
}
.login-card img.login-logo { height: 52px; margin: 0 auto 22px; display: block; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card .sub { color: #757575; font-size: 13.5px; margin-bottom: 26px; }

.field { text-align: left; margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #757575;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.field input, .field select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-control);
  border: 1.5px solid #E5DACB;
  background: #FCF5F0;
  font-size: 14px;
  font-family: inherit;
  color: #424242;
}
.field input:focus, .field select:focus { outline: none; border-color: #556F57; }
.field-hint { display: block; font-size: 11px; color: #757575; margin-top: 4px; }

/* Passwort ein-/ausblenden: Auge liegt im Feld, Wert bleibt beim Umschalten. */
.pw-field { position: relative; }
.pw-field input { padding-right: 48px; }
.pw-toggle {
  position: absolute; top: 0; right: 0; height: 100%; width: 44px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; padding: 0; color: #757575;
}
.pw-toggle:hover { color: #416645; }
/* Lucide "eye" / "eye-off" — dieselben Icons wie im Rest der App, hier inline,
   damit auch die oeffentliche Seite (ohne lucide.min.js) sie zeigen kann. */
.pw-icon { display: block; width: 19px; height: 19px; }
.pw-icon-off { display: none; }
.pw-toggle[aria-pressed="true"] .pw-icon-on { display: none; }
.pw-toggle[aria-pressed="true"] .pw-icon-off { display: block; }

.login-card .btn { width: 100%; margin-top: 6px; }
.login-hint { margin-top: 18px; font-size: 11.5px; color: #757575; }

.link-btn {
  display: block; margin: 14px auto 0; background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: #556F57; text-decoration: underline;
  font-family: inherit; text-align: center; width: 100%;
}
.link-btn:hover { color: #8F6F2E; }

/* ---------- Auth tabs (Login / Registrierung) ---------- */

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #EFE7DE;
  border-radius: var(--radius-inset);
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: var(--radius-control);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #757575;
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-tab.active { background: #fff; color: #8F6F2E; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-error {
  background: #FBEAEA;
  color: #B23A3A;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: left;
}

.auth-success {
  background: #EAF2EA;
  color: #416645;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: left;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #757575;
  margin-bottom: 16px;
  cursor: pointer;
}
.checkbox-row input { width: 18px; height: 18px; accent-color: #556F57; cursor: pointer; }

/* ============================================================
   APP-START-SPLASH — kurzer Ladebildschirm mit drehendem DFID-Kreis,
   überdeckt alles bis bootAfterAuth() fertig ist, blendet dann sanft aus.
   ============================================================ */

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: #FCF5F0;
  transition: opacity 420ms ease, visibility 420ms ease;
}
.app-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.app-splash-ring {
  width: 84px;
  height: 84px;
  animation: app-splash-spin 1.6s linear infinite;
}
@keyframes app-splash-spin { to { transform: rotate(360deg); } }
.app-splash-claim {
  font-family: "Abhaya Libre", Georgia, serif;
  font-size: 15.5px;
  color: #416645;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0 28px;
  max-width: 320px;
}
@media (prefers-reduced-motion: reduce) {
  .app-splash-ring { animation-duration: 3.2s; }
}

/* ============================================================
   HOME-BILDSCHIRM-HINWEIS — dezenter, schließbarer Banner: nativer
   Android-Installieren-Button (beforeinstallprompt) oder iOS-Anleitung.
   ============================================================ */

.install-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 18px 0;
  padding: 12px 14px;
  border-radius: var(--radius-inset);
  background: #EEF3EC;
  border: 1px solid #DCE6D9;
}
.install-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.install-banner-text strong { font-size: 13.5px; color: #416645; }
.install-banner-text span { font-size: 12.5px; color: #556052; line-height: 1.4; }
.install-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.install-banner-actions .btn { padding: 8px 16px; font-size: 12.5px; }
.install-banner-dismiss {
  background: none; border: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: #7C8B76;
  padding: 6px; border-radius: 50%;
}
.install-banner-dismiss:hover { background: rgba(65, 102, 69, 0.08); }
@media (min-width: 900px) { .install-banner { margin: 20px 40px 0; } }

/* ============================================================
   APP SHELL — native-app-Gefühl: Topbar oben, Content mittig
   scrollbar, feste Bottom-Nav (Tab-Bar) unten
   ============================================================ */

.app-shell { display: none; min-height: 100vh; flex-direction: column; }
.app-shell.active { display: flex; }

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(239, 231, 222, 0.8);
  box-shadow: 0 4px 20px rgba(65, 102, 69, 0.06);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-logo { height: 28px; display: block; }
.topbar-user {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.topbar-user:hover, .topbar-user:focus-visible { transform: translateY(-1px); }
.user-avatar-sm {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(145deg, #5F7A61, #45603F);
  color: #FFEAB0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13.5px;
  box-shadow: 0 3px 10px rgba(65, 102, 69, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.user-avatar-lg {
  width: 64px; height: 64px; border-radius: 50%;
  background: #8F6F2E; color: #FFEAB0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  margin: 0 auto;
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 18px calc(96px + env(safe-area-inset-bottom, 0px));
}

.tab-section { display: none; }
.tab-section.active { display: block; }

.page-header { margin-bottom: 18px; }
.page-header .eyebrow {
  font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #556F57; display: block; margin-bottom: 6px;
}

/* ---------- Segmented control (Sub-Navigation innerhalb eines Tabs) ---------- */

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: #EFE7DE;
  border-radius: var(--radius-inset);
  padding: 4px;
  margin-bottom: var(--space-section);
}
.segment {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  border: none;
  background: transparent;
  padding: 10px 8px;
  border-radius: var(--radius-control);
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 12.5px;
  color: #757575;
  cursor: pointer;
  transition: all 0.18s ease;
}
.segment.active {
  background: #416645;
  color: #fff;
  box-shadow: 0 2px 8px rgba(65, 102, 69, 0.28);
}

.sub-panel { display: none; }
.sub-panel.active { display: block; }

/* ---------- Cards / grids ---------- */

.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: var(--space-card);
  margin-bottom: var(--space-section);
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.logout-link {
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: #757575;
  padding: 10px 0; text-align: left; width: 100%; font-family: inherit;
}
.logout-link:hover { color: #8F6F2E; }

/* ---------- Fixed bottom navigation (Tab-Bar) ---------- */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  background: #fff;
  border-top: 1px solid #EFE7DE;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.06);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav-item {
  flex: 1;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
  color: #757575;
  font-family: "Nunito", sans-serif;
  transition: color 0.15s ease, background 0.15s ease;
}
.bottom-nav-item .bn-ic { font-size: 21px; line-height: 1; }
.bottom-nav-item .bn-label { font-size: 10.5px; font-weight: 700; }
.bottom-nav-item.active { color: #8F6F2E; }
.bottom-nav-item.active .bn-ic { transform: translateY(-1px); }
.bottom-nav-item:active { background: #FCF5F0; }

@media (max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .app-content { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Dashboard ---------- */

.welcome-banner {
  position: relative;
  color: #fff;
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 28px 30px 30px;
  margin-bottom: var(--space-section);
  background-image: linear-gradient(135deg, rgba(65,102,69,0.60) 0%, rgba(94,132,97,0.46) 55%, rgba(163,187,144,0.36) 100%), url("assets/worlds/meditation.jpg");
  background-size: cover;
  background-position: center 30%;
  box-shadow: 0 14px 34px rgba(20, 40, 28, 0.24);
}
.welcome-banner h2 { color: #fff; font-size: 24px; margin-bottom: 6px; text-shadow: 0 1px 5px rgba(18,30,20,0.38); }
.welcome-banner p { color: #F6F9F2; margin-bottom: 0; text-shadow: 0 1px 4px rgba(18,30,20,0.32); }

.progress-track {
  background: #EFE7DE;
  border-radius: 20px;
  height: 14px;
  overflow: hidden;
  margin: 10px 0 6px;
}
.progress-fill {
  background: #FFEAB0;
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s ease;
}
.progress-label { font-size: 12.5px; color: #EAF0E7; }
.welcome-banner .progress-label { color: #F6F9F2; text-shadow: 0 1px 4px rgba(18,30,20,0.32); }

.stat-card { text-align: center; }
.stat-card .num { font-family: "Abhaya Libre", serif; font-size: 30px; color: #416645; font-weight: 800; }
.stat-card .label { font-size: 12px; color: #757575; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Trainingsplan ---------- */

.plan-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid #EFE7DE;
}
.plan-day:last-child { border-bottom: none; }
.plan-day .day-name { font-weight: 800; color: #416645; width: 108px; flex: none; font-size: 13.5px; }
.plan-day .exercise { flex: 1; font-size: 13.5px; }
.plan-check { width: 20px; height: 20px; accent-color: #556F57; cursor: pointer; }

/* ---------- Ernährungsplan / Upsell ---------- */

.meal-row { padding: 10px 0; border-bottom: 1px dashed #EFE7DE; font-size: 13.5px; }
.meal-row:last-child { border-bottom: none; }
.meal-row .meal-time { font-weight: 800; color: #556F57; display: inline-block; width: 90px; }

.upsell-lock {
  position: relative;
  background: #FCF5F0;
  border: 1.5px dashed #556F57;
  border-radius: var(--radius-card);
  padding: 24px;
  text-align: center;
  margin-top: 10px;
}
.upsell-lock .lock-ic { font-size: 26px; margin-bottom: 8px; }
.upsell-lock h4 { margin-bottom: 6px; }
.upsell-lock p { color: #757575; font-size: 13px; }
.upsell-price { font-family: "Abhaya Libre", serif; color: #416645; font-size: 20px; font-weight: 800; margin: 8px 0 14px; }

/* ---------- Datum-Navigation (Aufgaben / Gericht des Tages) ---------- */

.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #EFE7DE;
  border-radius: var(--radius-inset);
  padding: 6px;
  margin-bottom: 16px;
}
.date-nav-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  border: none;
  background: #fff;
  color: #556F57;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.date-nav-btn:hover { color: #8F6F2E; }
.date-nav-label { flex: 1; text-align: center; font-weight: 800; font-size: 13px; color: #416645; }

/* ---------- Tageskarten (zugewiesene Übung / Gericht des Tages) ---------- */

.day-card { display: flex; align-items: flex-start; gap: 14px; }
.day-card-img { flex: none; width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #FCF5F0; }
.day-card-body { flex: 1; min-width: 0; }
.day-card-title { font-size: 14.5px; margin-bottom: 4px; color: #424242; }
.day-card-title.done-text { text-decoration: line-through; color: #9c9c9c; }
.day-card-body details { margin-top: 6px; }
.day-card-body details summary { cursor: pointer; font-weight: 700; color: #556F57; font-size: 12.5px; }
.day-card-body details p { font-size: 13px; color: #424242; margin-top: 6px; white-space: pre-line; }
.day-card .task-check { flex: none; width: 20px; height: 20px; accent-color: #556F57; cursor: pointer; margin-top: 4px; }

/* ---------- Accordion ("Zusätzliche Punkte von Dee" / "Meine Aufgaben") ---------- */

.accordion {
  background: #FCF5F0;
  border: 1.5px solid #EFE7DE;
  border-radius: var(--radius-inset);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.accordion summary {
  cursor: pointer;
  font-weight: 800;
  color: #416645;
  font-size: 14px;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
}
.accordion[open] summary { margin-bottom: 10px; }
.accordion[open] summary::before { transform: rotate(90deg); }
.accordion .checklist-item { margin-bottom: 0; padding: 10px 0; border-bottom: 1px solid #E5DACB; }
.accordion .checklist-item:last-child { border-bottom: none; }
.accordion .checklist-item.done-text span { text-decoration: line-through; color: #9c9c9c; }
.profile-accordion { margin-top: 14px; }
.profile-accordion summary { display: flex; align-items: center; gap: 8px; }
.profile-accordion[open] .form-grid { margin-top: 4px; }
.fieldset-required { border-top: none !important; }
.fieldset-required + .fieldset-required { margin-top: 8px !important; padding-top: 0 !important; }

/* ---------- Fortschritt / Charts ---------- */

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; margin: 16px 0 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; background: #556F57; border-radius: 6px 6px 0 0; transition: height 0.5s ease; }
.bar-col .bar-label { font-size: 11px; color: #757575; margin-top: 6px; }
.bar-col.today .bar { background: #FFBC7D; }

.weight-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #EFE7DE; font-size: 13.5px; }
.weight-row:last-child { border-bottom: none; }

.wellbeing-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.wellbeing-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid #EFE7DE;
  background: #fff; font-family: "Nunito", sans-serif; font-weight: 800; font-size: 13px;
  color: #556F57; cursor: pointer; transition: all 0.15s ease;
}
.wellbeing-btn:hover { border-color: #556F57; background: #F4F8F1; }
.wellbeing-btn:disabled { cursor: default; opacity: 0.55; }
.wellbeing-btn-selected { border-color: #556F57 !important; background: #556F57 !important; color: #fff !important; opacity: 1 !important; }

/* ---------- Life-Coaching Tools ---------- */

.script-quote {
  font-family: "Mrs Saint Delafield", cursive;
  color: #FFBC7D;
  font-size: 26px;
  text-align: center;
  margin: 6px 0 20px;
}

textarea.journal-input {
  width: 100%;
  min-height: 110px;
  border-radius: 10px;
  border: 1.5px solid #E5DACB;
  background: #FCF5F0;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13.5px;
  color: #424242;
  resize: vertical;
}
textarea.journal-input:focus { outline: none; border-color: #556F57; }

.journal-entry {
  background: #FCF5F0;
  border-radius: var(--radius-inset);
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 13px;
}
.journal-entry .entry-date { font-size: 11px; color: #757575; margin-bottom: 4px; display: block; }

.meditation-player {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #FCF5F0;
  border-radius: var(--radius-inset);
  padding: 18px 20px;
}
.play-btn {
  width: 52px; height: 52px; border-radius: 50%;
  background: #556F57; color: #FFEAB0;
  border: none; font-size: 18px; cursor: pointer;
  flex: none;
  display: flex; align-items: center; justify-content: center;
}
.med-track-name { font-weight: 800; color: #416645; }
.med-track-sub { font-size: 12px; color: #757575; }
.med-timer { font-family: "Abhaya Libre", serif; font-size: 20px; color: #416645; margin-left: auto; }

.goal-form .field { margin-bottom: 14px; }
.goal-card {
  background: #FCF5F0;
  border-left: 4px solid #556F57;
  border-radius: var(--radius-inset);
  padding: 16px 18px;
  margin-top: 14px;
}
.goal-card .goal-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #757575; }

/* ---------- Termine ---------- */

.appointment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.appointment-card .when { font-family: "Abhaya Libre", serif; font-size: 18px; color: #416645; font-weight: 800; }

/* ---------- Challenge ---------- */

.challenge-card { text-align: center; }
.challenge-card .eyebrow { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8F6F2E; margin-bottom: 4px; }
.challenge-card .challenge-text { font-size: 15px; color: #212121; margin: 6px 0; text-align: left; }
.challenge-card .challenge-text:first-of-type { font-size: 17px; margin-top: 10px; }
.challenge-safety {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  background: #FCF0E4; color: #7A4B21; font-size: 13px; line-height: 1.5;
  border-radius: 12px; padding: 10px 14px; margin: 12px 0;
}
.challenge-safety i { flex: none; margin-top: 2px; width: 16px; height: 16px; }
.streak-badge {
  display: inline-block;
  background: #FFEAB0;
  color: #212121;
  font-weight: 800;
  font-size: 12.5px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-top: 12px;
}

/* ---------- Value Ladder / Pricing ---------- */

.tier-card {
  border: 2px solid #EFE7DE;
  border-radius: var(--radius-card);
  padding: 22px 18px;
  text-align: center;
  background: #fff;
}
.tier-card.current { border-color: #556F57; background: #FCF5F0; }
.tier-card .tier-name { font-family: "Abhaya Libre", serif; font-weight: 800; color: #416645; font-size: 17px; }
.tier-card .tier-price { font-size: 26px; font-weight: 800; color: #212121; margin: 8px 0; }
.tier-card .tier-price span { font-size: 13px; color: #757575; font-weight: 600; }
.tier-badge {
  display: inline-block; background: #556F57; color: #FFEAB0;
  font-size: 10.5px; font-weight: 800; padding: 3px 10px; border-radius: 10px;
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em;
}
.hyrox-status-badge {
  display: inline-block; background: #FCF5F0; color: #416645; border: 1px solid #556F57;
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 10px; max-width: 100%;
}

.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #212121;
  color: #FFEAB0;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Onboarding hint boxes (dezent, ausblendbar) ---------- */

.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #FFF8EC;
  border: 1px solid #F0DFC0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #6B5A3E;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.35s ease, max-height 0.35s ease, padding 0.35s ease, margin 0.35s ease;
}
.hint-box p { margin: 0; flex: 1; line-height: 1.45; }
.hint-ic { flex: none; font-size: 15px; line-height: 1.4; }
.hint-dismiss {
  flex: none;
  background: none;
  border: none;
  color: #B0A181;
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 0 6px;
  line-height: 1.4;
}
.hint-dismiss:hover { color: #8F6F2E; }
.hint-box.hidden-hint {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  border-width: 0;
  pointer-events: none;
}

/* ---------- Feedback boxes (client → Dee, 7 Bereiche) ---------- */

.feedback-box h4 { font-size: 14px; margin-bottom: 10px; }
.feedback-input {
  width: 100%;
  min-height: 70px;
  border-radius: 10px;
  border: 1.5px solid #E5DACB;
  background: #FCF5F0;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: #424242;
  resize: vertical;
}
.feedback-input:focus { outline: none; border-color: #556F57; }
.feedback-box .btn { margin-top: 10px; }

/* ---------- Kommentare zu Dee / Notizen von Dee (Task #180 E3) ----------
   Ein gemeinsamer Bereich am Ende jedes Abschnitts: mobil untereinander,
   ab 700px nebeneinander. Eine ausgeblendete Spalte ([hidden]) nimmt keinen
   Platz weg, dann läuft die andere über die volle Breite. */

.dee-exchange {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: var(--space-card);
  margin: var(--space-section) 0;
}
.dee-exchange-inset {
  background: none;
  box-shadow: none;
  border-radius: 0;
  border-top: 1.5px solid #EFE7DE;
  padding: 16px 0 0;
  margin: 16px 0 0;
}
.dee-exchange .dee-exchange-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 14px; color: #2f2a22; }
.dee-exchange-title svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.dee-exchange-grid { display: grid; gap: 14px; }
.dee-exchange-col {
  min-width: 0;
  background: #FCF5F0;
  border: 1.5px solid #EFE7DE;
  border-radius: var(--radius-inset);
  padding: 14px 16px;
}
.dee-exchange-label {
  display: flex; align-items: center; gap: 6px;
  font-family: "Nunito", sans-serif; font-weight: 800; font-size: 14px;
  color: #416645; margin: 0 0 8px;
}
.dee-exchange-label svg { width: 16px; height: 16px; flex: none; }
.dee-exchange-help { font-size: 12.5px; color: #757575; margin: 0 0 6px; }
.dee-exchange .feedback-input { background: #fff; }
.dee-exchange-list .checklist-item { margin-bottom: 0; padding: 10px 0; border-bottom: 1px solid #E5DACB; }
.dee-exchange-list .checklist-item:last-child { border-bottom: none; }
.dee-exchange-list .checklist-item.done-text span { text-decoration: line-through; color: #9c9c9c; }
@media (min-width: 700px) {
  .dee-exchange-grid { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
}

.feedback-entry {
  background: #FCF5F0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 8px;
  font-size: 13px;
}
.feedback-entry .entry-date { font-size: 11px; color: #757575; display: block; }
.feedback-entry:first-child { margin-top: 0; }
.feedback-entry.done-text { opacity: 0.6; }

.meditation-track { text-align: left; }

/* ---------- Admin: client list ---------- */

#admin-client-list { margin-bottom: 22px; }
.client-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: #fff;
  border: 1.5px solid #EFE7DE;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.client-list-item:hover { border-color: #8F6F2E; transform: translateY(-1px); }
.client-list-info { display: flex; flex-direction: column; gap: 2px; }
.client-list-name { font-weight: 800; color: #416645; font-size: 14.5px; }
.client-list-meta { font-size: 12px; color: #757575; }

.admin-client-detail { margin-top: 6px; }

/* ---------- Admin: plan editor rows ---------- */

.plan-editor-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}
.plan-editor-row input,
.plan-editor-row textarea {
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid #E5DACB;
  background: #FCF5F0;
  font-size: 13.5px;
  font-family: inherit;
  color: #424242;
}
.plan-editor-row textarea { resize: vertical; min-height: 60px; width: 100%; }
.plan-editor-row input:focus, .plan-editor-row textarea:focus { outline: none; border-color: #556F57; }
.row-remove {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: none;
  background: #FBEAEA;
  color: #B23A3A;
  cursor: pointer;
  font-size: 13px;
}

/* ---------- Admin: Meditationen ---------- */

.med-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid #EFE7DE;
}
.med-admin-row:last-child { border-bottom: none; }
.med-admin-title { font-weight: 700; color: #416645; font-size: 13.5px; }

/* ---------- Admin: Bibliothek (Übungen & Gerichte) ---------- */

.lib-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid #EFE7DE;
}
.lib-item:last-child { border-bottom: none; }
.lib-assign-panel {
  flex-basis: 100%;
  width: 100%;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed #E0D5C8;
}
.lib-assign-panel .form-grid { margin-bottom: 10px; }
.lib-assign-panel .field { margin-bottom: 0; }
.lib-thumb {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: #FCF5F0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-thumb-placeholder { color: #8F6F2E; display: flex; }
.lib-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lib-item-title { font-weight: 700; color: #416645; font-size: 13.5px; overflow-wrap: anywhere; }
.lib-item-meta { font-size: 11px; color: #757575; }
.lib-item-actions { flex: none; display: flex; gap: 8px; }

/* Ingredient editor uses the same warm inset surfaces as the meal library. */
.ingredient-mode { border: 1px solid #e5dacb; border-radius: 12px; padding: 12px 16px; margin: 12px 0 18px; display: flex; gap: 18px; flex-wrap: wrap; }
.ingredient-mode legend { color: #416645; font-weight: 800; padding: 0 6px; }
.ingredient-mode label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.ingredient-mode input { accent-color: #556f57; }
.ingredient-auto-panel { background: #fcf5f0; border-radius: var(--radius-inset); padding: 18px; margin-bottom: 18px; }
.ingredient-result { display: block; width: 100%; border: 1px solid #e5dacb; border-radius: 10px; background: #fff; color: #416645; font: inherit; font-size: 13px; text-align: left; padding: 10px 12px; cursor: pointer; margin-bottom: 6px; }
.ingredient-result:hover { border-color: #556f57; }
.ingredient-results { max-height: 260px; overflow-y: auto; margin-bottom: 12px; font-size: 13px; }
.ingredient-error { color: #a03c3c; font-size: 13px; }
.ingredient-row { display: grid; grid-template-columns: minmax(0, 1fr) 95px 100px auto; align-items: end; gap: 8px; border-top: 1px solid #e5dacb; padding: 12px 0; }
.ingredient-row strong { min-width: 0; overflow-wrap: anywhere; align-self: center; color: #416645; font-size: 13px; }
.ingredient-row label { font-size: 11px; color: #757575; font-weight: 700; }
.ingredient-row input, .ingredient-row select { display: block; width: 100%; padding: 8px; border: 1px solid #e5dacb; border-radius: 8px; background: #fff; font: inherit; color: #424242; }
.ingredient-preview { background: #eaf0e7; color: #315038; border-radius: 12px; padding: 12px 14px; margin: 14px 0; font-size: 13px; line-height: 1.6; }
.template-day-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 16px; border-top: 1px solid #cddccc; padding-top: 8px; margin-top: 8px; }
@media (max-width: 520px) {
  .ingredient-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ingredient-row strong { grid-column: 1 / -1; }
  .ingredient-row .btn { grid-column: 1 / -1; }
  .ingredient-auto-panel { padding: 12px; }
}

/* ---------- Admin: Zuweisungen & Zusätzliche Punkte ---------- */

.assign-list { margin-top: 14px; }
.assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #EFE7DE;
}
.assign-row:last-child { border-bottom: none; }
.assign-date { flex: none; font-size: 11.5px; font-weight: 700; color: #8F6F2E; }
.assign-title { flex: 1; min-width: 0; font-size: 13.5px; color: #424242; overflow-wrap: anywhere; }
.checklist-cat-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 700;
  color: #416645;
  background: #e6f0e6;
  border-radius: 6px;
  padding: 3px 7px;
}

/* ---------- Responsive profile and package operations ---------- */

[hidden] { display: none !important; }
.app-shell, .app-content, .tab-section, .sub-panel, .card, .client-list-info { min-width: 0; }
.card, .hint-box, .client-list-item, .feature-summary { overflow-wrap: anywhere; }
input, select, textarea, audio { max-width: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(143, 111, 46, 0.35);
  outline-offset: 2px;
}

.profile-prompt {
  background: #fff8ec;
  border: 1px solid #e6c98d;
  border-left: 4px solid #8F6F2E;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.profile-prompt p { margin: 4px 0 0; font-size: 13px; }
.profile-form-head, .package-title-row, .package-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-form-head h3 { margin-bottom: 0; }
.privacy-badge, .field-required, .field-optional {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 9.5px;
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: none;
  vertical-align: middle;
}
.privacy-badge, .field-required { background: #e6f0e6; color: #416645; }
.field-optional { background: #efe7de; color: #6b625c; }
.section-help { color: #6f6f6f; font-size: 13px; margin-bottom: 18px; }
.profile-form fieldset, .catalog-item fieldset {
  border: 0;
  border-top: 1px solid #efe7de;
  margin: 22px 0 0;
  padding: 18px 0 0;
  min-width: 0;
}
.profile-form legend, .catalog-item legend {
  color: #416645;
  font-family: "Abhaya Libre", Georgia, serif;
  font-size: 17px;
  font-weight: 800;
  padding-right: 10px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field textarea, .catalog-item textarea {
  width: 100%;
  min-height: 82px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid #e5dacb;
  background: #fcf5f0;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.medical-note {
  background: #fff8ec;
  border-radius: 10px;
  padding: 12px 14px;
  color: #6b5a3e;
  font-size: 12.5px;
  line-height: 1.5;
  margin: 8px 0 14px;
}
.consent-row { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: 13px; line-height: 1.45; }
.consent-row input { flex: 0 0 auto; width: 19px; height: 19px; accent-color: #556f57; margin-top: 1px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.save-status { color: #556f57; font-size: 12.5px; }
.profile-delete {
  width: 100%;
  margin-top: 18px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid #efe7de;
  background: transparent;
  color: #a03c3c;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.feature-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chip { background: #e6f0e6; color: #416645; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; }
/* Zugangsliste der Mitgliedsstufen (Issue #38): eine Zeile je Bereich,
   Zustand immer an derselben Stelle — ✓ enthalten / 🔒 höhere Stufe / ＋ dazubuchbar. */
.access-list { display: grid; gap: 6px; }
/* Task #178: Der Zustandstext rechts darf umbrechen und höchstens 45 % der
   Zeile belegen. Vorher (nowrap in einer auto-Spalte) war die Zeile breiter
   als das Handy, die Seite ließ sich seitlich schieben und "Meditationen"
   stand Buchstabe für Buchstabe untereinander. */
.access-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) fit-content(45%); align-items: center; gap: 4px 10px;
  padding: 9px 12px; border: 1px solid #E5DACB; border-radius: var(--radius-inset); background: #FFFCF7; }
.access-row .access-state { font-size: 14px; line-height: 1; text-align: center; }
.access-row .access-name { min-width: 0; font-size: 13px; font-weight: 700; color: #3d3d3d; overflow-wrap: break-word; hyphens: auto; }
.access-row .access-note { min-width: 0; font-size: 12px; color: #757575; text-align: right; overflow-wrap: break-word; }
@media (max-width: 480px) {
  /* Schmale Handys: Zustandstext als zweite Zeile unter dem Namen. */
  .access-row { grid-template-columns: 22px minmax(0, 1fr); }
  .access-row .access-state { grid-row: 1 / span 2; }
  .access-row .access-note { grid-column: 2; text-align: left; }
}
.access-row.is-included { background: #F2F7F1; border-color: #CFE1CF; }
.access-row.is-included .access-note { color: #416645; }
.access-row.is-locked { opacity: 0.72; }
.access-row.is-addon { background: #FFF8EE; border-color: #E8D5B0; }
.access-row.is-addon .access-note { color: var(--accent, #8F6F2E); font-weight: 700; }
.access-group-title { margin: 14px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: #757575; text-transform: uppercase; }
.tier-price { margin: 2px 0 6px; font-size: 13px; font-weight: 800; color: var(--accent, #8F6F2E); }
.tier-chip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: #EFE7DA; color: #6b6b6b; vertical-align: middle; }
.tier-chip.is-current { background: #E6F0E6; color: #416645; }
.client-package-option.is-current { border-color: #CFE1CF; background: #F2F7F1; }
.client-package-options { display: grid; gap: 12px; }
.client-package-option { padding: 16px; border: 1px solid #E5DACB; border-radius: var(--radius-inset); background: #FFFCF7; }
.client-package-option h4 { margin: 0 0 4px; font-size: 16px; }
.client-package-option p { margin: 0 0 10px; color: #5f5f5f; font-size: 13px; }
.client-package-option .feature-chip { padding: 4px 8px; font-size: 11px; }
.package-option-note { color: #757575; font-size: 12.5px; }

.catalog-item { border: 1px solid #efe7de; border-radius: var(--radius-inset); padding: 16px; margin-bottom: 16px; background: #fffdfb; }
.catalog-item .field { margin-bottom: 12px; flex: 1; }
.catalog-kind { display: inline-block; margin: -6px 0 10px; color: #6b625c; font-size: 11px; font-weight: 700; }
.status-toggle { display: flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; }
.status-toggle input, .feature-check input { width: 18px; height: 18px; accent-color: #556f57; }
.feature-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.feature-check { display: flex; align-items: flex-start; gap: 8px; padding: 9px; border-radius: 8px; background: #fcf5f0; font-size: 12.5px; }
.feature-check input { flex: 0 0 auto; }
.package-footer { border-top: 1px solid #efe7de; margin-top: 16px; padding-top: 14px; color: #757575; font-size: 12px; }

.plan-editor-row label { flex: 1; min-width: 0; }
.plan-editor-row label:first-child { flex: 0 1 150px; }
.plan-editor-row label span { display: block; color: #757575; font-size: 10.5px; font-weight: 700; margin: 0 0 4px 2px; }
.plan-editor-row input { width: 100%; min-width: 0; }
.client-list-info { flex: 1; }
.editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.admin-client-detail.is-loading { opacity: 0.72; }
.detail-loading { color: #757575; font-size: 13px; padding: 12px 0; }

/* Desktop turns the app shell into a real workspace instead of stretching a phone layout. */
@media (min-width: 900px) {
  .app-shell.active {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: 72px minmax(calc(100vh - 72px), auto);
    align-items: start;
  }
  .app-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    align-self: stretch;
    padding: 14px 28px;
  }
  .topbar-logo { height: 36px; }
  .app-content {
    grid-column: 2;
    grid-row: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 40px 56px;
  }
  #client-shell .app-content { max-width: 1100px; }
  .bottom-nav {
    position: sticky;
    grid-column: 1;
    grid-row: 2;
    top: 72px;
    left: auto;
    right: auto;
    bottom: auto;
    width: 220px;
    min-height: calc(100vh - 72px);
    padding: 28px 14px;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    border-top: 0;
    border-right: 1px solid #e8ded2;
    box-shadow: 8px 0 24px rgba(65, 102, 69, 0.05);
    background: #fffdfb;
  }
  .bottom-nav-item {
    flex: 0 0 auto;
    min-height: 52px;
    width: 100%;
    padding: 0 14px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 10px;
    text-align: left;
  }
  .bottom-nav-item .bn-ic { width: 25px; font-size: 19px; text-align: center; }
  .bottom-nav-item .bn-label { font-size: 13px; }
  .bottom-nav-item.active { background: #f7eee6; }
  .bottom-nav-item.active .bn-ic { transform: none; }

  .segmented-control { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .segmented-control[data-group="profil"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented-control[data-group="bibliothek"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .segmented-control[data-group="admin-detail"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .segment { white-space: normal; line-height: 1.25; }

  #tab-dashboard.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  #tab-dashboard > .welcome-banner,
  #tab-dashboard > .hint-box,
  #tab-dashboard > .grid-3,
  #tab-dashboard > .home-worlds,
  #tab-dashboard > .home-meditation,
  #tab-dashboard > .hub-tiles { grid-column: 1 / -1; }
  #tab-dashboard > * { margin-bottom: 0; }
  #tab-dashboard > .card { margin-bottom: 0; }

  #admin-tab-pakete.active,
  #admin-tab-meditationen.active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0 24px;
  }
  #admin-tab-pakete > .page-header,
  #admin-tab-pakete > .hint-box,
  #admin-tab-meditationen > .page-header,
  #admin-tab-meditationen > .hint-box { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
  #admin-tab-kundinnen.active {
    display: grid;
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
    align-items: start;
    gap: 0 24px;
  }
  #admin-tab-kundinnen > .page-header,
  #admin-tab-kundinnen > .hint-box { grid-column: 1 / -1; }
  #admin-client-list {
    grid-column: 1;
    position: sticky;
    top: 98px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-right: 4px;
  }
  #admin-client-detail { grid-column: 2; margin-top: 0; }
  #admin-client-detail > .card:first-child {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    text-align: left !important;
  }
  #admin-client-detail > .card:first-child .user-avatar-lg {
    grid-row: 1 / 3;
    margin: 0;
  }
  #admin-detail-name { align-self: end; margin-top: 0 !important; }
  #admin-detail-email { align-self: start; }
}

@media (max-width: 520px) {
  :root { --space-card: 20px; }
  .app-content { padding-left: 12px; padding-right: 12px; }
  .card { padding: var(--space-card); }
  .segmented-control { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segmented-control[data-group="admin-detail"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segment { min-width: 0; white-space: normal; text-overflow: clip; line-height: 1.2; }
  .form-grid, .feature-check-grid { grid-template-columns: 1fr; gap: 0; }
  .profile-form-head, .package-title-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .package-title-row .status-toggle { margin-bottom: 12px; }
  .plan-editor-row { align-items: stretch; flex-direction: column; padding: 12px; background: #fcf5f0; border: 1px solid #efe7de; border-radius: 10px; }
  .plan-editor-row label, .plan-editor-row label:first-child { flex: auto; width: 100%; }
  .plan-editor-row input, .plan-editor-row textarea { background: #fff; }
  .row-remove { align-self: flex-end; width: 44px; height: 40px; }
  .plan-day { align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; }
  .plan-day .day-name { width: auto; flex: 1 1 120px; }
  .plan-day .exercise { order: 3; flex-basis: 100%; }
  .meal-row .meal-time { width: auto; min-width: 82px; }
  .client-list-item { align-items: flex-start; padding: 12px; }
  .client-list-meta { display: block; line-height: 1.45; }
  .lib-item { flex-wrap: wrap; }
  .lib-item-actions { flex-basis: 100%; justify-content: flex-end; margin-top: 4px; }
  .day-card-img { width: 52px; height: 52px; }
  .assign-row { flex-wrap: wrap; }
  .assign-title { flex-basis: 100%; order: 3; }
  .bottom-nav { padding-left: 2px; padding-right: 2px; }
  .bottom-nav-item { min-width: 0; padding-left: 2px; padding-right: 2px; }
  .bottom-nav-item .bn-label { font-size: 9px; overflow-wrap: normal; }
  .toast { width: calc(100% - 24px); max-width: 420px; text-align: center; bottom: 82px; border-radius: 14px; }
  .appointment-card .btn { width: 100%; text-align: center; }
}

@media (max-width: 350px) {
  .login-card { padding: 28px 18px; }
  .app-topbar { padding-left: 12px; padding-right: 12px; }
  .bottom-nav-item .bn-label { font-size: 8.5px; }
  .bottom-nav-item .bn-ic { font-size: 19px; }
}

/* ---------- Mini-Dee Chat (C4) ---------- */
/* Seit Task #180 E5 ein schwebendes, einklappbares Fenster unten rechts statt
   eigenem Tab. Bis 600 px fast bildschirmfüllend und an den sichtbaren
   Viewport gekoppelt (Tastatur), darüber ein Panel neben dem Inhalt. */
.mini-fab {
  position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); z-index: 150;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #416645, #556F57); color: #fff;
  box-shadow: 0 0 0 3px #FFEAB0, 0 12px 28px rgba(65, 102, 69, 0.38);
  font-family: "Nunito", sans-serif; text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mini-fab[hidden] { display: none; }
.mini-fab:hover { transform: translateY(-2px); }
.mini-fab:focus-visible { outline: 3px solid #8F6F2E; outline-offset: 4px; }
.mini-fab-avatar {
  position: relative; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: #FFEAB0; color: #416645;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.mini-fab-avatar::after {
  content: ""; position: absolute; right: -1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%;
  background: #8BCB8F; border: 2px solid #4B6B4E;
}
.mini-fab-text { display: flex; flex-direction: column; line-height: 1.15; }
.mini-fab-text strong { font-size: 14px; font-weight: 800; }
.mini-fab-text small { font-size: 11px; font-weight: 700; color: #FFEAB0; }
.mini-popup {
  position: fixed; right: 24px; bottom: 24px; z-index: 160;
  width: 390px; height: min(640px, calc(100dvh - 110px));
  display: flex; flex-direction: column; padding: 10px;
  background: #FCF5F0; border: 1px solid #E5DACB; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(33, 33, 33, 0.28);
  overflow: hidden;
}
.mini-popup[hidden] { display: none; }
.mini-popup-body { display: none; }
.mini-popup-close {
  margin-left: auto; flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid #D9CBB8; background: #fff; color: #416645; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mini-popup-close:hover { background: #F3E7D8; }
.mini-popup-close svg { width: 20px; height: 20px; }
@media (max-width: 600px) {
  body.mini-chat-open { overflow: hidden; }
  .mini-popup {
    left: 8px; right: 8px; width: auto; bottom: auto;
    top: calc(var(--mini-viewport-top, 0px) + 8px);
    height: calc(var(--mini-viewport-height, 100dvh) - 16px);
    border-radius: 18px;
  }
}
/* Platz, damit der Mini-Dee-Knopf das Seitenende nicht verdeckt. */
#client-shell .app-content { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) {
  .mini-fab { right: 28px; bottom: 28px; }
  #client-shell .app-content { padding-bottom: 110px; }
}
.mini-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; overflow-wrap: anywhere; padding: 3px 3px 12px; scroll-padding-block: 12px; }
.mini-short-viewport .mini-header { padding: 8px 12px; margin-bottom: 6px; }
#coaching-request-details summary { cursor: pointer; font-weight: 800; color: #416645; }
#mini-callback-form { margin-top: 16px; }
#coaching-request-status { margin: 12px 0 0; font-size: 13px; }
#tab-mini-dee.active { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mini-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  background: linear-gradient(120deg, #EAF0E7, #FCF5F0);
  border-radius: var(--radius-card); padding: 16px;
}
.mini-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #416645, #556F57); color: #FFEAB0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.mini-name { font-family: "Abhaya Libre", serif; font-weight: 800; color: #416645; font-size: 16px; }
.mini-status { font-size: 11px; color: #757575; }
.mini-disclaimer { font-size: 11px; color: #B9B2A9; text-align: center; margin-bottom: 10px; }
.mini-messages {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 0; padding-bottom: 8px;
}
.mini-bubble-row { display: flex; }
.mini-bubble-row.mine { justify-content: flex-end; }
.mini-bubble {
  max-width: 80%; padding: 11px 15px; font-size: 13.5px; line-height: 1.45;
  background: #fff; color: #424242; border-radius: 16px 16px 16px 4px; border: 1px solid #E5DACB;
}
.mini-bubble-row.mine .mini-bubble { background: #556F57; color: #fff; border-radius: 16px 16px 4px 16px; border: none; }
.mini-input-bar {
  display: flex; flex: none; align-items: center; gap: 8px; margin-top: 0;
  background: #fff; border: 1.5px solid #E5DACB; border-radius: 999px; padding: 6px 6px 6px 16px;
}
.mini-input-bar input { flex: 1; min-width: 0; border: none; outline: none; font-family: inherit; font-size: 16px; background: transparent; color: #424242; }
.mini-input-bar .btn { margin: 0; width: auto; border-radius: 999px; }
.mini-completion { margin-top: 10px; }
.mini-typing-dots { display: inline-flex; gap: 4px; align-items: center; padding: 2px 0; }
.mini-typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: #B9B2A9; animation: mini-typing-bounce 1.2s infinite ease-in-out; }
.mini-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.mini-typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes mini-typing-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }
.mini-action-chip {
  align-self: flex-start; max-width: 80%; font-family: "Nunito", sans-serif; font-weight: 800;
  font-size: 12.5px; padding: 9px 16px; border-radius: 999px; border: 1.5px solid #556F57;
  background: #fff; color: #556F57; cursor: pointer; transition: all 0.2s ease;
}
.mini-action-chip:hover:not(:disabled) { background: #556F57; color: #FFEAB0; }
.mini-action-chip:disabled { opacity: 0.6; cursor: default; }
.mini-cta-row { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mini-cta-row .btn { width: 100%; text-align: center; }
.mini-offramp { text-align: center; }

/* ---------- Lucide icon set (2026-08-27, replaces the old ad-hoc emoji icons) ---------- */
/* Neutral, consistent line-icon set (Lucide, https://lucide.dev) — same family
   already used in the approved Mini-Dee Screen-Handbuch mockups. Final visual
   style (weight/rounding) is still open with Kaizen; Lucide's default 2px
   stroke was chosen as a clean, easily swappable neutral baseline. */
[data-lucide] { display: inline-block; vertical-align: -3px; }
.bn-ic svg { width: 21px; height: 21px; stroke-width: 2; }
.hint-ic svg { width: 16px; height: 16px; vertical-align: -3px; }
.hint-dismiss svg { width: 14px; height: 14px; vertical-align: -2px; }
.lock-ic svg { width: 26px; height: 26px; }
.segment svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 2px; }
h3 svg, h4 svg { width: 16px; height: 16px; vertical-align: -2px; }
.streak-badge svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 480px) {
  .bn-ic svg { width: 19px; height: 19px; }
}

/* ---------- Home-Kachelraster (C1, Pflichtenheft v1.0) ---------- */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.hub-tile {
  background: #fff;
  border: none;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Nunito", sans-serif;
  color: #424242;
}
.hub-tile svg { width: 24px; height: 24px; color: #556F57; vertical-align: 0; }
.hub-tile span { font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.25; }
.hub-tile.locked { opacity: 0.5; cursor: pointer; }
.hub-tile.locked svg { color: #B9B2A9; }

/* ---------- Rechtliches: Link-Liste + Modal (Client) ---------- */
.legal-link-list { display: flex; flex-wrap: wrap; gap: 8px; }
.legal-link {
  background: none;
  border: 1px solid #556F57;
  color: #556F57;
  border-radius: 20px;
  padding: 6px 14px;
  font-family: "Nunito", sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.legal-link:hover { background: #556F57; color: #fff; }

.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 33, 33, 0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.legal-modal {
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 82vh;
  overflow-y: auto;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  padding: 24px 20px 32px;
  position: relative;
}
.legal-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #757575;
  cursor: pointer;
  padding: 6px;
}
.legal-modal h2 { font-family: "Abhaya Libre", Georgia, serif; color: #416645; margin: 0 26px 14px 0; }
.legal-modal-body { font-size: 13.5px; line-height: 1.55; color: #424242; }
.legal-modal-body h2, .legal-modal-body h3 { color: #416645; font-family: "Abhaya Libre", Georgia, serif; margin: 16px 0 6px; }
.legal-modal-body p { margin: 0 0 10px; }
.legal-modal-body ul { margin: 0 0 10px; padding-left: 20px; }
.legal-draft-banner {
  background: #FFEAB0;
  color: #7a5a12;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.legal-preview-box {
  margin-top: 12px;
  background: #F7F5F0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #424242;
}
.legal-preview-box hr { border: none; border-top: 1px solid #E0DCD3; margin: 8px 0; }
@media (min-width: 600px) {
  .legal-modal-overlay { align-items: center; }
  .legal-modal { border-radius: var(--radius-card); }
}

/* ============================================================
   "Bausteine & Schablonen" Phase 1 (Ernährung) — v4-Redesign-Skin
   NUR auf den neuen Ernährungs-/Wochenplan-Screens (Foto-Hero, größere
   Radien 20-28px, Scrim für Lesbarkeit), Rest der App bleibt auf dem
   bestehenden Ist-CI — siehe Konzept deefit_uiux_konzept.md v4.
   ============================================================ */

.nutrition-hero {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 26px 24px 30px;
  margin-bottom: var(--space-section);
  min-height: 168px;
  background-image:
    linear-gradient(120deg, rgba(255,241,222,0.94) 0%, rgba(232,196,158,0.84) 58%, rgba(216,166,111,0.68) 100%),
    url("assets/nutrition/hero.jpg");
  background-size: cover;
  background-position: center 30%;
  box-shadow: 0 14px 34px rgba(101, 67, 41, 0.16);
}
.nutrition-hero-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--world-nutrition-deep);
  margin-bottom: 6px;
}
.nutrition-hero-title { font-size: 34px; margin: 0 0 6px; color: var(--world-nutrition-deep); }
.nutrition-hero-sub { margin: 0; color: #4E3928; font-size: 14px; max-width: 88%; }
#tab-profil > .nutrition-hero {
  background-image: linear-gradient(180deg, rgba(255,246,231,0.55) 0%, rgba(255,246,231,0.88) 78%, #FFF6E7 100%), url("assets/nutrition/hero.jpg");
  box-shadow: 0 14px 34px rgba(65,102,69,0.12);
}
#tab-profil > .nutrition-hero .nutrition-hero-eyebrow { color: var(--accent); }
#tab-profil > .nutrition-hero .nutrition-hero-title { color: #416645; }
#tab-profil > .nutrition-hero .nutrition-hero-sub { color: #424242; }

/* ---------- Foto-Hero (v4 CI) — dunkle Stimmungsfotos, helle Schrift ---------- */

.photo-hero {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 26px 24px 30px;
  margin-bottom: var(--space-section);
  min-height: 170px;
  background-size: cover;
  background-position: center;
}
.photo-hero-training {
  background-image: linear-gradient(120deg, rgba(101,77,32,0.90), rgba(143,111,46,0.58)), url("assets/training/hero.jpg");
  box-shadow: 0 14px 34px rgba(143, 111, 46, 0.22);
}
.photo-hero-coaching {
  background-image: linear-gradient(120deg, rgba(32,59,43,0.90), rgba(79,109,86,0.58)), url("assets/coaching/hero.jpg");
  box-shadow: 0 14px 34px rgba(20, 40, 28, 0.24);
}
.photo-hero-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #FFD9A8;
  margin-bottom: 6px;
}
.photo-hero-title { font-size: 34px; margin: 0 0 6px; color: #fff; }
.photo-hero-sub { margin: 0; color: rgba(255,255,255,0.92); font-size: 14px; max-width: 92%; }

/* ---------- "Deine 3 Welten" — Übersicht ---------- */

.home-worlds, .home-meditation { min-width: 0; margin-bottom: var(--space-section); }
.world-tiles-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.world-tiles-heading { font-size: 22px; margin: 0; }
.world-tiles-hint { color: #757575; font-size: 11px; white-space: nowrap; }
.world-tiles {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #C9B994 transparent;
  padding: 4px 4px 16px;
  margin: -4px -4px -12px;
}
.world-tile.hub-tile {
  flex: 0 0 68%;
  min-width: 0;
  scroll-snap-align: start;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 4px;
  text-align: left;
  padding: 24px;
  min-height: 148px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-soft);
}
.world-tile.hub-tile.locked { opacity: 0.75; }
.world-tile-coaching { background-image: linear-gradient(120deg, rgba(32,59,43,0.90), rgba(79,109,86,0.58)), url("assets/coaching/hero.jpg"); }
.world-tile-training { background-image: linear-gradient(120deg, rgba(101,77,32,0.90), rgba(143,111,46,0.58)), url("assets/worlds/training.jpg"); }
.world-tile-ernaehrung { background-image: linear-gradient(120deg, rgba(255,241,222,0.94), rgba(232,196,158,0.84) 58%, rgba(216,166,111,0.68)), url("assets/worlds/ernaehrung.jpg"); }
.world-tile .world-tile-title { font-family: "Abhaya Libre", serif; font-weight: 800; color: #fff; font-size: 26px; text-align: left; }
.world-tile .world-tile-sub { color: #fff; font-size: 12.5px; text-align: left; font-weight: 700; }
.world-tile-ernaehrung .world-tile-title { color: var(--world-nutrition-deep); }
.world-tile-ernaehrung .world-tile-sub { color: #4E3928; }
.meditation-entry.hub-tile {
  width: 100%;
  min-height: 196px;
  padding: 24px;
  align-items: flex-start;
  gap: 8px;
  background: linear-gradient(105deg, rgba(255,249,239,0.97), rgba(223,236,239,0.92) 58%, rgba(205,224,230,0.76)), url("assets/worlds/meditation.jpg") center 40% / cover;
  color: var(--world-meditation-deep);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(49, 80, 90, 0.15);
}
.meditation-entry.hub-tile.locked { opacity: 1; }
.meditation-entry span { text-align: left; }
.meditation-entry .meditation-entry-eyebrow { color: #72591F; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.meditation-entry .meditation-entry-title { font-family: "Abhaya Libre", serif; font-size: 28px; font-weight: 800; }
.meditation-entry .meditation-entry-sub { max-width: 280px; font-size: 13px; line-height: 1.5; color: #3D5962; }
.meditation-entry .meditation-entry-action { margin-top: 8px; padding-bottom: 3px; border-bottom: 1px solid #6E8991; color: var(--world-meditation-deep); font-size: 12px; font-weight: 800; }

/* Keep each destination in the same family as its dashboard tile. */
#tab-training-hub > .segmented-control .segment.active { background: var(--world-training); box-shadow: 0 2px 8px rgba(143,111,46,0.28); }
#tab-training-hub .date-nav { background: #F1E7D0; }
/* Training (Task #177): drei Segmente in einer Reihe, auch mobil; ein
   ausgeblendetes Segment hinterlässt keine Lücke. */
.segmented-control[data-group="training-hub"] { display: flex; }
.segmented-control[data-group="training-hub"] .segment { flex: 1 1 0; min-width: 0; }
.training-week-summary { border-left: 4px solid var(--world-training); }
.training-week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.training-week-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--world-training); }
.training-week-count { font-family: "Nunito", sans-serif; font-weight: 800; font-size: 18px; color: #2f2a22; }
.training-week-summary .progress-fill { background: var(--world-training); }
.training-week-label { font-size: 13px; color: #6f6f6f; }
.training-section { margin-top: var(--space-section); scroll-margin-top: 88px; }
.training-section-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 4px; color: #2f2a22; }
.training-section-title svg { width: 18px; height: 18px; color: var(--world-training); }
.training-section-help { color: #6f6f6f; font-size: 13px; margin: 0 0 12px; }
.admin-training-card h3 { display: flex; align-items: center; gap: 8px; }
.admin-plan-part { border-top: 1px solid #EFE7DE; padding-top: 16px; margin-top: 16px; }
.admin-plan-part h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.admin-progress-week { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; font-size: 14px; }
.admin-progress-week span { color: #6f6f6f; font-size: 13px; }
#admin-training-progress .weight-row { gap: 12px; }
#admin-training-progress .weight-row span:first-child { white-space: nowrap; flex-shrink: 0; }
#admin-training-progress .weight-row span:last-child { text-align: right; }
#tab-training-hub .card { box-shadow: 0 8px 24px rgba(143,111,46,0.10); }
#tab-ernaehrung-hub .date-nav { background: #F5E3D0; }
#tab-ernaehrung-hub .card { background: #FFFCF7; box-shadow: 0 8px 24px rgba(101,67,41,0.09); }
#tab-coaching-hub > .segmented-control .segment.active { background: var(--world-coaching); }

/* Meditation is a lighter audio space inside the Life-Coaching structure. */
#sub-meditation {
  padding: 18px;
  border: 1px solid rgba(110,137,145,0.24);
  border-radius: var(--radius-card);
  background: radial-gradient(circle at 82% 8%, rgba(255,255,255,0.92), transparent 34%), linear-gradient(145deg, #FFF9EF, var(--world-meditation));
  box-shadow: 0 12px 30px rgba(49,80,90,0.10);
}
#sub-meditation .hint-box { background: rgba(255,255,255,0.66); border-color: rgba(110,137,145,0.28); }
#sub-meditation .meditation-track { background: rgba(255,255,255,0.82); box-shadow: 0 8px 22px rgba(49,80,90,0.10); }
#sub-meditation .med-track-name { color: var(--world-meditation-deep); }
#tab-coaching-hub > .segmented-control .segment[data-sub="meditation"].active {
  background: var(--world-meditation);
  color: var(--world-meditation-deep);
  box-shadow: 0 2px 8px rgba(49,80,90,0.18);
}
.home-stats.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--space-section); }
.home-stats .stat-card { padding: 16px 8px; margin-bottom: 0; }
.home-stats .stat-card .label { font-size: 10px; overflow-wrap: anywhere; }
.home-quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 700px) {
  .world-tile.hub-tile { flex-basis: calc((100% - 24px) / 3); }
  .world-tiles-hint { display: none; }
}

.week-day-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.week-day-card.is-today { box-shadow: 0 8px 22px rgba(143, 111, 46, 0.18); }
.week-day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.week-day-heading .wd-name { font-family: "Abhaya Libre", serif; font-weight: 800; color: #416645; font-size: 16px; }
.week-day-heading .wd-date { font-size: 12px; color: #757575; }
.week-slot-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid #F3E7D8;
}
.week-slot-row:last-child { border-bottom: none; }
.week-slot-time { flex: none; width: 52px; font-weight: 800; font-size: 12.5px; color: #8F6F2E; padding-top: 1px; }
.week-slot-body { flex: 1; min-width: 0; }
.week-slot-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #7A965C; }
.week-slot-title { font-family: "Abhaya Libre", serif; font-weight: 700; color: #416645; font-size: 15px; margin: 1px 0 2px; }
.week-slot-meta { font-size: 12px; color: #757575; overflow-wrap: anywhere; }
.week-slot-override-badge {
  display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: #8F6F2E; background: #FFEAB0; border-radius: 8px; padding: 1px 7px;
}
.week-day-empty { color: #757575; font-size: 13px; margin: 0; }

.tag-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-chip {
  font-size: 10.5px; font-weight: 700; color: #556F57; background: #EFE7DE;
  border-radius: 10px; padding: 3px 9px;
}
.tag-chip.allergen-chip { color: #8F6F2E; background: #FBE7D6; }

.conflict-banner {
  background: #FFF3E0;
  border-left: 4px solid #8F6F2E;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #5c4324;
}
.conflict-banner h4 { margin: 0 0 6px; font-size: 13.5px; color: #8F6F2E; }
.conflict-banner ul { margin: 0 0 10px; padding-left: 18px; }
.conflict-banner .conflict-actions { display: flex; gap: 8px; }

/* ---------- Kalorienbedarfsrechner (Task #29) ---------- */
#calorie-goal-accordion summary { display: flex; align-items: center; gap: 8px; }
#calorie-goal-accordion summary svg { width: 16px; height: 16px; color: #556F57; }
.calorie-goal-result,
.calorie-goal-preview {
  background: linear-gradient(120deg, #FCF5F0 0%, #F3E7D8 100%);
  border: 1.5px solid #E5DACB;
  border-radius: var(--radius-inset);
  padding: 14px 16px;
  margin: 12px 0;
  text-align: center;
}
.calorie-goal-target {
  font-family: "Abhaya Libre", serif;
  font-weight: 800;
  color: #416645;
  font-size: 30px;
  line-height: 1.1;
}
.calorie-goal-target .calorie-goal-unit { font-family: "Nunito", sans-serif; font-size: 13px; font-weight: 700; color: #757575; }
.calorie-goal-detail { font-size: 12.5px; color: #6f6f6f; margin-top: 6px; line-height: 1.5; }
.calorie-goal-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
#calorie-goal-accordion .form-grid { margin-top: 2px; }
#calorie-goal-accordion .form-actions { margin-top: 10px; }
@media (max-width: 420px) {
  .calorie-goal-target { font-size: 26px; }
  .calorie-goal-target .calorie-goal-unit { font-size: 12px; }
}

/* ============================================================
   ONBOARDING-WIZARD MIT MINI-DEE (Task #178): Gesprächsverlauf mit
   Antwort-Chips, Bereichs-Tour und live aufgebautem Startplan. Mobil
   randlos über den ganzen Bildschirm, ab 600 px als schwebendes Panel.
   ============================================================ */
body.obw-open { overflow: hidden; }
/* Höhe und Lage folgen dem sichtbaren Bereich (syncObwViewport), damit die
   Bildschirmtastatur weder Eingabefeld noch letzte Nachricht verdeckt. */
.obw-overlay {
  position: fixed; left: 0; right: 0; top: var(--obw-viewport-top, 0px); z-index: 500;
  height: 100vh; height: var(--obw-viewport-height, 100dvh);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #FCF5F0 0%, #F3E7D8 100%);
}
.obw-overlay[hidden] { display: none; }
.obw-panel {
  display: grid; grid-template-rows: auto minmax(72px, 1fr) auto;
  width: 100%; height: 100%; max-width: 100%; min-width: 0;
  background: #FCF5F0; text-align: left;
  animation: obw-panel-in var(--motion-enter) ease-out;
}
@media (min-width: 600px) {
  .obw-overlay { padding: 24px; }
  .obw-panel {
    max-width: 480px; height: min(780px, calc(var(--obw-viewport-height, 100dvh) - 48px));
    border-radius: var(--radius-card); box-shadow: var(--shadow-elevated); overflow: hidden;
  }
}
.obw-head {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 16px;
  background: linear-gradient(120deg, #EAF0E7, #FCF5F0);
}
.obw-avatar {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #416645, #556F57); color: #FFEAB0; font-weight: 800; font-size: 13px;
}
.obw-avatar::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(85, 111, 87, 0.35);
  animation: obw-breathe 2.8s ease-in-out infinite;
}
.obw-title { margin: 0; font-family: "Abhaya Libre", serif; font-weight: 800; font-size: 19px; line-height: 1.1; color: #416645; }
.obw-status { display: block; font-size: 12px; color: #757575; }
.obw-skip {
  border: 1px solid #E5DACB; background: rgba(255, 255, 255, 0.7); color: #5c5c5c;
  font: 700 12.5px "Nunito", sans-serif; padding: 8px 12px; border-radius: 999px; cursor: pointer; min-height: 36px;
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}
.obw-skip:hover { border-color: #8F6F2E; color: #8F6F2E; }
.obw-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #EFE7DE; }
.obw-progress-fill {
  display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.obw-thread {
  display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 16px 16px;
}
.obw-row { display: flex; min-width: 0; animation: obw-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.obw-row.mine { justify-content: flex-end; }
.obw-bubble {
  max-width: 82%; padding: 11px 15px; font-size: 14px; line-height: 1.45; overflow-wrap: break-word;
  background: #fff; color: #424242; border: 1px solid #E5DACB; border-radius: 18px 18px 18px 4px;
}
.obw-row.mine .obw-bubble { background: #556F57; color: #fff; border: none; border-radius: 18px 18px 4px 18px; }
.obw-bubble.is-typing { padding: 12px 16px; }
.obw-card {
  width: 100%; min-width: 0; background: #fff; border: 1px solid #E5DACB; border-radius: var(--radius-inset); padding: 14px;
}
.obw-tour { display: grid; gap: 4px; }
.obw-tour-item {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px 2px;
  opacity: 0; transform: translateX(-10px);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}
.obw-tour-item.is-in { opacity: 1; transform: none; }
.obw-tour-ic {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: #FFEAB0; color: #8F6F2E;
}
.obw-tour-ic svg { width: 19px; height: 19px; }
.obw-tour-item strong { display: block; font-size: 14px; color: #416645; }
.obw-tour-item small { display: block; font-size: 12.5px; color: #6b625c; line-height: 1.35; }
.obw-plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #416645; }
.obw-plan-head svg { width: 18px; height: 18px; color: #8F6F2E; }
.obw-plan-head strong { font-family: "Abhaya Libre", serif; font-size: 18px; }
.obw-plan-meta { margin-left: auto; font-size: 12px; font-weight: 700; color: #6b625c; background: #FCF5F0; border-radius: 999px; padding: 3px 10px; }
.obw-plan-bar { height: 4px; border-radius: 4px; background: #EFE7DE; margin: 12px 0 4px; overflow: hidden; }
.obw-plan-bar span {
  display: block; height: 100%; background: linear-gradient(90deg, #556F57, #8F6F2E); transform: scaleX(0.04); transform-origin: left;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.obw-plan.is-building .obw-plan-head svg { animation: obw-lift 900ms ease-in-out infinite; }
.obw-plan-list { list-style: none; margin: 0; padding: 0; }
.obw-plan-day {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 10px 6px; border-bottom: 1px solid #F3ECE3;
  border-radius: 10px; animation: obw-day-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.obw-plan-day:last-child { border-bottom: none; }
.obw-plan-day-name { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #8F6F2E; padding-top: 2px; }
.obw-plan-day-text { min-width: 0; }
.obw-plan-day-text strong { display: block; font-size: 14px; color: #416645; }
.obw-plan-day-text small { display: block; font-size: 12.5px; color: #5c5c5c; line-height: 1.4; overflow-wrap: break-word; }
.obw-plan-foot { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #416645; animation: obw-in 260ms ease-out; }
.obw-plan-foot svg { width: 16px; height: 16px; }
.obw-ready { background: #F3F7F1; border-color: #D9E4D6; }
.obw-ready-title { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #556F57; }
.obw-ready-item { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; color: #3d3d3d; }
.obw-ready-item svg { width: 17px; height: 17px; color: #416645; flex: none; }
.obw-composer {
  min-width: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  max-height: calc(var(--obw-viewport-height, 100dvh) * 0.55); overflow-y: auto; overscroll-behavior: contain;
  background: #FFFCF7; border-top: 1px solid #EFE7DE;
}
.obw-composer:empty { padding: 0; border-top: none; }
/* Wenig Höhe (kleines Handy oder Tastatur offen): Kopf und Abstände kompakt. */
.obw-short-viewport .obw-head { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 10px; gap: 10px; }
.obw-short-viewport .obw-avatar { width: 34px; height: 34px; font-size: 12px; }
.obw-short-viewport .obw-title { font-size: 17px; }
.obw-short-viewport .obw-thread { padding-top: 12px; padding-bottom: 10px; }
.obw-short-viewport .obw-composer { padding-top: 8px; padding-bottom: 8px; }
/* Sehr wenig Höhe (320er-Handy mit offener Tastatur): Platz für die Frage. */
.obw-tiny-viewport .obw-panel { grid-template-rows: auto minmax(96px, 1fr) auto; }
.obw-tiny-viewport .obw-head { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
.obw-tiny-viewport .obw-avatar { width: 28px; height: 28px; font-size: 11px; }
.obw-tiny-viewport .obw-status { display: none; }
.obw-tiny-viewport .obw-skip { min-height: 30px; padding: 4px 10px; }
.obw-tiny-viewport .obw-composer { max-height: calc(var(--obw-viewport-height, 100dvh) * 0.45); }
.obw-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.obw-chips.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.obw-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; min-width: 0;
  padding: 10px 16px; border-radius: 999px; border: 1.5px solid #E5DACB; background: #fff; color: #416645;
  font: 800 13.5px/1.25 "Nunito", sans-serif; text-align: center; cursor: pointer;
  animation: obw-chip-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--obw-i, 0) * 45ms);
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.obw-chips.is-grid .obw-chip { border-radius: var(--radius-control); }
.obw-chip svg { width: 16px; height: 16px; flex: none; }
.obw-chip:hover { border-color: #8F6F2E; background: #FFF8EC; }
.obw-chip:active { transform: scale(0.97); }
.obw-chip.is-primary { background: #556F57; border-color: #556F57; color: #FFEAB0; }
.obw-chip.is-primary:hover { background: #416645; }
.obw-chip:focus-visible, .obw-skip:focus-visible, .obw-later:focus-visible { outline: 2px solid #8F6F2E; outline-offset: 2px; }
.obw-form .field { margin-bottom: 10px; }
.obw-form .consent-row { margin: 8px 0; font-size: 12.5px; }
.obw-form-error { margin: 4px 0 8px; font-size: 12.5px; color: #B23A3A; }
.obw-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.obw-form-actions .btn { margin: 0; width: auto; }
.obw-later { background: none; border: none; color: #757575; font: 700 12.5px "Nunito", sans-serif; text-decoration: underline; cursor: pointer; padding: 8px 0; margin-right: auto; }
.obw-restart-card .btn { display: inline-flex; align-items: center; gap: 6px; width: auto; }
.obw-restart-card .btn svg { width: 15px; height: 15px; }
@keyframes obw-panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes obw-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes obw-chip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes obw-day-in {
  0% { opacity: 0; transform: translateY(10px); background: #FFF1D6; }
  40% { opacity: 1; transform: none; background: #FFF1D6; }
  100% { background: transparent; }
}
@keyframes obw-breathe { 0%, 100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.12); opacity: 0; } }
@keyframes obw-lift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) {
  .obw-overlay *, .obw-overlay *::after, .obw-panel { animation: none !important; transition: none !important; }
  .obw-tour-item { opacity: 1; transform: none; }
}

.friendly-empty {
  text-align: center;
  padding: 30px 20px 26px;
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, #FFF6E7 0%, #FCF5F0 100%);
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
}
.friendly-empty-icon {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%;
  background: #FFEAB0; color: #8F6F2E; display: flex; align-items: center; justify-content: center;
}
.friendly-empty-icon i { width: 26px; height: 26px; }
.friendly-empty-title { font-family: "Abhaya Libre", serif; font-weight: 800; color: #416645; font-size: 18px; margin: 0 0 6px; }
.friendly-empty-text { color: #5c4324; font-size: 13.5px; line-height: 1.5; margin: 0 auto; max-width: 320px; }
.friendly-empty-cta { margin-top: 14px; }

.template-grid-table-wrap { overflow-x: auto; margin-bottom: 4px; }
.template-grid-table { border-collapse: collapse; width: 100%; min-width: 640px; }
.template-grid-table th, .template-grid-table td { padding: 6px; border-bottom: 1px solid #EFE7DE; text-align: left; }
.template-grid-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #556F57; font-weight: 800; }
.template-grid-table td.slot-label-cell { font-size: 12px; font-weight: 800; color: #416645; white-space: nowrap; }
.template-grid-table select { width: 100%; min-width: 120px; font-size: 12px; padding: 6px; border-radius: 8px; border: 1px solid #E0DCD3; font-family: inherit; }

.template-list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F3E7D8;
}
.template-list-item:last-child { border-bottom: none; }
.template-list-info { flex: 1; min-width: 0; }
.template-list-name { font-weight: 700; color: #416645; font-size: 13.5px; }
.default-template-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.02em; color: #8F6F2E; background: #FFEAB0; border-radius: 10px; padding: 2px 8px 2px 6px;
  vertical-align: middle;
}
.default-template-badge i { width: 11px; height: 11px; }
.template-list-meta { font-size: 11px; color: #757575; }
.template-list-actions { flex: none; display: flex; gap: 8px; }
@media (max-width: 520px) {
  .template-list-item { flex-direction: column; align-items: stretch; }
  .template-list-actions { flex-wrap: wrap; }
  .template-list-actions .btn { max-width: 100%; }
}

/* ============================================================
   Wochenansicht: horizontales Swipe-Karten-Design (Kaizen 2026-09-06)
   ============================================================ */

.week-swipe-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 9%;
  padding: 4px 9% 10px;
  margin: 0 -9px;
}
.week-swipe-track::-webkit-scrollbar { display: none; }
.week-swipe-track { scrollbar-width: none; }
.week-swipe-day {
  flex: 0 0 82%;
  scroll-snap-align: center;
  margin-bottom: 0 !important;
}
.week-swipe-dots { display: flex; justify-content: center; gap: 6px; margin: 0 0 14px; }
.week-swipe-dot { width: 6px; height: 6px; border-radius: 50%; background: #EFE7DE; transition: all 0.2s ease; }
.week-swipe-dot.active { background: #8F6F2E; width: 18px; border-radius: 5px; }

.week-slot-row.is-clickable { cursor: pointer; border-radius: 12px; transition: background 0.15s ease; margin: 0 -8px; padding: 9px 8px; }
.week-slot-row.is-clickable:hover, .week-slot-row.is-clickable:active { background: #FFF6E7; }
.week-slot-row.is-clickable .week-slot-title { display: flex; align-items: center; gap: 6px; }
.week-slot-row.is-clickable .week-slot-title::after {
  content: ""; width: 7px; height: 7px; flex: none; border-right: 2px solid #8F6F2E; border-bottom: 2px solid #8F6F2E;
  transform: rotate(-45deg); opacity: 0.6; margin-left: auto;
}
.week-slot-thumb { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; margin-right: 2px; }
.day-card-title.is-clickable { cursor: pointer; }
.day-card-title.is-clickable:hover { text-decoration: underline; }

.plan-day-card { padding-bottom: 4px; }
.plan-day-exercise-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #F3E7D8;
}
.plan-day-exercise-row:last-child { border-bottom: none; }
.plan-day-exercise-row .exercise { flex: 1; font-family: "Abhaya Libre", serif; font-weight: 700; color: #416645; font-size: 14.5px; }

@media (min-width: 900px) {
  .week-swipe-track { padding: 4px 24px 12px; scroll-padding-inline: 24px; margin: 0; }
  .week-swipe-day { flex: 0 0 300px; }
}

/* ---------- Gericht-Detail-Unterseite (Overlay) ---------- */

.meal-detail-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(33, 33, 33, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.meal-detail-modal {
  background: #FFFBF4; width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  border-radius: var(--radius-card) var(--radius-card) 0 0; position: relative; padding-bottom: 28px;
}
.meal-detail-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(255,255,255,0.92); border: none; border-radius: 50%; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center; color: #416645; cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.meal-detail-img { width: 100%; height: 200px; object-fit: cover; display: block; border-radius: 24px 24px 0 0; }
.meal-detail-img-fallback {
  width: 100%; height: 130px; border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, #F3E7D8 0%, #FFEAB0 100%);
  display: flex; align-items: center; justify-content: center; color: #8F6F2E;
}
.meal-detail-img-fallback i { width: 40px; height: 40px; }
.meal-detail-body { padding: 20px 22px 0; }
.meal-detail-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8F6F2E; margin-bottom: 4px; }
.meal-detail-title { font-family: "Abhaya Libre", Georgia, serif; color: #416645; font-size: 22px; margin: 0 26px 10px 0; }
.meal-detail-macros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.meal-detail-macro {
  background: #F3E7D8; color: #556F57; font-size: 11.5px; font-weight: 800; border-radius: 10px; padding: 5px 10px;
}
.meal-detail-drink {
  display: flex; align-items: center; gap: 6px; font-size: 13px; color: #556F57; font-weight: 700; margin-bottom: 14px;
}
.meal-detail-drink i { width: 15px; height: 15px; color: #8F6F2E; }
.meal-detail-section { margin-bottom: 18px; }
.meal-detail-section h4 {
  font-family: "Abhaya Libre", serif; color: #416645; font-size: 15px; margin: 0 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.meal-detail-section h4 i { width: 16px; height: 16px; color: #8F6F2E; }
.meal-detail-ingredients { list-style: none; margin: 0; padding: 0; }
.meal-detail-ingredients li {
  font-size: 13.5px; color: #424242; padding: 6px 0 6px 20px; border-bottom: 1px solid #F3E7D8; position: relative;
}
.meal-detail-ingredients li:last-child { border-bottom: none; }
.meal-detail-ingredients li::before {
  content: ""; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: #7A965C;
}
.meal-detail-steps { margin: 0; padding: 0; list-style: none; counter-reset: meal-step; }
.meal-detail-steps li {
  counter-increment: meal-step; font-size: 13.5px; color: #424242; line-height: 1.5; padding: 6px 0 6px 32px; position: relative;
}
.meal-detail-steps li::before {
  content: counter(meal-step); position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: #416645; color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.meal-detail-empty-hint { font-size: 12.5px; color: #757575; font-style: italic; margin: 0; }
@media (min-width: 600px) {
  .meal-detail-overlay { align-items: center; }
  .meal-detail-modal { border-radius: var(--radius-card); }
  .meal-detail-img, .meal-detail-img-fallback { border-radius: 24px 24px 0 0; }
}

/* Opacity-only entrances do not re-anchor fixed overlays or move the layout. */
@keyframes surface-enter { from { opacity: 0.4; } to { opacity: 1; } }
.tab-section.active, .sub-panel.active, .auth-form.active {
  animation: surface-enter var(--motion-enter) ease-out;
}
.hub-tile, .segment, .auth-tab, .date-nav-btn, .play-btn, .legal-link, .bottom-nav-item {
  transition: transform var(--motion-fast) ease, background-color var(--motion-fast) ease, color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}
:is(.btn, .hub-tile, .segment, .auth-tab, .date-nav-btn, .play-btn, .legal-link):not(:disabled):active { transform: scale(0.98); }
:is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { cursor: wait; }
.btn, .segment, .auth-tab { min-height: 44px; }
.mini-input-bar input, .app-content, .grid-2 > *, .grid-3 > * { min-width: 0; }
.mini-disclaimer { color: #757575; }
@media (hover: hover) and (pointer: fine) {
  .hub-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(65, 102, 69, 0.14); }
  .hub-tile:active { transform: scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  :is(.btn, .hub-tile, .segment, .auth-tab, .date-nav-btn, .play-btn, .legal-link):not(:disabled):is(:hover, :active) { transform: none; }
}

/* ---------- Spruch des Tages (wiederhergestellt 2026-09-10) ---------- */
.daily-quote-strip {
  display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 12px;
  margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius-inset);
  border: 1px solid #E5DACB; background: #FFF8EE;
}
.daily-quote-emoji { font-size: 26px; line-height: 1; text-align: center; }
.daily-quote-label {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent, #8F6F2E);
}
.daily-quote-text { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: #3d3d3d; }
.daily-quote-sign {
  display: block; margin-top: 6px; font-size: 12px; font-style: italic; color: var(--accent, #8F6F2E);
}

.daily-quote-dialog {
  border: none; padding: 0; max-width: 340px; width: calc(100% - 40px);
  border-radius: var(--radius-card, 20px); background: #FFFCF7; color: #3d3d3d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}
.daily-quote-dialog::backdrop { background: rgba(31, 26, 20, 0.55); }
.daily-quote-dialog-inner { padding: 26px 22px 22px; text-align: center; }
.daily-quote-dialog-emoji { display: block; font-size: 40px; line-height: 1; margin-bottom: 10px; }
.daily-quote-dialog h3 { margin: 0 0 10px; font-size: 19px; }
.daily-quote-dialog-text { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.daily-quote-dialog-by {
  display: block; margin-bottom: 18px; font-size: 13px; font-style: italic;
  color: var(--accent, #8F6F2E);
}

.impulse-item { grid-template-columns: 40px 1fr auto; }
.impulse-item .impulse-emoji { font-size: 24px; line-height: 1; text-align: center; }
.impulse-item.is-inactive { opacity: 0.6; }

/* ============================================================
   Meditations-Liste + Custom Bottom-Sheet-Player
   ============================================================ */

.meditation-track-btn {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: background var(--motion-fast) ease;
}
.meditation-track-btn:active { background: rgba(49,80,90,0.06); }
.med-track-play-ic {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--world-meditation); color: var(--world-meditation-deep);
  display: flex; align-items: center; justify-content: center;
}
.med-track-play-ic i { width: 17px; height: 17px; }
.meditation-track-btn .med-track-name { flex: 1; }
.med-track-fav {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #B7A98F;
}
.med-track-fav i { width: 18px; height: 18px; }
.med-track-fav.is-fav { color: #C4515A; }
.med-track-fav.is-fav i { fill: #C4515A; }

.med-player-backdrop {
  position: fixed; inset: 0; background: rgba(20,28,26,0.45);
  z-index: 900; opacity: 0; transition: opacity var(--motion-enter) ease;
}
.med-player-backdrop.is-open { opacity: 1; }

.med-player-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901;
  max-width: 520px; margin: 0 auto;
  background: #FFFCF7;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  box-shadow: var(--shadow-elevated);
  transform: translateY(100%);
  transition: transform var(--motion-enter) cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  touch-action: none;
}
.med-player-sheet.is-open { transform: translateY(0); }

.med-player-drag { display: flex; justify-content: center; padding: 10px 0 4px; cursor: grab; touch-action: none; }
.med-player-drag-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(49,80,90,0.28); }

.med-player-art {
  position: relative; width: 100%; aspect-ratio: 1 / 0.82;
  background-image: linear-gradient(180deg, rgba(20,32,30,0.15), rgba(15,24,22,0.55)), url("assets/worlds/meditation.jpg");
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.med-player-art-scrim { position: absolute; inset: 0; pointer-events: none; }
.med-player-close, .med-player-fav {
  position: absolute; top: 14px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.22); backdrop-filter: blur(6px);
  color: #fff; display: flex; align-items: center; justify-content: center; border: none;
}
.med-player-close { left: 14px; }
.med-player-fav { right: 14px; }
.med-player-fav.is-fav { color: #FF8FA0; }
.med-player-fav.is-fav i { fill: #FF8FA0; }
.med-player-close i, .med-player-fav i { width: 18px; height: 18px; }

.med-player-playbtn {
  position: relative; z-index: 2; width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255,255,255,0.92); color: var(--world-meditation-deep);
  display: flex; align-items: center; justify-content: center; border: none;
  box-shadow: var(--shadow-elevated);
}
.med-player-playbtn i { width: 34px; height: 34px; margin-left: 2px; }
.med-player-playbtn.is-playing i { margin-left: 0; }

.med-player-info { padding: 18px var(--space-card) calc(24px + env(safe-area-inset-bottom, 0px)); }
.med-player-eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--world-meditation-deep); opacity: 0.75; }
.med-player-title { font-family: "Abhaya Libre", Georgia, serif; font-size: 22px; color: #2b2b2b; margin: 4px 0 18px; }

.med-player-seek-row { display: flex; align-items: center; gap: 10px; }
.med-player-time { font-size: 11.5px; color: #757575; font-variant-numeric: tabular-nums; min-width: 34px; }
.med-player-time:last-child { text-align: right; }
.med-player-seekbar {
  position: relative; flex: 1; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none;
}
.med-player-seekbar::before {
  content: ""; position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: #E5DACB;
}
.med-player-seekbar-buffered { position: absolute; left: 0; height: 4px; border-radius: 2px; background: rgba(49,80,90,0.22); width: 0%; pointer-events: none; }
.med-player-seekbar-fill { position: absolute; left: 0; height: 4px; border-radius: 2px; background: var(--world-meditation-deep); width: 0%; pointer-events: none; }
.med-player-seekbar-knob {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  background: var(--world-meditation-deep); transform: translate(-50%, -50%); left: 0%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3); pointer-events: none;
}
.med-player-seekbar-spinner {
  position: absolute; right: -22px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; border: 2px solid rgba(49,80,90,0.25); border-top-color: var(--world-meditation-deep);
  animation: med-spin 0.7s linear infinite; pointer-events: none;
}
@keyframes med-spin { to { transform: rotate(360deg); } }

.med-player-volume-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.med-player-volume-ic { width: 16px; height: 16px; color: #757575; flex-shrink: 0; }
.med-player-volume-slider {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: #E5DACB; outline: none; cursor: pointer;
}
.med-player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--world-meditation-deep); box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer;
}
.med-player-volume-slider::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; border: none;
  background: var(--world-meditation-deep); box-shadow: 0 1px 4px rgba(0,0,0,0.3); cursor: pointer;
}

@media (max-width: 520px) {
  .med-player-sheet { max-width: none; }
}

/* ---- Mini-Player im Header (Kaizen 2026-09-17): erscheint, wenn das
   Bottom-Sheet minimiert/weggewischt wird während Audio läuft ---- */
.med-mini-player {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; margin: 0 10px;
  background: rgba(49,80,90,0.08); border: none; border-radius: 999px; padding: 6px 8px 6px 12px;
  cursor: pointer; text-align: left;
}
.med-mini-player[hidden] { display: none; }
.med-mini-player-ic { width: 15px; height: 15px; color: var(--world-meditation-deep); flex-shrink: 0; }
.med-mini-player-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; color: #2b2b2b;
}
.med-mini-player-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.med-mini-player-btn {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(255,255,255,0.7); color: var(--world-meditation-deep);
}
.med-mini-player-btn i { width: 13px; height: 13px; }

/* ============================================================
   Ernährung — Wochenplan als eine Bühne (Issue #41 + UX 2026-09-17)
   Oben EIN großer Tag (default: heute), darunter eine kompakte
   horizontale Tagesleiste. Chip antippen tauscht nur den Inhalt.
   ============================================================ */

/* Kontext-Kopf über dem Wochenplan (Issue #41): Zeitraum, Stand, Urheber */
.plan-context {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: -6px 0 14px; padding: 0 2px;
}
.plan-context-week { font-size: 13.5px; font-weight: 800; color: #416645; }
.plan-context-meta { font-size: 12px; color: #757575; }
.plan-context-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em; color: var(--world-nutrition-deep);
  background: var(--world-nutrition); border-radius: 10px; padding: 3px 9px;
}
.accordion-note { margin: 0 0 10px; font-size: 12.5px; line-height: 1.45; color: #757575; }

.nutri-stage { margin-bottom: 12px; }
.nutri-day-hero {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 14px;
  border: 1px solid #F3E7D8;
}
.nutri-day-hero.is-today {
  border-color: var(--world-nutrition);
  box-shadow: 0 10px 26px rgba(143, 111, 46, 0.16);
}
/* Kurze Ein-Blende beim Tageswechsel — bewusst dezent, kein Sprung im Layout */
.nutri-day-hero { transition: opacity var(--motion-enter) ease, transform var(--motion-enter) ease; }
.nutri-day-hero.is-entering { opacity: 0; transform: translateY(6px); }
@media (prefers-reduced-motion: reduce) {
  .nutri-day-hero, .nutri-day-hero.is-entering { transition: none; opacity: 1; transform: none; }
}
.nutri-hero-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.nutri-hero-eyebrow {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--world-nutrition-deep); margin-bottom: 2px;
}
.nutri-hero-title {
  margin: 0; font-family: "Abhaya Libre", Georgia, serif; font-size: 22px;
  font-weight: 800; color: #416645; display: flex; align-items: baseline; gap: 8px;
}
.nutri-hero-date { font-family: "Nunito", sans-serif; font-size: 12.5px; font-weight: 700; color: #757575; }
.nutri-hero-meta {
  flex: none; font-size: 11.5px; font-weight: 800; color: var(--world-nutrition-deep);
  background: #FDF1E3; border-radius: 12px; padding: 5px 10px; white-space: nowrap;
}
.nutri-hero-slots { min-height: 44px; }

.nutri-daybar {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.nutri-daybar::-webkit-scrollbar { display: none; }
.nutri-daybar { scrollbar-width: none; }
.nutri-chip {
  flex: none; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 52px; padding: 8px 6px 6px;
  background: #fff; border: 1px solid #F0E2D2; border-radius: 16px;
  cursor: pointer; font-family: inherit; color: #757575;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease,
    border-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.nutri-chip:hover { border-color: var(--world-nutrition); }
.nutri-chip:active { transform: scale(0.96); }
.nutri-chip-day { font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.nutri-chip-date { font-size: 11.5px; font-weight: 700; }
.nutri-chip-dot {
  width: 5px; height: 5px; border-radius: 50%; margin-top: 3px;
  background: var(--world-nutrition);
}
.nutri-chip.is-empty { color: #B0A79D; }
.nutri-chip.is-empty .nutri-chip-dot { background: transparent; }
.nutri-chip.is-today:not(.is-active) { border-color: var(--world-nutrition); color: var(--world-nutrition-deep); }
.nutri-chip.is-active {
  background: var(--world-nutrition-deep); border-color: var(--world-nutrition-deep); color: #fff;
  box-shadow: 0 6px 16px rgba(101, 67, 41, 0.22);
}
.nutri-chip.is-active .nutri-chip-dot { background: var(--world-nutrition); }
.nutri-chip.is-active.is-empty .nutri-chip-dot { background: transparent; }

@media (min-width: 700px) {
  .nutri-chip { min-width: 64px; }
  .nutri-hero-title { font-size: 25px; }
}

/* ---------- Wettkämpfe: Leerzustand mit Terminen + Anfrage (2026-09-17) ---------- */
.form-grid .field-wide, .form-grid .form-actions { grid-column: 1 / -1; }
.competition-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid #F3E7D8;
}
.competition-item:last-child { border-bottom: none; }
.competition-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.competition-item-name { font-weight: 800; font-size: 14px; color: #416645; }
.competition-item-meta { font-size: 12px; color: #757575; }
.competition-item-desc { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: #757575; }
.competition-item .btn { flex: none; }
@media (max-width: 420px) {
  .competition-item { flex-direction: column; align-items: flex-start; }
}

/* ---------- Foto-Nährwert-Tracker (Kaizen 2026-09-22) ---------- */
/* Eigener Namespace .photo-* im Ernährungs-Bereich; nutzt die Ernährungs-Welt-
   Farben (--world-nutrition) damit sich der Block wie ein Teil des Tabs anfühlt. */
.photo-tracker-head {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
}
.photo-tracker-ic {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: var(--world-nutrition); color: var(--world-nutrition-deep);
  display: flex; align-items: center; justify-content: center;
}
.photo-tracker-ic svg { width: 21px; height: 21px; }
.photo-tracker-actions { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 520px) { .photo-tracker-actions { flex-direction: row; } }
.photo-tracker-cta { width: 100%; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; }
.photo-tracker-cta svg { width: 17px; height: 17px; }

.photo-tracker-state {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px; font-size: 14px; color: #6B6B6B;
}
.photo-tracker-progress { display: block; width: 100%; height: 7px; margin-top: 8px; accent-color: var(--world-nutrition-deep); }
.photo-tracker-progress[hidden], .photo-tracker-state[hidden] { display: none; }
.photo-tracker-spinner {
  width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid var(--world-nutrition);
  border-top-color: var(--world-nutrition-deep);
  animation: photo-spin 720ms linear infinite;
}
@keyframes photo-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .photo-tracker-spinner { animation-duration: 2400ms; }
}

.photo-tracker-error {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-inset);
  background: #FDF0EC; color: #8A4B38; font-size: 14px; line-height: 1.45;
}

.photo-tracker-retry { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.photo-tracker-retry[hidden] { display: none; }

/* --- Ergebnis-Karte --- */
.photo-result {
  margin-top: 16px; padding: 18px; border-radius: var(--radius-inset);
  background: #FFFBF7; border: 1px solid #F0E2D5;
}
.photo-result-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.photo-result-head h4 { margin: 0 0 2px; font-size: 17px; }
.photo-result-portion { margin: 0; font-size: 13px; color: #7A7A7A; }
.photo-confidence {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; background: #EFEFEF; color: #6B6B6B; white-space: normal;
}
.photo-confidence-hoch { background: #E4EFE5; color: #3F6146; }
.photo-confidence-mittel { background: #FBF0DC; color: #7A5B22; }
.photo-confidence-niedrig { background: #F4E7E2; color: #8A5744; }

.photo-macros {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.photo-macro {
  background: #fff; border-radius: var(--radius-control); padding: 10px 6px;
  text-align: center; border: 1px solid #F1E7DC; min-width: 0;
}
.photo-macro-kcal { background: var(--world-nutrition); border-color: var(--world-nutrition); }
.pm-value {
  display: block; font-weight: 800; font-size: 14px;
  color: var(--world-nutrition-deep); line-height: 1.25; overflow-wrap: anywhere;
}
.pm-label { display: block; font-size: 10.5px; color: #7A7A7A; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .photo-macros { grid-template-columns: repeat(2, 1fr); }
}

.photo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.photo-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #F4EFE8; color: #6B5B49;
}
.photo-result-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 12px 0 0; font-size: 13px; color: #6B6B6B; line-height: 1.45;
}
.photo-result-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
.photo-result-disclaimer {
  margin: 10px 0 0; font-size: 12px; color: #8A8A8A; line-height: 1.45;
}
.photo-result-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.photo-result-actions .btn { flex: 1 1 auto; }

.photo-time-confirm {
  margin-top: 14px; padding: 12px; border-radius: var(--radius-control);
  background: #F4EFE8;
}
.photo-time-confirm-hint { margin: 0 0 8px; font-size: 13px; color: #6B5B49; line-height: 1.4; }
.photo-time-confirm-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-time-confirm-row input, .photo-time-confirm-row select {
  flex: 1 1 110px; min-width: 100px; padding: 8px 10px; border-radius: var(--radius-control);
  border: 1px solid #DCD3C6; font-size: 13px; background: #fff;
}

/* --- Tageslog --- */
.photo-log { margin-top: 18px; }
.photo-log-empty { margin: 0; font-size: 13.5px; color: #8A8A8A; }
.photo-log-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 4px;
}
.photo-log-head h4 { margin: 0; font-size: 15px; }
.photo-log-total { font-weight: 800; font-size: 14px; color: var(--world-nutrition-deep); }
.photo-log-totals {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: 12px; color: #7A7A7A; margin-bottom: 10px;
}
.photo-log-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid #F0E8DF;
}
.photo-log-main { flex: 1 1 auto; min-width: 0; }
.photo-log-dish {
  display: block; font-weight: 700; font-size: 14px; color: #424242;
  overflow-wrap: anywhere;
}
.photo-log-meta { display: block; font-size: 12px; color: #8A8A8A; margin-top: 1px; overflow-wrap: anywhere; }
.photo-log-planned { display: block; font-size: 12px; color: #8A5744; margin-top: 1px; }
.photo-log-del {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  color: #B0A99F; padding: 6px; border-radius: var(--radius-control);
}
.photo-log-del:hover { color: #8A5744; background: #F7F1EC; }
.photo-log-del svg { width: 16px; height: 16px; display: block; }

/* Task 179: today's training and private screenshots. */
.training-today { border-bottom: 1px solid var(--training-proof-line); padding-bottom: 20px; }
.training-entry { margin-bottom: 12px; }
.training-today .plan-day-exercise-row { padding: 12px 0; }
.training-entry .day-card { margin-bottom: 8px; }
.training-proof-row, .training-proof-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.training-proof-pick { margin: 8px 0; }
.training-proof-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; border: 0; border-radius: 16px; padding: 24px; color: var(--training-proof-text); background: var(--training-proof-bg); }
.training-proof-dialog::backdrop { background: var(--training-proof-backdrop); }
.training-proof-dialog input { width: 100%; min-width: 0; margin-top: 8px; }
.training-proof-dialog h3 { margin-top: 0; }
.training-proof-dialog p { line-height: 1.5; }
.training-proof-privacy { font-size: 13px; }
.training-proof-admin img { display: block; max-width: 100%; max-height: 480px; object-fit: contain; margin: 12px 0; }
.training-proof-admin summary { overflow-wrap: anywhere; }

.template-group { border-top: 1px solid #e6e6e6; }
.template-group-summary { cursor: pointer; font-weight: 700; color: #416645; font-size: 14px; padding: 12px 0; list-style: none; }
.template-group-summary::-webkit-details-marker { display: none; }
.template-group-summary::before { content: "\25B8"; display: inline-block; margin-right: 8px; transition: transform .15s; }
.template-group[open] > .template-group-summary::before { transform: rotate(90deg); }
.template-group-count { font-weight: 400; font-size: 11px; color: #757575; margin-left: 6px; }
.template-group > .template-list-item { padding-left: 18px; }

/* ---------- Admin cockpit, Karten, Profil-Sperre, Kalender-Training ---------- */

.cockpit-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 1000px) { .cockpit-grid { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); align-items: start; } }
.cockpit-table { display: flex; flex-direction: column; }
.cockpit-row {
  display: grid; grid-template-columns: 1.3fr 2.4fr 1fr 1fr 0.9fr auto; gap: 12px; align-items: center;
  padding: 10px 6px; border-bottom: 1px solid #EFE5D8; font-size: 13.5px;
}
.cockpit-row:last-child { border-bottom: none; }
.cockpit-head { font-size: 11.5px; font-weight: 700; color: #757575; text-transform: uppercase; letter-spacing: .03em; }
.cockpit-name { display: flex; flex-direction: column; }
.cockpit-name small { color: #757575; font-size: 11.5px; }
.cockpit-attn { display: flex; flex-wrap: wrap; gap: 4px; }
.attn-chip { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: #EFE5D8; color: #424242; }
.attn-high { background: #F6D5D0; color: #8A2C1F; font-weight: 700; }
.attn-mid { background: #F8E7C2; color: #7A5410; }
.attn-low { background: #EFE5D8; color: #5C5C5C; }
.attn-ok { background: #DCE8DC; color: #416645; }
.cockpit-row.score-3 { background: #FDF3F1; }
@media (max-width: 760px) {
  .cockpit-head { display: none; }
  .cockpit-row { grid-template-columns: 1fr 1fr; }
  .cockpit-row > .cockpit-name, .cockpit-row > .cockpit-attn { grid-column: 1 / -1; }
  .cockpit-row > [data-label]::before { content: attr(data-label) ": "; color: #757575; font-size: 11.5px; }
}

.overview-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.overview-card { margin: 0; }
.overview-card h4 { margin: 0 0 8px; font-size: 14px; color: #416645; display: flex; align-items: center; gap: 6px; }
.ov-big { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #424242; overflow-wrap: anywhere; }
.ov-sub { margin: 0 0 8px; font-size: 12.5px; color: #757575; }
.ov-list { margin: 0 0 8px; padding-left: 18px; font-size: 13px; }

.profile-lock-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: #F4ECE0; border: 1.5px solid #E5DACB;
  font-size: 13px; color: #424242;
}
.profile-lock-bar.is-unlocked { background: #FDF3DD; border-color: #E8C873; }
#admin-client-profile-form.is-locked input,
#admin-client-profile-form.is-locked select,
#admin-client-profile-form.is-locked textarea { background: #F6F1EA; color: #5C5C5C; cursor: default; }
#admin-client-profile-form.is-locked button[type="submit"],
#admin-client-profile-form.is-locked .btn-primary { display: none; }
.audit-entry { padding: 8px 0; border-bottom: 1px solid #EFE5D8; font-size: 13px; }
.audit-entry:last-child { border-bottom: none; }
.audit-entry ul { margin: 4px 0 0; padding-left: 18px; }

.train-row { flex-direction: column; align-items: stretch; padding: 10px; border: 1px solid #EFE5D8; border-radius: 10px; background: #fff; }
.train-row-main { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.train-field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: #757575; min-width: 130px; }
.train-field.grow { flex: 1 1 240px; }
.train-field input, .train-field textarea { width: 100%; }
.train-check { display: flex; gap: 6px; align-items: center; font-size: 13px; padding-bottom: 10px; }
.train-check input { flex: none; width: auto; }
.train-kind-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #DCE8DC; color: #416645; align-self: center; }
.train-weekday { font-weight: 700; color: #416645; min-width: 28px; padding-bottom: 10px; }
.train-row-meta { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.train-row-meta:empty { display: none; }
.train-thumb { flex: none; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: #F4ECE0; display: flex; align-items: center; justify-content: center; }
.train-thumb img { width: 100%; height: 100%; object-fit: cover; }
.train-thumb-empty { display: flex; flex-direction: column; align-items: center; color: #9A9A9A; }
.train-thumb-empty small { font-size: 9.5px; }
.train-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.attr-chip { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #E4EDE4; color: #416645; }
.attr-chip-empty { background: #F0EBE3; color: #9A9A9A; }
.lib-item-info .train-chips { margin-top: 3px; }

.plan-lib-exercise { display: flex; gap: 10px; align-items: center; }
.plan-lib-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; }
.plan-lib-purpose { display: block; color: #757575; font-size: 12px; }
.train-row .train-field input[type="date"] { flex: none; min-width: 150px; }
.train-row .train-field input[type="text"], .train-row .train-field input[type="number"] { min-width: 120px; }
.train-field { min-width: 150px; }
.train-row-main { row-gap: 10px; }
.train-row .train-field { flex: 0 1 auto; min-width: 0; }
.train-row .train-field.grow { flex: 1 1 220px; }
.train-row .train-field input, .train-row .train-field textarea { flex: none; width: 100%; box-sizing: border-box; }
.train-row .train-field input[type="date"] { width: 160px; }
.train-row .train-field input[type="number"] { width: 120px; }
.train-row .train-field:has(input[data-f="note"]) { flex: 1 1 140px; }
.train-row .train-field:has(input[data-f="dayText"]) { width: 150px; }
.train-weekday { flex: none; }

.req { color: #B3412E; margin-left: 2px; }
.train-field span em { font-weight: 400; font-style: normal; color: #9A9A9A; }
.train-detail-line { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; align-items: flex-end; }
.train-detail-line .train-field { flex: 0 1 auto; }
.train-detail-line .train-field input { width: 130px; }
.train-detail-line .train-field.grow { flex: 1 1 180px; }
.train-detail-line .train-field.grow input { width: 100%; }
.train-invalid { border-color: #B3412E !important; background: #FBEDEA !important; }
.train-need { border-color: #D9A441 !important; background: #FFF6DD !important; }
.train-row-error { margin: 6px 0 0; color: #B3412E; font-size: 12.5px; font-weight: 600; }
.train-errors { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; background: #FBEDEA; color: #8F2F20; font-size: 13px; font-weight: 600; }
.train-legacy-wrap { margin-top: 16px; padding: 12px; border: 1px dashed #D9A441; border-radius: 12px; background: #FFFAEE; }
.train-legacy-wrap h5 { margin: 0 0 4px; font-size: 14px; color: #7A5A10; }
.train-kind-legacy { background: #F6E3B0; color: #7A5A10; }
.train-legacy-day { font-weight: 700; align-self: center; }
.train-legacy-day em { font-weight: 400; font-style: normal; color: #757575; font-size: 12px; }
.train-legacy-text { flex: 1 1 260px; background: #fff; border: 1px solid #EFE5D8; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.train-legacy-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.plan-detail-line { display: block; color: #416645; font-size: 12.5px; font-weight: 600; margin-top: 2px; }
@media (max-width: 640px) {
  .train-detail-line .train-field input { width: 100%; }
  .train-detail-line .train-field { flex: 1 1 42%; }
  .train-row .train-field input[type="date"] { width: 100%; }
}

/* ---------- Dein Trainingsplan (Task #268) ---------- */
.tp-section { --tp-accent: var(--world-training); --tp-deep: var(--world-training-deep); }
#tp-today { margin: 4px 0 18px; }
.tp-week { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 8px; }
.tp-day {
  display: block; width: 100%; text-align: left; font: inherit; color: #2f2a22; background: #fff;
  border: 1px solid #EFE4D2; border-radius: var(--radius-card); box-shadow: var(--shadow-soft);
  padding: 14px 16px; min-height: 64px; cursor: pointer; position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tp-day:hover { border-color: var(--tp-accent); box-shadow: 0 6px 18px rgba(143, 111, 46, 0.16); }
.tp-day:active { transform: scale(0.985); background: #FBF5E8; }
.tp-day:focus-visible { outline: 3px solid var(--tp-accent); outline-offset: 2px; }
.tp-day.is-today { border: 2px solid var(--tp-accent); background: linear-gradient(180deg, #FFFBF2 0%, #fff 70%); box-shadow: 0 8px 22px rgba(143, 111, 46, 0.2); }
.tp-day.is-big { padding: 16px 18px; }
.tp-day-rest { cursor: default; min-height: 0; padding: 10px 16px; background: #FCF9F4; box-shadow: none; }
.tp-day-rest:hover { border-color: #EFE4D2; box-shadow: none; }
.tp-day-rest:active { transform: none; background: #FCF9F4; }
.tp-day-rest .tp-day-count { color: #9c9c9c; }
.tp-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-day-titles { min-width: 0; flex: 1; display: block; }
.tp-day-rest .tp-day-titles { display: flex; align-items: center; justify-content: space-between; }
.tp-day-name { flex-wrap: wrap; font-family: "Abhaya Libre", serif; font-weight: 800; font-size: 19px; color: var(--tp-deep); display: flex; align-items: baseline; gap: 8px; }
.tp-day-name small { font-family: inherit; font-size: 13px; font-weight: 600; color: #6f6f6f; }
.tp-badge { background: var(--tp-accent); color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 800; padding: 3px 10px; letter-spacing: 0.02em; }
.tp-day-count { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: #416645; }
.tp-day-rest .tp-day-count { margin: 0; }
.tp-day-go { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #F1E7D0; color: var(--tp-deep); flex: none; }
.tp-day-go svg { width: 18px; height: 18px; }
.tp-day:hover .tp-day-go, .tp-day:active .tp-day-go { background: var(--tp-accent); color: #fff; }
.tp-day-rows { display: block; margin-top: 10px; }
.tp-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid #F3E7D8; }
.tp-row:first-child { border-top: none; padding-top: 2px; }
.tp-row-state { flex: none; color: #bda98b; padding-top: 1px; }
.tp-row-state svg { width: 20px; height: 20px; }
.tp-row.is-done .tp-row-state { color: #416645; }
.tp-row.is-done .tp-row-title { color: #8a8a8a; text-decoration: line-through; }
.tp-row-main { min-width: 0; flex: 1; }
.tp-row-title { display: block; font-size: 15.5px; color: #2f2a22; line-height: 1.3; overflow-wrap: anywhere; }
.tp-list { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.4; color: #3a3a3a; text-align: left; }
.tp-list li { margin: 2px 0; overflow-wrap: anywhere; }
.tp-list-big { margin: 12px 0 0; font-size: 15px; line-height: 1.5; }
.tp-ex-coach { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #F1F6EE; color: #2f5233; font-size: 13.5px; }
.tp-ex-coach svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tp-chip { display: inline-flex; align-items: center; gap: 5px; background: #F4EEDF; color: #4b3d1c; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.tp-chip svg { width: 14px; height: 14px; flex: none; color: var(--tp-accent); }
.tp-chip-weight { background: #E9F0E6; color: #2f5233; }
.tp-chip-weight svg { color: #416645; }
.tp-chip-soft { background: transparent; border: 1px dashed #d6c7a8; color: #6f6f6f; font-weight: 600; }
.tp-today-empty { display: flex; gap: 12px; align-items: center; background: #FCF9F4; border: 1px dashed #d6c7a8; border-radius: var(--radius-card); padding: 14px 16px; color: #6f6f6f; }
.tp-today-empty svg { width: 26px; height: 26px; color: var(--tp-accent); flex: none; }
.tp-today-empty strong { display: block; color: #2f2a22; }
.tp-today-empty span { font-size: 13px; }

.tp-day-dialog { border: 0; padding: 0; background: #FFFDF8; color: #2f2a22; width: min(620px, 100vw); max-width: 100vw; max-height: 92dvh; overflow-y: auto; border-radius: 22px 22px 0 0; margin: 0 auto; position: fixed; inset: auto 0 0 0; }
.tp-day-dialog::backdrop { background: rgba(33, 33, 33, 0.55); }
.tp-dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 18px 12px; background: #FFFDF8; border-bottom: 1px solid #F3E7D8; }
.tp-dialog-head h3 { margin: 0; font-size: 22px; color: var(--world-training-deep); }
.tp-dialog-eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: #6f6f6f; }
.tp-dialog-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #F1E7D0; color: var(--world-training-deep); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.tp-dialog-close:hover { background: #E6D7B5; }
#tp-day-dialog-body { padding: 14px 18px 28px; }
.tp-ex { background: #fff; border: 1px solid #EFE4D2; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.tp-ex.is-done { opacity: 0.85; }
.tp-ex-img { display: block; width: 100%; max-height: 260px; object-fit: cover; background: #FCF5F0; }
.tp-ex-body { padding: 14px 16px 16px; }
.tp-ex-body h4 { margin: 0; font-size: 18px; color: #2f2a22; }
.tp-ex.is-done h4 { text-decoration: line-through; color: #8a8a8a; }
.tp-ex-purpose { margin: 10px 0 0; font-size: 13.5px; color: #555; }
.tp-ex-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #FBF1D9; color: #4b3d1c; font-size: 13.5px; }
.tp-ex-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--world-training); }
.tp-ex-guide { margin-top: 10px; }
.tp-ex-guide summary { cursor: pointer; font-weight: 800; color: #416645; font-size: 14px; padding: 6px 0; }
.tp-ex-guide p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; color: #3a3a3a; }
.tp-check { display: flex; align-items: center; gap: 12px; margin-top: 14px; min-height: 48px; padding: 0 14px; border-radius: 12px; background: #F1F6EE; color: #2f5233; font-weight: 800; cursor: pointer; }
.tp-check input { width: 24px; height: 24px; accent-color: #416645; cursor: pointer; }

@media (min-width: 700px) {
  .tp-week { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .tp-day-dialog { border-radius: 22px; inset: 0; margin: auto; max-height: 88dvh; height: fit-content; }
}
@media (min-width: 1100px) {
  .tp-week { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .tp-day { transition: none; } .tp-day:active { transform: none; } }

/* Admin: Wochenplan der Kundin */
.admin-wp-modes { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.admin-wp-modes .btn.is-active { background: var(--world-nutrition-deep, #654329); color: #fff; border-color: var(--world-nutrition-deep, #654329); }
.admin-wp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.admin-wp-editor { margin-top: 14px; padding: 14px; border: 1px solid #F0E2D2; border-radius: 14px; background: #FFFBF5; }
.admin-wp-editor h4 { margin: 0 0 10px; font-family: "Abhaya Libre", serif; color: #416645; }
.admin-wp-meal-list { max-height: 240px; overflow-y: auto; border: 1px solid #F0E2D2; border-radius: 10px; background: #fff; margin-bottom: 12px; }
.admin-wp-meal { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #F3E7D8; font-size: 14px; cursor: pointer; }
.admin-wp-meal:last-child { border-bottom: none; }
.admin-wp-meal > span:nth-of-type(1) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.admin-wp-meal-kcal { flex: none; font-size: 12px; color: #757575; }
.admin-wp-scope { border: 1px solid #F0E2D2; border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.admin-wp-scope legend { font-size: 13px; font-weight: 700; color: #556F57; padding: 0 6px; }
.admin-wp-scope label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 4px 0; }
#admin-wp-stage .nutri-hero-head { flex-wrap: wrap; gap: 6px 10px; }
#admin-wp-stage .nutri-hero-title { white-space: nowrap; }
