/* ==========================================================
   FamilienHub – Design
   Warm, hell, abgerundet, große Touch-Flächen, Dark Mode
   ========================================================== */

:root {
  --bg: #FFF7F2;
  --surface: #FFFFFF;
  --surface-2: #FFF0E7;
  --surface-3: #FBE6DA;
  --text: #2A2131;
  --muted: #7B6F83;
  --border: #F2E2D8;
  --primary: #F2546B;
  --primary-2: #FF9A5A;
  --primary-soft: #FFE3E2;
  --on-primary: #FFFFFF;
  --accent: #22A699;
  --accent-soft: #D9F4F0;
  --sun: #FFC94A;
  --danger: #E5484D;
  --ok: #2E9E5B;
  --shadow: 0 8px 24px rgba(120, 60, 40, .08), 0 1px 3px rgba(120, 60, 40, .06);
  --shadow-lg: 0 18px 50px rgba(80, 30, 20, .22);
  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --grad: linear-gradient(135deg, var(--primary-2), var(--primary));
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #15121A;
  --surface: #201C27;
  --surface-2: #2A2533;
  --surface-3: #352F40;
  --text: #F5EEF7;
  --muted: #A99DB3;
  --border: #322B3C;
  --primary: #FF6B80;
  --primary-2: #FFA26B;
  --primary-soft: #45263A;
  --accent: #3CC7B8;
  --accent-soft: #1D3B3A;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #15121A;
    --surface: #201C27;
    --surface-2: #2A2533;
    --surface-3: #352F40;
    --text: #F5EEF7;
    --muted: #A99DB3;
    --border: #322B3C;
    --primary: #FF6B80;
    --primary-2: #FFA26B;
    --primary-soft: #45263A;
    --accent: #3CC7B8;
    --accent-soft: #1D3B3A;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; font-weight: 750; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.bold { font-weight: 700; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 18px; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Splash ---------- */
.splash { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.splash img { border-radius: 26px; box-shadow: var(--shadow-lg); animation: pop .6s ease; }
@keyframes pop { from { transform: scale(.8); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* ---------- Shell / Layout ---------- */
.shell { min-height: 100vh; }
.main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 980px; margin: 0 auto; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 12px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar h1 { flex: 1; font-size: 1.45rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { font-size: .85rem; color: var(--muted); font-weight: 500; }
.view { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 16px; }

.demo-banner {
  margin: 0 16px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--text); font-size: .85rem;
  display: flex; gap: 10px; align-items: center;
}
.demo-banner b { color: var(--accent); }

/* Bottom navigation (mobil) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 6px 8px var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
  border-radius: 16px; position: relative;
}
.nav-item svg { width: 26px; height: 26px; }
.nav-item.active { color: var(--primary); }
.nav-item.active::before {
  content: ""; position: absolute; top: 2px; width: 46px; height: 32px; border-radius: 16px;
  background: var(--primary-soft); z-index: -1;
}
.nav-item .badge-dot { position: absolute; top: 4px; right: calc(50% - 20px); }

/* Seitenleiste (PC) */
.side-nav { display: none; }
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  .side-nav {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; left: 0; top: 0; bottom: 0; width: 248px; padding: 22px 14px;
    background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
  }
  .side-nav .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 1.2rem; }
  .side-nav .brand img { width: 40px; height: 40px; border-radius: 12px; }
  .side-nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px;
    color: var(--text); text-decoration: none; font-weight: 600;
  }
  .side-nav a svg { width: 22px; height: 22px; color: var(--muted); }
  .side-nav a:hover { background: var(--surface-2); }
  .side-nav a.active { background: var(--primary-soft); color: var(--primary); }
  .side-nav a.active svg { color: var(--primary); }
  .side-nav .sep { height: 1px; background: var(--border); margin: 10px 6px; }
  .shell { padding-left: 248px; }
  .main { padding-bottom: 40px; }
  .view { padding: 4px 28px 28px; }
  .topbar { padding: 22px 28px 12px; }
  .demo-banner { margin: 0 28px; }
  .fab { bottom: 32px !important; right: 40px !important; }
}

/* ---------- Karten ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.card.flat { box-shadow: none; }
.card.tint { background: var(--surface-2); border-color: transparent; }
.card.hero { background: var(--grad); color: #fff; border: none; }
.card.hero .muted { color: rgba(255, 255, 255, .85); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-head h2 { flex: 1; }
.card-head .link { font-size: .85rem; font-weight: 700; color: var(--primary); text-decoration: none; padding: 6px 4px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 104px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-weight: 700; box-shadow: var(--shadow);
  cursor: pointer; font: inherit; text-align: left;
}
.tile .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.tile .ico svg { width: 24px; height: 24px; }
.tile .muted { font-weight: 500; font-size: .8rem; }

/* ---------- Buttons ---------- */
button { font: inherit; color: inherit; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--grad); border: none; color: var(--on-primary); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-accent { background: var(--accent); border: none; color: #fff; }
.btn-soft { background: var(--primary-soft); border: none; color: var(--primary); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text); flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.filled { background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); z-index: 25;
  width: 62px; height: 62px; border-radius: 22px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 45%, transparent);
}
.fab svg { width: 30px; height: 30px; }
.fab:active { transform: scale(.94); }

