/* ── Familienküche — Stylesheet ─────────────────────────── */
/* Typografie: Playfair Display + Source Serif 4             */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap');

/* ── Design-Token ─────────────────────────────────────────── */
:root {
  --braun-dunkel:  #2C1A0E;
  --braun-mittel:  #5C3317;
  --braun-hell:    #8C6A4A;
  --gold:          #C8954A;
  --gold-hell:     #F0C070;
  --creme:         #FDF6EE;
  --creme-dunkel:  #F5EBD8;
  --creme-rand:    #E8D5C0;
  --weiss:         #FFFDF8;
  --gruen:         #4CAF50;
  --rot:           #E57373;
  --text:          #2C1A0E;
  --text-weich:    #8C6A4A;
  --bg-warm:       #FDF6EE;

  --radius-s:  6px;
  --radius-m:  12px;
  --radius-l:  20px;
  --schatten:  0 2px 12px rgba(44,26,14,.10);
  --schatten-l: 0 8px 32px rgba(44,26,14,.15);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  background: var(--creme);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--braun-mittel); }

img { max-width: 100%; }

/* ── Layout ───────────────────────────────────────────────── */
.wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--braun-dunkel) 0%, var(--braun-mittel) 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(44,26,14,.3);
}

/* ── Zeile 1: Logo + Benutzer-Aktionen ───────────────────── */
.header-top {
  border-bottom: 1px solid rgba(200,149,74,.12);
}
.header-top-inner {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  max-width: 960px;
  margin: 0 auto;
  gap: 16px;
  position: relative;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-icon { font-size: 1.8rem; line-height: 1; }
.site-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.site-logo-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--creme);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.site-claim {
  font-size: .6rem;
  color: rgba(253,246,238,.45);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.header-actions a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(253,246,238,.7);
  padding: 6px 10px;
  border-radius: var(--radius-m);
  font-size: .82rem;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.header-actions a:hover,
.header-actions a.aktiv {
  background: rgba(200,149,74,.2);
  color: var(--gold-hell);
}
.header-actions a[href*="superadmin"] {
  color: var(--gold);
}
.header-logout {
  border: 1px solid rgba(200,149,74,.25);
  margin-left: 4px;
}

/* ── Hamburger-Button (nur Mobile sichtbar) ──────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 6px;
  background: none;
  border: 1px solid rgba(200,149,74,.3);
  border-radius: var(--radius-m);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(253,246,238,.8);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
  transform-origin: center;
}
.hamburger-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Zeile 2: Haupt-Navigation ───────────────────────────── */
.header-nav {
  background: rgba(0,0,0,.18);
}
.header-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-nav {
  display: flex;
  gap: 0;
}
.site-nav a {
  color: rgba(253,246,238,.65);
  padding: 9px 18px;
  font-size: .88rem;
  border-bottom: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
}
.site-nav a:hover {
  background: rgba(200,149,74,.1);
  color: rgba(253,246,238,.95);
}
.site-nav a.aktiv {
  color: var(--gold-hell);
  border-bottom-color: var(--gold);
  background: rgba(200,149,74,.1);
}

/* ── KW-Navigation ────────────────────────────────────────── */
.einkauf-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

.kw-nav {
  background: var(--braun-dunkel);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: .9rem;
}
.kw-nav a {
  color: var(--gold);
  padding: 4px 12px;
  border: 1px solid rgba(200,149,74,.4);
  border-radius: 20px;
  transition: background .2s;
}
.kw-nav a:hover { background: rgba(200,149,74,.2); }
.kw-nav strong { color: var(--creme); }

/* ── Flash-Nachrichten ────────────────────────────────────── */
.flash {
  padding: 12px 20px;
  border-radius: var(--radius-m);
  margin: 20px 0;
  font-size: .95rem;
}
.flash.ok  { background: #E8F5E9; border-left: 4px solid var(--gruen); color: #2E7D32; }
.flash.err { background: #FFEBEE; border-left: 4px solid var(--rot);   color: #C62828; }

/* ── Wochenplan-Grid ──────────────────────────────────────── */
.wochenplan-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin: 24px 0;
}

@media (max-width: 700px) {
  .wochenplan-grid { grid-template-columns: 1fr; }
}

.tag-karte {
  background: var(--weiss);
  border: 2px solid var(--creme-rand);
  border-radius: var(--radius-m);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--schatten);
  transition: border-color .2s, box-shadow .2s;
  min-height: 160px;
}
.tag-karte:hover { border-color: var(--gold); box-shadow: var(--schatten-l); }
.tag-karte.heute { border-color: var(--gold); background: #FFF9F2; }

.tag-label {
  font-family: 'Playfair Display', serif;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-weich);
}
.tag-label.heute-label { color: var(--gold); font-weight: 600; }
.tag-datum { font-size: .7rem; opacity: .65; font-family: inherit; letter-spacing: .04em; }

.mahlzeit-emoji { font-size: 2rem; line-height: 1; }

.mahlzeit-name {
  font-size: .85rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.3;
}

.tag-karte .badge-reihe { display: flex; flex-wrap: wrap; gap: 3px; }

.tag-aktionen {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tag-leer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
  color: var(--creme-rand);
}
.tag-leer-icon { font-size: 1.8rem; }
.tag-leer p { font-size: .8rem; color: var(--text-weich); opacity: .7; }

/* ── Mahlzeit-Slots (Mittag / Abend) ─────────────────────── */
.mahlzeit-slot {
  border: 1px solid var(--creme-rand);
  border-radius: var(--radius-s);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mahlzeit-slot-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-weich);
  font-weight: 600;
}

