/* Kaushan Script (SIL Open Font License, siehe /fonts/OFL-KaushanScript.txt): 80er-/Vice-City-Look für Überschriften */
@font-face {
  font-family: 'Kaushan Script';
  src: url(/fonts/KaushanScript.woff2?v=77bfafabf6) format('woff2');
  font-display: swap;
}

/* Farbschema „Sunset“: aus dem Familienfoto (Abendlila, Magenta, Sonnenuntergangs-Orange, Neon-Türkis) */
:root {
  --bg: #fdf5f3;
  --surface: #ffffff;
  --surface-2: #f9eaef;
  --text: #2a1638;
  --muted: #7a6680;
  --line: #f0dde5;
  --primary: #c22d7c;
  --primary-text: #ffffff;
  --accent: #e0601a;
  --neon: #1fa9b6;
  --danger: #b3302f;
  --ok: #2f8f6a;
  --sunset: linear-gradient(90deg, #5b2a86 0%, #c22d7c 40%, #f0782d 75%, #ffc94d 100%);
  --sky: linear-gradient(180deg, #3b1a5a 0%, #8e2a7e 32%, #e2457f 55%, #f6884a 75%, #ffc65c 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgb(60 20 70 / 6%), 0 4px 14px rgb(60 20 70 / 7%);
  --note-gelb: #fdf0b4;
  --note-blau: #d6e8fb;
  --note-gruen: #d7f0d9;
  --note-rosa: #fbdbe4;
  --note-lila: #e6dcf7;
  color-scheme: light dark;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160c21;
    --surface: #21132e;
    --surface-2: #2d1b3d;
    --text: #f7eaf1;
    --muted: #b6a0be;
    --line: #3b2850;
    --primary: #ff5fa8;
    --primary-text: #2a0618;
    --accent: #ffa25c;
    --neon: #4fe0e8;
    --ok: #4fc995;
    --shadow: none;
    --note-gelb: #4d4520;
    --note-blau: #22364b;
    --note-gruen: #233f2a;
    --note-rosa: #4a2733;
    --note-lila: #362c4c;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-size: 1.05rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.block { display: block; }
.pad { padding: 0 4px; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.right { margin-left: auto; }
.left { margin-right: auto; }
.boot { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Kopfzeile & Navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Sonnenuntergangs-Streifen unter der Kopfzeile */
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--sunset); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); text-decoration: none; min-width: 0; white-space: nowrap; letter-spacing: .01em; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.brand img { width: 30px; height: 30px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin-left: auto;
  background: var(--c); color: #fff; font-weight: 700; text-decoration: none; flex: none;
}
.nav { display: flex; gap: 4px; margin-left: 16px; }
.nav a {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 40px; outline: none; }

@media (max-width: 1000px) {
  /* backdrop-filter würde die fest positionierte Leiste an die Kopfzeile binden */
  .topbar { backdrop-filter: none; background: var(--bg); }
  .nav {
    position: fixed; bottom: 0; left: 0; right: 0; margin: 0; z-index: 10;
    justify-content: space-around; gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .nav a { flex-direction: column; gap: 1px; padding: 4px 6px; font-size: .7rem; flex: 1; }
  .nav a.active { box-shadow: none; background: transparent; }
  .nav .ico { font-size: 1.3rem; }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ---------- Grundbausteine ---------- */
.page-title { font-size: 1.6rem; margin: 4px 0 6px; }
.subtitle { margin: 0 0 18px; color: var(--muted); }
.section-title { margin: 28px 0 10px; color: var(--muted); font-size: 1rem; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; font-weight: 600; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 14px; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  border: 1px solid var(--line); margin-bottom: 14px;
}
.grid > .card { margin-bottom: 0; }
.card > h2 { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head a { font-size: .9rem; font-weight: 600; text-decoration: none; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.hint, small.hint { color: var(--muted); font-size: .85rem; margin: 4px 0; display: block; }
.error { color: var(--danger); min-height: 1.2em; margin: 4px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text);
  min-height: 40px; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: .88rem; }
.btn.block { width: 100%; }
.icon-btn {
  border: 0; background: transparent; cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.1rem; color: var(--muted); flex: none; display: inline-grid; place-items: center;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); min-height: 40px;
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field .label { font-weight: 600; font-size: .9rem; }
.check { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; cursor: pointer; }
.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 6px 0 12px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.toolbar input { flex: 1; }
.add-row { display: flex; gap: 8px; margin-bottom: 10px; }
.add-row input { flex: 1; }
.add-row select { width: auto; flex: none; }
.range-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-row input { width: auto; flex: 1; min-width: 140px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
details summary { cursor: pointer; color: var(--primary); font-weight: 600; margin-top: 10px; }
details ul { padding-left: 20px; color: var(--muted); font-size: .9rem; }

.tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--surface-2); border-radius: 12px; padding: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 7px 14px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip {
  --c: var(--primary);
  display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 4px 11px;
  font-size: .85rem; font-weight: 600; border: 1.5px solid var(--c); background: var(--c); color: #fff; cursor: default;
}
button.chip { cursor: pointer; }
.chip.off { background: transparent; color: var(--muted); border-color: var(--line); text-decoration: line-through; }
.chip.small { width: 24px; height: 24px; padding: 0; font-size: .72rem; }
.badge { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.badge.meat { background: #fbdccd; color: #8a3410; }
.badge.veg { background: #d3f1ef; color: #13646c; }
.tag { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list .row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--line); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; }
.list li:first-child .row, .list li:first-child.row { border-top: 0; }
.list .row.clickable { cursor: pointer; border-radius: 8px; }
.list .row.clickable:hover { background: var(--surface-2); }
.list .when { width: 96px; flex: none; font-weight: 600; font-size: .9rem; }
.list .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list .what.open { color: var(--accent); font-weight: 600; }
.list .row.vacation .what { color: var(--primary); font-weight: 600; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.checklist li.done label span { text-decoration: line-through; color: var(--muted); }
.checklist li small { flex: none; max-width: 40%; text-align: right; }
.checklist li.sep { color: var(--muted); font-size: .85rem; font-weight: 600; padding-top: 14px; }

/* ---------- Dialoge & Meldungen ---------- */
dialog.modal {
  border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 40px);
  background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / 30%);
}
dialog.modal.wide { width: min(680px, calc(100vw - 24px)); }
dialog::backdrop { background: rgb(0 0 0 / 40%); }
dialog.modal header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
dialog.modal .modal-body { padding: 8px 16px 12px; overflow-y: auto; max-height: calc(100dvh - 180px); }
dialog.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 600px) {
  dialog.modal, dialog.modal.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92dvh; }
  dialog.modal .modal-body { max-height: calc(92dvh - 140px); }
  .inline { grid-template-columns: 1fr; gap: 0; }
}
#toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: #3b1a5a; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); transition: opacity .4s; max-width: 90vw; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
.toast.out { opacity: 0; }

/* ---------- Login ---------- */
/* Anmeldeseite: Abendhimmel mit Sonne und Spiegelung im Wasser (bewusst ohne Familienfoto, da öffentlich) */
.login-wrap {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: grid; place-items: center; padding: 20px;
  background: var(--sky);
}
.login-wrap::before {
  content: ''; position: absolute; left: 50%; bottom: 22%; width: min(60vw, 340px); aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff3b0 0%, #ffd55e 45%, #ffb347 70%, rgb(255 179 71 / 0%) 72%);
  filter: drop-shadow(0 0 40px rgb(255 200 90 / 70%));
}
.login-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background:
    repeating-linear-gradient(180deg, rgb(255 210 120 / 35%) 0 3px, transparent 3px 14px),
    linear-gradient(180deg, #7a2a7c 0%, #3b1a5a 100%);
}
.login-card { position: relative; z-index: 1; }
.login-card { width: min(380px, 100%); background: var(--surface); padding: 28px 24px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.login-card h1 { text-align: center; margin: 8px 0 20px; }
.login-logo { display: block; width: 72px; height: 72px; margin: 0 auto; }
.login-card h1 { overflow-wrap: anywhere; }
.login-sub { text-align: center; color: var(--muted); margin: -8px 0 16px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.profile-tile-wrap { position: relative; }
.profile-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 14px 6px 10px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 600;
}
.profile-tile:hover { border-color: var(--primary); background: var(--surface-2); }
.tile-x { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; font-size: .8rem; opacity: .5; }
.tile-x:hover { opacity: 1; }
.avatar-big {
  --c: var(--primary);
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff; font-size: 1.4rem; font-weight: 700;
}
.avatar-big.plus { background: var(--surface-2); color: var(--muted); }
.chosen { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 16px; font-size: 1.1rem; }
.member-item { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.member-item:first-child { border-top: 0; }
.member-item .member-row { border-top: 0; flex: 1; min-width: 0; }
.invite-box { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Startseite ---------- */
.mini-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.mini-note { padding: 10px; border-radius: 10px; font-size: .9rem; }
.mini-note p { margin: 0 0 4px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mini-note small { color: var(--muted); }
.shop-teaser, .vac-teaser { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); }
.shop-teaser { justify-content: center; font-size: 1.05rem; }
.shop-teaser strong { color: var(--primary); }
.countdown { color: var(--accent); font-weight: 700; }
.countdown.big { font-size: 1.3rem; margin: 6px 0; }

/* ---------- Essensplan ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.week-nav .icon-btn { font-size: 1.6rem; }
.week-title { display: flex; flex-direction: column; min-width: 150px; }
.week-title small { color: var(--muted); }
.days { display: flex; flex-direction: column; gap: 8px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 12px 10px; }
.day.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.day.unplanned { opacity: .6; }
.day-main { display: flex; align-items: center; gap: 14px; width: 100%; background: none; border: 0; padding: 8px 0; text-align: left; cursor: pointer; }
.day-date { display: flex; flex-direction: column; align-items: center; width: 44px; flex: none; }
.day-date strong { font-size: 1.1rem; }
.day-date small { color: var(--muted); }
.day-meal { display: flex; flex-direction: column; gap: 2px; min-width: 0; align-items: flex-start; }
.meal-name { font-weight: 600; font-size: 1.05rem; }
.meal-name.open { color: var(--accent); }
.meal-name.muted { font-weight: 400; }
.day .att { padding-left: 58px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; max-height: 40dvh; overflow-y: auto; margin: 10px 0; }
.pick { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; }
.pick:hover { background: var(--surface-2); }
.pick.on { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--surface)); }
.pick small { color: var(--muted); }

/* ---------- Rezepte ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.recipe-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.recipe-card:hover { border-color: var(--primary); }
.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { display: flex; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
.ing-list li:first-child { border-top: 0; }
.ing-list .qty { width: 90px; flex: none; text-align: right; font-weight: 600; color: var(--muted); }
.ing-edit { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.ing-row { display: grid; grid-template-columns: 1fr 80px 84px 120px 36px; gap: 6px; align-items: center; }
@media (max-width: 600px) {
  .ing-row { grid-template-columns: 1fr 70px 76px 36px; }
  .ing-row .ing-n { grid-column: 1 / -1; }
  .ing-row .ing-t { grid-column: 1 / 3; }
  .ing-row { padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
}

/* ---------- Kalender ---------- */
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 14px; }
.month-grid .dow { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cell {
  min-height: 92px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px;
  display: flex; flex-direction: column; gap: 2px; cursor: pointer; text-align: left; overflow: hidden; min-width: 0;
}
.cell.other { opacity: .45; }
.cell.today .num { background: var(--primary); color: var(--primary-text); }
.cell.sel { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.cell .num { font-size: .8rem; font-weight: 700; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cell-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pill { --c: var(--primary); font-size: .72rem; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.vacation { --c: var(--accent); }
.more { font-size: .7rem; color: var(--muted); }
@media (max-width: 600px) {
  .cell { min-height: 54px; align-items: center; }
  .cell-items { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .pill { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--c); font-size: 0; }
  .more { font-size: .6rem; }
}

/* ---------- Pinnwand ---------- */
.note-form textarea { margin-bottom: 8px; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.swatch.on { border-color: var(--text); transform: scale(1.1); }
.gelb { background: var(--note-gelb); }
.blau { background: var(--note-blau); }
.gruen { background: var(--note-gruen); }
.rosa { background: var(--note-rosa); }
.lila { background: var(--note-lila); }
.notes { columns: 260px; column-gap: 12px; }
.note { break-inside: avoid; position: relative; padding: 16px 14px 8px; border-radius: 4px 4px 14px 4px; margin-bottom: 12px; box-shadow: 0 2px 8px rgb(0 0 0 / 10%); }
.note.pinned { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.note .pin { position: absolute; top: -8px; right: 10px; font-size: 1.1rem; }
.note p { margin: 0 0 10px; font-size: 1.02rem; }
.note footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); }
.note-actions { display: flex; }
.note-actions .icon-btn { width: 30px; height: 30px; font-size: .95rem; }

/* ---------- Urlaub ---------- */
.vac-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vac-list.past { opacity: .75; }
.vac-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); border-top: 5px solid var(--line); }
.vac-card.geplant { border-top-color: var(--primary); }
.vac-card.gebucht { border-top-color: var(--accent); }
.vac-card:hover { border-color: var(--primary); }
.vac-top, .vac-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vac-top strong { font-size: 1.15rem; }
.status { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.status.geplant { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); color: var(--primary); }
.status.gebucht { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); color: var(--accent); }
.vac-info p { margin: 6px 0; }
.notes-text { background: var(--surface-2); padding: 10px 12px; border-radius: 10px; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.progress span { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.pack-group { font-size: .85rem; color: var(--muted); margin: 14px 0 2px; }

/* ---------- Einstellungen ---------- */
.member-list { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; flex-wrap: wrap; }
.member-row:first-child { border-top: 0; }
.member-row:disabled { cursor: default; }
.member-row:not(:disabled):hover { background: var(--surface-2); }
.member-row .muted { font-size: .85rem; }
.day-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fixed-row { display: grid; grid-template-columns: 1fr 130px 1fr 36px; gap: 6px; margin-bottom: 6px; }
@media (max-width: 600px) { .fixed-row { grid-template-columns: 1fr 1fr 36px; } .fixed-row input { grid-column: 1 / -1; } }

/* ---------- Startbildschirm mit Familienfoto ---------- */
/* Das Foto wird immer vollständig gezeigt; eine weichgezeichnete Kopie füllt die Ränder.
   Der Text steht oben im Himmel, damit keine Gesichter verdeckt werden. */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; margin-bottom: 16px;
  height: clamp(360px, 64vh, 620px); background: var(--sky); box-shadow: var(--shadow);
}
.hero-blur {
  position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px);
  object-fit: cover; filter: blur(28px) saturate(1.3) brightness(.85);
}
.hero-photo { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(42 22 56 / 75%) 0%, rgb(42 22 56 / 35%) 20%, rgb(42 22 56 / 0%) 36%);
}
.hero-text { position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: 18px 20px; color: #fff; }
.hero-text h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0; text-shadow: 0 2px 12px rgb(0 0 0 / 45%); }
.hero-date { margin: 0 0 2px; font-weight: 700; opacity: .92; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; text-shadow: 0 1px 6px rgb(0 0 0 / 40%); }
.hero-meal {
  display: inline-block; margin: 10px 0 0; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: rgb(255 255 255 / 18%); backdrop-filter: blur(6px); border: 1px solid rgb(255 255 255 / 35%);
}
.hero.no-photo { height: 160px; }
.hero.no-photo::after { background: none; }
@media (max-width: 600px) {
  /* Handy: Hochformat-Foto füllt den Rahmen, ohne Ränder */
  .hero { margin-left: -6px; margin-right: -6px; border-radius: 18px; }
  .hero-photo { object-fit: cover; object-position: 50% 40%; }
}

/* ---------- Vice-City-Schrift: App-Name, Seitentitel, Begrüßung ---------- */
:root { --script: 'Kaushan Script', 'Segoe Script', 'Brush Script MT', cursive; }
.brand span {
  font-family: var(--script); font-weight: 400; font-size: 1.35rem; letter-spacing: .01em;
  color: var(--primary); text-shadow: 0 0 10px color-mix(in srgb, var(--primary) 35%, transparent);
}
.page-title { font-family: var(--script); font-weight: 400; font-size: 2rem; color: var(--primary); letter-spacing: .01em; }
.login-card h1 {
  font-family: var(--script); font-weight: 400; font-size: clamp(1.5rem, 8vw, 1.95rem); line-height: 1.2; white-space: nowrap;
  color: #ff5fa8; text-shadow: 0 0 2px #fff, 0 0 10px rgb(255 95 168 / 70%), 2px 2px 0 #3b1a5a;
}
.hero-text h1 {
  font-family: var(--script); font-weight: 400; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1;
  color: #fff; text-shadow: 0 0 4px #ff5fa8, 0 0 14px #ff2d95, 0 0 28px rgb(255 45 149 / 60%), 2px 3px 0 #3b1a5a;
}
.chosen strong { font-family: var(--script); font-weight: 400; font-size: 1.5rem; color: var(--primary); }
.login-logo { border-radius: 18px; }
.brand img { border-radius: 8px; }

/* ---------- Abstimmung ---------- */
.vote-banner {
  margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; font-weight: 600;
  background: color-mix(in srgb, var(--neon) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--neon) 45%, var(--line));
}
.vote-box { margin: 10px 0 0 58px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.vote-box .hint { margin: 0 0 8px; }
.vote-cand { padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.vote-cand.lead { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.vote-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.vote-top strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vote-count { font-size: .85rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.vote-top .icon-btn { width: 28px; height: 28px; font-size: .85rem; }
.vote-box select { width: auto; flex: 1; min-width: 180px; }
.badge.vote { background: color-mix(in srgb, var(--neon) 18%, var(--surface)); color: var(--text); }
.vote-start { margin-bottom: 12px; border-color: var(--neon); }
@media (max-width: 600px) { .vote-box { margin-left: 0; } }
.vote-cand .chip.off { text-decoration: none; opacity: .8; }

/* ---------- Einkaufsliste: Umschalter und Ansicht nach Tagen ---------- */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 8px; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.shop-days { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.shop-day { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.shop-day.all-done { opacity: .6; }
.shop-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.shop-day-dish { font-weight: 600; color: var(--primary); }
@media (max-width: 600px) { .card-head:has(.seg) { flex-wrap: wrap; } }

/* ---------- Benachrichtigungen ---------- */
.push-state { font-weight: 700; color: var(--muted); margin-right: 6px; }
.push-state.on { color: var(--ok); }
.warn-box { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); }

/* ---------- Eigene Erinnerungszeit, Erwähnungen, Rezept-Import und KI ---------- */
.remind-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.remind-custom input.remind-amount { width: 80px; }
.remind-custom select, .remind-custom input[type=time] { width: auto; }
.mention-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.chip.small-text { padding: 2px 9px; font-size: .78rem; background: transparent; color: var(--c); }
.chip.small-text.all { --c: var(--primary); }
.mention { font-weight: 700; color: var(--c, var(--primary)); }
.import-card summary { cursor: pointer; font-weight: 700; color: var(--primary); }
.import-card[open] summary { margin-bottom: 10px; }
.import-card .add-row input { min-width: 0; }
.chat-log { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.msg { padding: 8px 11px; border-radius: 12px; max-width: 85%; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--primary); color: var(--primary-text); }
.msg.ai { align-self: flex-start; background: var(--surface-2); }
.msg.wait { opacity: .7; font-style: italic; }
.ideas { display: flex; flex-direction: column; gap: 10px; }
.idea { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.idea p { margin: 0; }

/* ---------- Essenswünsche ---------- */
.wish-form { display: flex; flex-direction: column; gap: 8px; }
.wish-form h2 { margin-bottom: 2px; }
.wish-form .row-actions select { width: auto; flex: 1; min-width: 140px; }
.wish-list { list-style: none; margin: 0; padding: 0; }
.wish { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.wish:first-child { border-top: 0; }
.wish-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wish-main a { font-weight: 700; text-decoration: none; }
.wish .row-actions { margin-top: 0; }
.wish .row-actions select { width: auto; }
.wished-by { color: var(--accent); font-weight: 700; }
.recipe-card.wished { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }

/* ---------- Gruscheln ---------- */
.gruschel-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gruschel-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 70px;
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-weight: 600;
}
.gruschel-tile:hover { border-color: var(--primary); }
.gruschel-tile .avatar-big { width: 42px; height: 42px; font-size: 1.1rem; }
.gruschel-tile small { font-size: .7rem; font-weight: 400; }
.gruschel-in {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 8px; border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--line));
}
.gruschel-burst { position: absolute; top: 0; left: 50%; font-size: 1.6rem; pointer-events: none; animation: gruschel-up .9s ease-out forwards; }
@keyframes gruschel-up { from { transform: translate(-50%, 0) scale(.6); opacity: 1; } to { transform: translate(-50%, -48px) scale(1.4); opacity: 0; } }
.wiggle { animation: wiggle .45s ease-in-out 2; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .wiggle, .gruschel-burst { animation: none; } }

/* ---------- Aufgaben ---------- */
.todo-form .add-row { margin-bottom: 6px; }
.small-label { display: inline-flex; align-items: center; gap: 4px; font-size: .9rem; color: var(--muted); }
.small-label input[type=date] { width: auto; min-height: 34px; padding: 4px 8px; }
.todo-group { font-size: .85rem; color: var(--muted); margin: 12px 0 2px; }
.todo-group:first-of-type { margin-top: 0; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list .todo { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.todo-list .todo:first-child { border-top: 0; }
.todo-list .todo label { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.todo-list .todo label input { margin-top: 2px; }
.todo-text { overflow-wrap: anywhere; }
.todo-list .todo.done .todo-text { text-decoration: line-through; color: var(--muted); }
.todo-list .todo .due { color: var(--muted); }
.todo-list .todo .due.late { color: var(--danger); font-weight: 700; }
.todo-list .todo .chips { flex: none; }
.late-badge { background: color-mix(in srgb, var(--danger) 15%, var(--surface)); color: var(--danger); margin-left: 6px; }
.more-link { display: inline-block; margin-top: 6px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.pill.todo { --c: var(--neon); }
.grid-cell { display: contents; }
@media (max-width: 1000px) { .nav a { padding: 4px 2px; } .nav .lbl { font-size: .66rem; } }

/* Einkaufsliste: Abgehaktes gesammelt ganz unten */
.done-section summary { margin-top: 0; font-size: 1.05rem; }
.done-section ul.checklist { padding-left: 0; font-size: 1rem; color: inherit; }