/* Segment-Schalter */
.seg { display: flex; background: var(--surface-2); border-radius: 16px; padding: 4px; gap: 4px; }
.seg button, .seg a {
  flex: 1; min-height: 40px; border: none; background: transparent; border-radius: 12px;
  font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: none;
  display: grid; place-items: center; font-size: .92rem; padding: 0 8px;
}
.seg .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 40px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem;
  user-select: none;
}
.chip.plain { padding: 0 14px; }
.chip.on { border-color: var(--chip, var(--primary)); background: color-mix(in srgb, var(--chip, var(--primary)) 16%, var(--surface)); }
.chip input { display: none; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.warn { background: #FFF1CC; color: #8A6100; }
.pill.danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.pill.ok { background: var(--accent-soft); color: var(--accent); }
.pill.points { background: #FFF1CC; color: #8A6100; }
html[data-theme="dark"] .pill.warn, html[data-theme="dark"] .pill.points { background: #3F3416; color: #FFD36B; }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .pill.warn, html[data-theme="system"] .pill.points { background: #3F3416; color: #FFD36B; } }
.badge-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: inline-block; }

/* ---------- Avatare ---------- */
.avatar {
  --s: 36px; width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  color: #fff; font-weight: 800; font-size: calc(var(--s) * .42);
  background: var(--c, var(--primary)); box-shadow: 0 0 0 2px var(--surface);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { --s: 24px; }
.avatar.sm { --s: 30px; }
.avatar.lg { --s: 56px; }
.avatar.xl { --s: 96px; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -8px; }

/* ---------- Listen-Zeilen ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 4px; min-height: 56px;
  border-bottom: 1px solid var(--border); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  text-align: left; width: 100%; color: inherit; font: inherit;
}
.list-row:last-child { border-bottom: none; }
.list-row .title { font-weight: 650; }
.list-row .meta { font-size: .82rem; color: var(--muted); }
.list-row.done .title { text-decoration: line-through; color: var(--muted); }
.color-bar { width: 5px; align-self: stretch; border-radius: 4px; flex: none; background: var(--c, var(--primary)); min-height: 36px; }
.group-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 4px 2px; display: flex; align-items: center; gap: 8px; }

/* Runde Abhak-Box */
.check {
  width: 30px; height: 30px; border-radius: 50%; flex: none; cursor: pointer;
  border: 2.5px solid color-mix(in srgb, var(--muted) 60%, transparent); background: transparent;
  display: grid; place-items: center; color: #fff; padding: 0;
}
.check svg { width: 18px; height: 18px; opacity: 0; }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on svg { opacity: 1; }
.check.big { width: 34px; height: 34px; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: .85rem; font-weight: 700; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=search], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-size: 16px; outline: none; appearance: none; -webkit-appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-grid { display: grid; gap: 14px; }
.form-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input { flex: 1; min-width: 0; }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: none; }
.switch-row .grow { display: flex; flex-direction: column; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 26px; height: 26px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.color-opt { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; background: var(--c); margin: 4px; }
.color-opt.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--c); }
.error { color: var(--danger); font-size: .9rem; font-weight: 600; }

/* ---------- Modal / Sheet ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 10, 20, .45);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  box-shadow: var(--shadow-lg); animation: up .24s cubic-bezier(.2, .9, .3, 1.1);
}
.sheet .grabber { width: 44px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sheet-head h2 { flex: 1; font-size: 1.25rem; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; position: sticky; bottom: calc(-18px - var(--safe-b)); background: var(--bg); padding: 10px 0 calc(var(--safe-b)); }
.sheet-actions .btn { flex: 1; }
.sheet.wide { max-width: 860px; }
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .sheet { border-radius: 28px; padding: 20px 24px 22px; }
  .sheet .grabber { display: none; }
}
@keyframes up { from { transform: translateY(40px); opacity: .5 } to { transform: none; opacity: 1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* Toast */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 16px; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .2s ease; max-width: 90vw; }

/* ---------- Leere Zustände ---------- */
.empty { text-align: center; padding: 22px 12px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty .big { font-size: 2.4rem; }

/* ---------- Auth / Onboarding ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 18px calc(24px + var(--safe-b)); }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.brand-big { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.brand-big img { width: 92px; height: 92px; border-radius: 28px; box-shadow: var(--shadow-lg); }
.brand-big h1 { font-size: 2rem; }
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.bg-blobs i:nth-child(1) { width: 320px; height: 320px; background: var(--primary-2); top: -80px; left: -80px; }
.bg-blobs i:nth-child(2) { width: 280px; height: 280px; background: var(--accent); bottom: -60px; right: -60px; opacity: .22; }
.bg-blobs i:nth-child(3) { width: 200px; height: 200px; background: var(--sun); top: 40%; right: 10%; opacity: .2; }

/* ---------- Dashboard ---------- */
.greet { display: flex; align-items: center; gap: 14px; }
.greet h1 { font-size: 1.5rem; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 700; font-size: .78rem; box-shadow: var(--shadow); }
.quick .qi { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.quick .qi svg { width: 22px; height: 22px; }
.ev-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; cursor: pointer; }
.ev-time { width: 56px; flex: none; font-weight: 800; font-size: .9rem; }
.ev-time .muted { font-weight: 600; font-size: .75rem; display: block; }

/* ---------- Kalender ---------- */
.cal-toolbar { display: flex; align-items: center; gap: 6px; }
.cal-toolbar h2 { flex: 1; font-size: 1.2rem; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month .wd { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.day-cell {
  min-height: 62px; border-radius: 14px; padding: 5px 4px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; overflow: hidden; text-align: left; font: inherit; color: inherit;
}
.day-cell.other { opacity: .45; }
.day-cell .num { font-size: .85rem; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; align-self: center; }
.day-cell.today .num { background: var(--grad); color: #fff; }
.day-cell.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.day-cell .dots { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.day-cell .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.day-cell .ev-pill { display: none; }
@media (min-width: 700px) {
  .day-cell { min-height: 104px; padding: 6px; }
  .day-cell .num { align-self: flex-start; }
  .day-cell .dots { display: none; }
  .day-cell .ev-pill { display: block; font-size: .72rem; font-weight: 650; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .day-cell .more { font-size: .7rem; color: var(--muted); padding-left: 4px; }
}
.ev-card {
  display: flex; gap: 12px; align-items: stretch; padding: 12px; border-radius: 16px; cursor: pointer;
  background: color-mix(in srgb, var(--c, var(--primary)) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c, var(--primary)) 25%, var(--border));
  text-align: left; width: 100%; font: inherit; color: inherit;
}
.ev-card .bar { width: 5px; border-radius: 4px; background: var(--stripe, var(--c, var(--primary))); flex: none; }
.ev-card .t { font-weight: 750; }
.ev-card .m { font-size: .82rem; color: var(--muted); }
.week-day { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.week-day:last-child { border-bottom: none; }
.week-day .wd-label { width: 54px; flex: none; text-align: center; cursor: pointer; }
.week-day .wd-label .n { font-size: 1.35rem; font-weight: 800; }
.week-day.today .wd-label .n { color: var(--primary); }
.week-day .evs { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hours { position: relative; }
.hour { display: flex; gap: 10px; min-height: 52px; border-top: 1px dashed var(--border); padding: 4px 0; }
.hour .h { width: 44px; flex: none; font-size: .75rem; color: var(--muted); font-weight: 700; }
.hour .evs { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.now-line { height: 2px; background: var(--primary); position: relative; margin: -1px 0; }
.now-line::before { content: ""; position: absolute; left: 46px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }

/* ---------- Einkauf ---------- */
.list-card { display: flex; align-items: center; gap: 14px; padding: 14px; cursor: pointer; text-decoration: none; color: inherit; }
.list-card .emoji { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--surface-2); }
.qty { font-size: .82rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 8px; }
.add-bar { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.add-bar .full { grid-column: 1 / -1; }
.cat-ico { width: 30px; text-align: center; font-size: 1.15rem; flex: none; }

/* ---------- Pinnwand / Chat ---------- */
.post-head { display: flex; align-items: center; gap: 10px; }
.post-text { white-space: pre-wrap; word-wrap: break-word; margin: 10px 0 0; }
.photo-grid { display: grid; gap: 4px; grid-template-columns: repeat(2, 1fr); margin-top: 10px; border-radius: 16px; overflow: hidden; }
.photo-grid.one { grid-template-columns: 1fr; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer; background: var(--surface-2); }
.photo-grid.one img { aspect-ratio: auto; max-height: 420px; }
.post-actions { display: flex; gap: 6px; margin-top: 8px; }
.comment { display: flex; gap: 8px; padding: 6px 0; }
.comment .bubble { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; font-size: .92rem; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs .th { position: relative; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; }
.thumbs .th img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .th button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.thumbs .th button svg { width: 14px; height: 14px; }

.chat { display: flex; flex-direction: column; gap: 6px; padding-bottom: 80px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 86%; }
.msg .bubble { background: var(--surface); border: 1px solid var(--border); padding: 9px 13px; border-radius: 18px 18px 18px 6px; white-space: pre-wrap; word-wrap: break-word; }
.msg .who { font-size: .72rem; font-weight: 800; margin-bottom: 2px; }
.msg .time { font-size: .68rem; color: var(--muted); margin-top: 2px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--grad); color: #fff; border: none; border-radius: 18px 18px 6px 18px; }
.msg.me .time { text-align: right; }
.day-sep { align-self: center; font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 12px; border-radius: 999px; margin: 8px 0; }
.chat-input {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 24;
  padding: 10px 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; gap: 8px; border-top: 1px solid var(--border);
}
.chat-input input { flex: 1; border-radius: 999px; }
.chat-input .btn { border-radius: 999px; width: 50px; padding: 0; }
@media (min-width: 900px) { .chat-input { left: 248px; bottom: 0; padding: 14px 28px; } }

/* ---------- Fotos ---------- */
.albums { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .albums { grid-template-columns: repeat(3, 1fr); } }
.album { cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; }
.album .cover { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); }
.album .cover img { width: 100%; height: 100%; object-fit: cover; }
.album .cover svg { width: 42px; height: 42px; opacity: .9; }
.pgrid { display: grid; gap: 4px; grid-template-columns: repeat(3, 1fr); }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(5, 1fr); } }
.pgrid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; background: var(--surface-2); }
.lightbox img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 16px; background: #000; }

/* ---------- Essensplan ---------- */
.meal-day { padding: 12px 14px; }
.meal-day.today { border-color: var(--primary); }
.meal-slot { display: flex; align-items: center; gap: 10px; padding: 8px 0; min-height: 48px; cursor: pointer; border-top: 1px solid var(--border); }
.meal-slot:first-of-type { border-top: none; }
.meal-slot .slot-name { width: 74px; flex: none; font-size: .78rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.meal-slot .slot-val { flex: 1; font-weight: 600; }
.meal-slot .slot-val.empty-slot { color: var(--muted); font-weight: 500; font-style: italic; }
.recipe-card { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.recipe-card .rimg { width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--grad); flex: none; display: grid; place-items: center; font-size: 1.8rem; }
.recipe-card .rimg img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Infos ---------- */
.call-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; text-decoration: none; }
.call-btn svg { width: 22px; height: 22px; }
.sos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sos a { text-decoration: none; color: #fff; background: var(--danger); border-radius: 16px; padding: 10px; text-align: center; font-weight: 800; }
.sos a span { display: block; font-size: .72rem; font-weight: 600; opacity: .9; }
.sos a.blue { background: #3D7BEA; }
.sos a.teal { background: var(--accent); }
.note-card { white-space: pre-wrap; }

/* ---------- Einstellungen ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.code-box { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: .18em; background: var(--surface-2); padding: 10px 14px; border-radius: 14px; text-align: center; }

/* iOS-Hinweis */
.ios-steps { display: flex; flex-direction: column; gap: 12px; }
.ios-step { display: flex; gap: 12px; align-items: center; }
.ios-step .n { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.ios-step svg { width: 22px; height: 22px; vertical-align: -5px; color: #3D7BEA; }

/* ---------- Installation ---------- */
.inst-steps { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .inst-steps { grid-template-columns: repeat(4, 1fr); } .inst-steps.one { grid-template-columns: 1fr; } }
.inst-steps.one { grid-template-columns: 1fr; }
.inst-step { display: flex; flex-direction: column; gap: 8px; }
.inst-img { background: var(--surface-2); border-radius: 18px; padding: 10px; display: grid; place-items: center; }
.inst-img .phone-svg { width: 100%; max-width: 130px; height: auto; }
.inst-img .pc-svg { width: 100%; max-width: 320px; height: auto; }
.inst-text { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; }
.inst-text .n { width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; flex: none; }
.inst-text svg { width: 16px; height: 16px; vertical-align: -3px; color: #3D7BEA; }
.code-inline { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; background: var(--surface); padding: 1px 6px; border-radius: 6px; }
.install-banner {
  margin: 0 16px 8px; padding: 8px 6px 8px 14px; border-radius: var(--radius-sm);
  background: var(--primary-soft); display: flex; align-items: center; gap: 10px; font-size: .9rem;
}
.install-banner .icon-btn { width: 36px; height: 36px; }
@media (min-width: 900px) { .install-banner { margin: 0 28px 8px; } }
.push-list { margin: 0; padding-left: 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.demo-banner svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
.install-banner { font-size: .88rem; }
.meal-slot svg, .list-card svg { color: var(--muted); flex: none; }