/* ── Personen-Anzeige ─────────────────────────────────────── */
.personen-info {
  font-size: .78rem;
  color: var(--text-weich);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: var(--radius-s);
  border: none;
  cursor: pointer;
  font-family: 'Source Serif 4', serif;
  font-size: .85rem;
  font-weight: 400;
  transition: background .2s, transform .1s, box-shadow .2s;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: scale(.97); }

.btn-gold {
  background: var(--gold);
  color: var(--braun-dunkel);
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-hell); color: var(--braun-dunkel); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--creme-rand);
  color: var(--text-weich);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: none; }

.btn-ghost {
  background: rgba(200,149,74,.12);
  color: var(--gold);
  border: 1px solid rgba(200,149,74,.3);
  padding: 5px 10px;
  font-size: .78rem;
}
.btn-ghost:hover { background: rgba(200,149,74,.25); color: var(--gold); }

.btn-danger {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
  padding: 5px 10px;
  font-size: .78rem;
}
.btn-danger:hover { background: #FFCDD2; }

.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn-full { width: 100%; }

/* ── Login Button ─────────────────────────────────────────── */

.btn-login {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-s);
  background: linear-gradient(
    135deg,
    var(--gold) 0%,
    var(--gold-hell) 100%
  );
  color: var(--braun-dunkel);
  font-family: 'Source Serif 4', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition:
    transform .12s ease,
    box-shadow .2s ease,
    filter .2s ease;
  box-shadow:
    0 4px 12px rgba(0,0,0,.08),
    0 1px 2px rgba(0,0,0,.06);
}

.btn-login:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
  box-shadow:
    0 8px 18px rgba(0,0,0,.12),
    0 2px 4px rgba(0,0,0,.08);
}

.btn-login:active {
  transform: scale(.985);
}

.btn-login:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Cards / Panels ───────────────────────────────────────── */
.card {
  background: var(--weiss);
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--schatten);
}

.card.login {
  background: var(--weiss);
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--schatten);
  min-height: 22rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--creme-rand);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--text);
}

/* ── Badges / Tags ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  color: #fff;
  white-space: nowrap;
}

/* ── Tabellen ─────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-weich); background: var(--creme-dunkel); }
tr:not(:last-child) td { border-bottom: 1px solid var(--creme-rand); }
tr:hover td { background: #FFF9F2; }

/* ── Formulare ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-login { margin-bottom: 16px; min-width: 100%; height: 4rem;}
.form-login::before, .form-login::after { box-sizing: border-box; margin: 0; padding: 0; }

label { display: block; font-size: .85rem; color: var(--text-weich); margin-bottom: 5px; }
label.form-login-top { display: block; font-size: 0.95rem; color: var(--text-weich); margin-bottom: 0px; height: 1.5rem;}

input[type=text], input[type=number], input[type=email],
input[type=password], input[type=url], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-s);
  background: var(--creme);
  color: var(--text);
  font-family: 'Source Serif 4', serif;
  font-size: 1.25rem;
  transition: border-color .2s;
  appearance: none;
}
input.form-logininput {
  width: 100%;
  min-height: 1.2rem;
  padding: 12px 16px; /* höher + mehr Innenabstand */
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-s);
  background: var(--creme);
  color: var(--text);
  font-family: 'Source Serif 4', serif;
  font-size: .95rem;
  line-height: 1.4; /* angenehmere vertikale Darstellung */
  transition: border-color .2s;
  appearance: none;
  box-sizing: border-box;
}

input.form-logininput:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--weiss);
}


select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%238C6A4A'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ── Einkaufsliste ────────────────────────────────────────── */
.einkauf-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--creme-rand);
}
.einkauf-item:last-child { border-bottom: none; }

.einkauf-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: none;
  transition: background .2s, border-color .2s;
}
.einkauf-check.erledigt {
  background: var(--gruen);
  border-color: var(--gruen);
}

.einkauf-artikel {
  flex: 1;
  font-size: .95rem;
}
.einkauf-artikel.erledigt {
  text-decoration: line-through;
  color: var(--text-weich);
  opacity: .6;
}

.einkauf-menge {
  font-size: .85rem;
  color: var(--text-weich);
  white-space: nowrap;
}

/* ── Familienmitglieder ───────────────────────────────────── */
.familie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.mitglied-karte {
  background: var(--creme);
  border: 1.5px solid var(--creme-rand);
  border-radius: var(--radius-m);
  padding: 16px;
  text-align: center;
}

.mitglied-emoji {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.mitglied-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  margin-bottom: 10px;
}

.praef-gruppe { margin-top: 8px; }
.praef-label { font-size: .72rem; color: var(--text-weich); margin-bottom: 4px; }

/* ── KI-Vorschlag Panel ───────────────────────────────────── */
.ki-panel {
  background: linear-gradient(135deg, #FFF3E0, #FFF8F0);
  border: 2px solid #FFB74D;
  border-radius: var(--radius-l);
  padding: 20px;
  margin: 20px 0;
}

.ki-titel {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--braun-mittel);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.ki-label {
  font-size: .72rem;
  background: #FFE0B2;
  color: #E65100;
  padding: 2px 8px;
  border-radius: 10px;
}

.vorschlag-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vorschlag-item {
  background: var(--weiss);
  border: 1.5px solid #FFD0A0;
  border-radius: var(--radius-m);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.vorschlag-emoji { font-size: 1.6rem; }
.vorschlag-info { flex: 1; }
.vorschlag-name { font-size: .95rem; color: var(--text); }
.vorschlag-grund { font-size: .78rem; color: var(--text-weich); font-style: italic; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(44,26,14,.5);
  backdrop-filter: blur(2px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.offen { display: flex; }

.modal {
  background: var(--weiss);
  border-radius: var(--radius-l);
  padding: 28px;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--schatten-l);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-titel {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  padding: 24px 20px;
  border-top: 1px solid var(--creme-rand);
  text-align: center;
  font-size: .8rem;
  color: var(--text-weich);
}

/* ── Utilities ────────────────────────────────────────────── */
.mt-4  { margin-top: 16px; }
.mt-8  { margin-top: 32px; }
.mb-4  { margin-bottom: 16px; }
.flex  { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-weich { color: var(--text-weich); }
.text-sm { font-size: .85rem; }
.playfair { font-family: 'Playfair Display', serif; }
.text-center { text-align: center; }

/* ── iPhone / Safe-Area Support ───────────────────────────── */
@supports (padding: env(safe-area-inset-top)) {
  .site-header { padding-top: env(safe-area-inset-top); }
  body         { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── Mobile (≤ 700px) — Wochenplan already handled ────────── */

/* ── Mobile (≤ 480px) — General iPhone optimisations ──────── */
@media (max-width: 480px) {

  /* Header – Zeile 1 */
  .header-top-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .site-logo-icon { font-size: 1.4rem; }
  .site-logo-name { font-size: 1rem; }
  .site-claim     { display: none; }
  /* Header-Actions als Hamburger-Dropdown auf Mobile */
  .header-actions {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--braun-dunkel, #1a0f06);
    border-top: 1px solid rgba(200,149,74,.2);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    z-index: 200;
    padding: 8px 0;
  }
  .header-actions.mobile-open {
    display: flex;
  }
  .header-actions a {
    padding: 13px 20px;
    font-size: .9rem;
    gap: 10px;
    border-radius: 0;
    border-bottom: 1px solid rgba(200,149,74,.08);
    justify-content: flex-start;
    min-height: 48px;
  }
  .header-actions a:last-child { border-bottom: none; }
  .header-actions .header-logout { border: none; margin-left: 0; }
  .action-label { display: inline; }
  .hamburger-btn { display: flex; }

  /* Header – Zeile 2 */
  .header-nav-inner { padding: 0 8px; }
  .site-nav { justify-content: space-around; }
  .site-nav a {
    padding: 8px 10px;
    font-size: .78rem;
    flex: 1;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Layout */
  .wrapper { padding: 0 10px; }

  /* KW navigation */
  .einkauf-grid {
    grid-template-columns: 1fr;
  }

  .kw-nav {
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px;
    font-size: .82rem;
  }
  .kw-nav strong {
    text-align: center;
    font-size: .78rem;
  }

  /* Cards */
  .card {
    padding: 14px;
    border-radius: var(--radius-m);
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  /* Wochenplan day cards (already 1-col at 700px, improve layout) */
  .tag-karte {
    min-height: 90px;
    padding: 10px 12px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
  }
  .tag-label  { width: 100%; }
  .tag-aktionen { flex-direction: row; gap: 6px; }

  /* Familie grid: 2-up on mobile */
  .familie-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  /* Buttons: minimum 44px touch target */
  .btn { min-height: 44px; }
  .btn-sm { min-height: 36px; }

  /* Modal: slide up from bottom on iPhone */
  .modal-backdrop { align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-l) var(--radius-l) 0 0;
    padding: 20px 16px 28px;
    max-height: 88vh;
  }

  /* Tables: make scrollable */
  .card > table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Einkauf items: easier touch */
  .einkauf-item { padding: 12px 0; gap: 14px; }
  .einkauf-check { width: 26px; height: 26px; }

  /* Vorschlag items */
  .vorschlag-item { flex-wrap: wrap; }
  .vorschlag-item .btn { margin-left: auto; }

  /* KI Panel */
  .ki-panel { padding: 14px; }
  .ki-titel { font-size: .9rem; flex-wrap: wrap; gap: 6px; }

  /* Footer */
  .site-footer { padding: 16px 12px; margin-top: 40px; }
}

/* ── Narrow iPhones (≤ 390px — iPhone 12/13/14) ────────────── */
@media (max-width: 390px) {
  .site-logo-name { font-size: .9rem; }
  .site-nav a     { font-size: .7rem; padding: 8px 6px; }
  .card           { padding: 12px; }
  .modal          { padding: 16px 12px 24px; }
  .wrapper        { padding: 0 8px; }
}

/* ── Mahlzeit Detail-Ansicht ─────────────────────────────── */
.mz-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--creme-rand);
}
.mz-detail-emoji { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }
.mz-detail-titles { flex: 1; min-width: 0; }
.mz-detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 8px;
}
.mz-detail-tags { display: flex; flex-wrap: wrap; gap: 4px; }

.mz-detail-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--creme-rand);
  margin-bottom: 20px;
}
.mz-detail-meta-item { display: flex; flex-direction: column; gap: 3px; }
.mz-detail-meta-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-weich);
}
.mz-detail-meta-value { font-size: 1.1rem; font-weight: 600; }

.mz-detail-section-titel {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-weich);
  font-weight: 600;
  margin-bottom: 10px;
}
.mz-detail-zutat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--creme-rand);
}
.mz-detail-zutat:last-child { border-bottom: none; }
.mz-detail-zutat-name { font-size: .95rem; }
.mz-detail-zutat-menge { font-size: .85rem; color: var(--text-weich); white-space: nowrap; }

.mz-detail-geteilt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--creme-dunkel);
  border-radius: var(--radius-s);
  font-size: .85rem;
  color: var(--text-weich);
}
.mz-detail-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--creme-rand);
}

/* Klickbare Tabellenzeilen */
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: #FFF5E9; }

/* Mahlzeit-Klick-Trigger im Wochenplan */
.mahlzeit-detail-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: opacity .15s;
}
.mahlzeit-detail-btn:hover { opacity: .75; }

/* ── Einstellungen ────────────────────────────────────────── */

/* Tab-Navigation: scrollbar auf Mobile, kein Overflow-Clip */
.einst-tab-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--creme-rand);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0;
}
.einst-tab-nav::-webkit-scrollbar { display: none; }
.einst-tab-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: .9rem;
  border-radius: var(--radius-m) var(--radius-m) 0 0;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-weich);
  transition: background .2s, color .2s;
}
.einst-tab-nav a.aktiv {
  background: var(--creme-dunkel);
  color: var(--gold);
  font-weight: 600;
  border: 2px solid var(--creme-rand);
  border-bottom: 2px solid var(--creme-dunkel);
  margin-bottom: -2px;
}

/* 2-spaltige Info-Übersicht (Konto-Tab) */
.einst-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

/* Listenzeilen (Benutzer, Tags, Bring!, Einladungen) */
.einst-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--creme-rand);
  border-radius: var(--radius-m);
}
.einst-list-row-info { flex: 1; min-width: 0; }
.einst-list-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Abschnitts-Header mit Titel + Aktions-Button */
.einst-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Einstellungen — Mobile (≤ 600px) ────────────────────── */
@media (max-width: 600px) {
  .einst-tab-nav a {
    padding: 9px 12px;
    font-size: .82rem;
    gap: 4px;
  }

  /* Info-Grid: 1-spaltig */
  .einst-info-grid {
    grid-template-columns: 1fr;
  }

  /* Listenzeilen: Aktionen umbrechen auf neue Zeile */
  .einst-list-row {
    flex-wrap: wrap;
  }
  .einst-list-row-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  /* Abschnitts-Header: umbrechen wenn nötig */
  .einst-section-header {
    flex-wrap: wrap;
  }

  /* Benutzer-Karte Header */
  .einst-user-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Kochbücher: Aktions-Button auf volle Breite */
  .einst-kb-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .einst-kb-row form { width: 100%; }
  .einst-kb-row form .btn { width: 100%; justify-content: center; }
}

/* ── Einstellungen — Desktop (> 600px) ───────────────────── */
.einst-kb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.einst-user-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* ── Coming Soon Badge ────────────────────────────────────── */
.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFCC80;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  vertical-align: middle;
}
.coming-soon-card {
  text-align: center;
  padding: 48px 24px;
}
.coming-soon-card .coming-soon-icon { font-size: 3rem; margin-bottom: 16px; }
.coming-soon-card .coming-soon-title { font-size: 1.4rem; margin-bottom: 10px; }
.coming-soon-card .coming-soon-badge { margin-bottom: 14px; }
.coming-soon-card p { max-width: 320px; margin: 0 auto; }
