/* Zuhause – Gestaltung
   Dunkles Nachtblau als Grund, zwei frei wählbare Akzentfarben (Standard: Blau + Meergrün).
   Personenfarben als kleine Punkte zeigen überall, wer etwas eingetragen hat. */

:root {
  --accent: #2ee6a6;
  --accent-2: #2ee6a6;
  --on-accent: #fff;
  --on-accent-2: #0c1420;
  --radius-sheet: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  color-scheme: dark;
}

:root[data-theme="dark"] {
  --bg: #06162b;
  --bg-2: #091d37;
  --surface: #0c2340;
  --raised: #142e52;
  --line: #1b3a63;
  --line-soft: #142f52;
  --text: #e8f1ff;
  --muted: #8fa6c4;
  --faint: #7088a8;
  --danger: #f07a72;
  --plus: #5fd3a8;
  --minus: #f2a65a;
  --shadow: 0 18px 50px rgba(3, 8, 16, .55);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f5f9;
  --bg-2: #eaeff5;
  --surface: #ffffff;
  --raised: #f5f8fb;
  --line: #d9e1eb;
  --line-soft: #e6ebf2;
  --text: #17212f;
  --muted: #5b6b80;
  --faint: #8494a8;
  --danger: #d1453b;
  --plus: #138a62;
  --minus: #b9651c;
  --shadow: 0 18px 50px rgba(20, 34, 56, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}
body.has-sheet { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.tiny { width: 15px; height: 15px; vertical-align: -3px; }
img { max-width: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- Rahmen ---------- */
#app.app-mode { min-height: 100dvh; }
#view { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); outline: none; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
.tabbar a {
  position: relative; display: grid; place-items: center; align-content: center; gap: 3px;
  color: var(--muted); font-size: 11.5px; font-weight: 500;
}
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a.active { color: var(--text); }
.tabbar a.active::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.nav-badge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}

.rail { display: none; }

@media (min-width: 900px) {
  #app.app-mode { display: grid; grid-template-columns: 236px 1fr; }
  .tabbar { display: none; }
  #view { padding-bottom: 48px; max-width: 760px; width: 100%; justify-self: center; }
  .rail {
    display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100dvh;
    padding: 20px 12px; border-right: 1px solid var(--line-soft); background: var(--bg-2);
  }
  .rail-brand { display: flex; align-items: center; gap: 10px; padding: 6px 12px 22px; font-weight: 650; font-size: 17px; }
  .rail-brand img { border-radius: 9px; }
  .rail a {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: var(--radius-sm); color: var(--muted); font-weight: 500;
  }
  .rail a:hover { background: var(--surface); color: var(--text); }
  .rail a.active { background: var(--surface); color: var(--text); }
  .rail a.active::before {
    content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
    background: linear-gradient(var(--accent), var(--accent-2));
  }
  .rail .nav-badge { position: static; margin-left: auto; }
  .rail a:nth-of-type(5), .rail a:nth-of-type(11), .rail a:nth-of-type(14) { margin-top: 14px; }
  .back-mobile { display: none !important; }
}

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  min-height: 60px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar h1 { font-size: 22px; font-weight: 680; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar h1.with-badge { display: flex; align-items: center; gap: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }

.page { padding: 4px 16px 16px; }
.view-finanzen .page, .view-kalender .page { padding-bottom: 92px; }

/* ---------- Grundelemente ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--raised); color: var(--text); font-weight: 600; font-size: 15px;
  border: 1px solid var(--line);
  transition: transform .12s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; }
.btn.is-disabled { opacity: .55; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.small .ic { width: 18px; height: 18px; }
.btn.wide { width: 100%; }
.btn.round { width: 46px; min-height: 46px; padding: 0; border-radius: 50%; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--text); flex: none;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn.subtle { color: var(--faint); width: 36px; height: 36px; }
.icon-btn:disabled { opacity: .3; }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14px; padding: 8px 2px; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 15;
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 35%, transparent);
}
.fab .ic { width: 28px; height: 28px; }
@media (min-width: 900px) { .fab { bottom: 28px; right: max(28px, calc((100vw - 236px - 760px) / 2 + 28px)); } }

.who-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--who); flex: none; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700; display: inline-grid; place-items: center; }

.empty { text-align: center; padding: 48px 20px; color: var(--muted); max-width: 420px; margin: 0 auto; }
.empty-title { color: var(--text); font-weight: 650; font-size: 17px; margin-bottom: 6px; }
.hint { color: var(--faint); font-size: 13.5px; padding: 18px 4px; text-align: center; }

.group-title { font-size: 13px; font-weight: 650; color: var(--muted); padding: 18px 4px 8px; letter-spacing: .01em; }
.store-badge {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: var(--c); font-weight: 750; font-size: 17px;
}
.store-badge .ic { width: 22px; height: 22px; }
.store-badge.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }
.store-badge.sm .ic { width: 17px; height: 17px; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-row { display: flex; gap: 10px; }
.field-row .grow { flex: 1; }
.field.time { width: 38%; max-width: 150px; }
.field.qty-field { width: 104px; }
input:not([type=checkbox]):not([type=range]):not([type=color]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); font-size: 16px;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=color] { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 4px; }
.field-hint { font-size: 13px; color: var(--faint); }
.form-error { color: var(--danger); font-size: 14px; font-weight: 500; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding-top: 6px; }
.row-actions .btn.primary { min-width: 130px; }
.row-actions .btn.danger.ghost { margin-right: auto; }

.switch-line { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 6px 0; font-weight: 500; }
.switch-line small { display: block; color: var(--faint); font-weight: 400; font-size: 13px; margin-top: 2px; }
input[type=checkbox][role=switch] {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 48px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background .2s;
}
input[type=checkbox][role=switch]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
input[type=checkbox][role=switch]:checked { background: var(--accent); }
input[type=checkbox][role=switch]:checked::after { transform: translateX(20px); }
.check-line { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.check-line input { width: 20px; height: 20px; accent-color: var(--accent); }

.seg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; min-height: 38px; padding: 0 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.seg.grid2 { display: grid; grid-template-columns: 1fr 1fr; }
.seg.grid2 button { white-space: normal; line-height: 1.2; padding: 6px 8px; }
.topbar .seg { padding: 2px; }
.topbar .seg button { min-height: 32px; padding: 0 12px; font-size: 13.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 34px; padding: 0 12px; border-radius: 17px; font-size: 13.5px; font-weight: 550;
  border: 1px solid var(--line); background: var(--surface); white-space: nowrap;
}
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--c, var(--accent)) 22%, var(--surface)); border-color: var(--c, var(--accent)); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }

/* ---------- Sheets & Toasts ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(5, 10, 18, .55); opacity: 0; transition: opacity .2s; }
.sheet {
  position: relative; width: 100%; max-height: calc(100dvh - 40px - var(--safe-t)); overflow: auto;
  background: var(--surface); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  padding: 6px 18px calc(22px + var(--safe-b)); box-shadow: var(--shadow);
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1);
  overscroll-behavior: contain;
}
.sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 6px; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 0 12px; position: sticky; top: -6px; background: var(--surface); z-index: 2; }
.sheet-head h2 { flex: 1; font-size: 19px; font-weight: 680; }
.sheet-text { color: var(--muted); }
.sheet-text.small { font-size: 13.5px; }
@media (min-width: 640px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 480px; border-radius: var(--radius-sheet); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; padding-bottom: 22px; }
  .sheet.wide { max-width: 680px; }
  .sheet::before { display: none; }
  .sheet-wrap.in .sheet { opacity: 1; }
}

.action-list { display: grid; gap: 4px; }
.action-item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-radius: 12px; font-weight: 550; text-align: left; }
.action-item:hover, .action-item:active { background: var(--raised); }
.action-item.danger { color: var(--danger); }

#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 200; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 14px; max-width: 520px;
  padding: 12px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-weight: 550; font-size: 14.5px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s;
}
.toast.in { opacity: 1; transform: none; }
.toast button { color: var(--accent); font-weight: 700; white-space: nowrap; }
:root[data-theme="dark"] .toast button { color: color-mix(in srgb, var(--accent) 80%, #000); }

.sync-pill {
  position: fixed; top: calc(var(--safe-t) + 8px); left: 50%; transform: translateX(-50%); z-index: 50;
  padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 600;
  background: var(--raised); border: 1px solid var(--line); color: var(--muted); max-width: calc(100vw - 32px);
}
.sync-pill.off { color: var(--minus); }
.sync-pill.err { color: var(--danger); }

/* ---------- Willkommen / Anmeldung ---------- */
#app.screen-mode { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px calc(24px + var(--safe-b)); }
.welcome { width: 100%; max-width: 420px; display: grid; gap: 22px; }
.brand { display: grid; justify-items: center; gap: 12px; }
.brand img { border-radius: 20px; }
.brand h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.lead { text-align: center; color: var(--muted); font-size: 16.5px; }
.welcome-actions { display: grid; gap: 10px; }
.fine { text-align: center; color: var(--faint); font-size: 13px; }
.card-form { background: var(--surface); border: 1px solid var(--line-soft); padding: 20px; border-radius: 18px; }
.card-form h2 { font-size: 19px; }

/* ---------- Start ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: calc(var(--safe-t) + 12px); }
.hero { padding: 14px 4px 6px; }
.hero-greet { color: var(--muted); font-weight: 550; }
.hero-date { font-size: clamp(30px, 8.5vw, 40px); line-height: 1.08; font-weight: 720; letter-spacing: -.025em; margin-top: 4px; }
.horizon {
  margin-top: 16px; height: 3px; border-radius: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2) 55%, transparent);
  transform-origin: left; animation: horizon .9s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes horizon { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }

.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qa {
  display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-soft); font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.qa .ic { color: var(--accent); }
.qa:active { transform: scale(.97); }
.qa::before { content: "+"; display: none; }

.panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 6px 14px 14px; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 8px 0 8px; color: var(--muted); }
.panel-head h2 { font-size: 15px; font-weight: 680; color: var(--text); }
.panel-head .ic { margin-left: auto; }
.panel-head .badge + .ic, .panel-count + .ic { margin-left: 0; }
.panel-count { margin-left: auto; font-size: 13.5px; }
.panel-head .badge { margin-left: auto; }
.panel-empty { color: var(--faint); font-size: 14px; padding: 2px 0 2px; }
.sub-head { font-size: 13px; color: var(--muted); font-weight: 650; padding: 12px 0 4px; }
.store-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.store-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-soft); font-weight: 550; font-size: 14.5px; }
.store-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.store-chip b { color: var(--muted); font-weight: 650; }
.last-msg { display: flex; align-items: baseline; gap: 10px; }
.lm-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-time { color: var(--faint); font-size: 13px; white-space: nowrap; }
.split-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.bal-line { font-weight: 600; font-size: 15px; }
.bal-line.plus { color: var(--plus); } .bal-line.minus { color: var(--minus); }
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.mini-grid img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--raised); width: 100%; }
@media (max-width: 400px) { .split-panels { grid-template-columns: 1fr; } }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--who) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--who) 45%, transparent); margin-bottom: 10px;
}
.banner small { display: block; color: var(--muted); font-size: 13px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--who, var(--accent-2)); flex: none; box-shadow: 0 0 0 0 var(--who, var(--accent-2)); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--who, var(--accent-2)) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* ---------- Einkauf ---------- */
.list-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.list-card { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--surface); min-height: 68px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.list-card:active { background: var(--raised); }
.list-card-main { flex: 1; min-width: 0; display: grid; }
.list-card-title { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.list-card-sub { color: var(--faint); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 700; font-size: 14px; }
.count.zero { background: transparent; color: var(--faint); }

.page-list { padding-top: 0; }
.add-bar { position: sticky; top: calc(60px + var(--safe-t)); z-index: 5; display: flex; gap: 8px; padding: 6px 0 10px; background: var(--bg); }
.add-bar input { flex: 1; }
.suggest { position: absolute; top: 100%; left: 0; right: 54px; margin: -6px 0 0; padding: 4px; list-style: none; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 6; }
.suggest button { width: 100%; text-align: left; padding: 10px 12px; border-radius: 9px; }
.suggest button:hover { background: var(--surface); }

.trip-start { margin: 2px 0 6px; color: var(--muted); }
.trip-me { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent-2) 14%, var(--surface)); margin: 2px 0 6px; --who: var(--accent-2); }
.trip-me span:not(.pulse) { flex: 1; font-weight: 550; }

.items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.item { display: flex; align-items: center; gap: 4px; min-height: 54px; padding: 0 4px 0 6px; border-top: 1px solid var(--line-soft); }
.item:first-child { border-top: 0; }
.check { width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.check .ic { width: 26px; height: 26px; padding: 4px; border-radius: 50%; border: 2px solid var(--line); color: transparent; transition: background .15s, border-color .15s, color .15s; stroke-width: 2.6; }
.item.done .check .ic { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent-2); }
.item-main { flex: 1; min-width: 0; display: grid; padding: 8px 0; cursor: pointer; }
.item-name { font-weight: 550; font-size: 16px; }
.qty { color: var(--accent); font-weight: 650; font-size: 14.5px; margin-left: 4px; }
.item-note { color: var(--faint); font-size: 13.5px; }
.item.done .item-name { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--faint); }
.item.done .qty { color: var(--faint); }
.item .who-dot { margin: 0 4px; }
.pending { color: var(--faint); display: grid; }
.pending .ic { width: 16px; height: 16px; }
.done-head { display: flex; justify-content: space-between; padding: 14px 4px 6px; }

.order-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-soft); border-radius: 12px; max-height: 260px; overflow: auto; }
.order-list li { display: flex; align-items: center; padding: 0 4px 0 12px; min-height: 42px; border-top: 1px solid var(--line-soft); font-size: 14.5px; }
.order-list li:first-child { border-top: 0; }
.order-list li span { flex: 1; }

/* ---------- Kalender ---------- */
.month-head { display: flex; align-items: center; gap: 4px; padding: 4px 0 10px; }
.month-head h2 { flex: 1; text-align: center; font-size: 18px; font-weight: 680; }
.month-head .btn { margin-left: 6px; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; touch-action: pan-y; }
.wd { text-align: center; font-size: 12px; font-weight: 650; color: var(--faint); padding-bottom: 6px; }
.day { aspect-ratio: 1 / 1.05; border-radius: 12px; display: grid; grid-template-rows: 1fr auto; justify-items: center; padding: 6px 0 7px; position: relative; }
.day .num { font-size: 15.5px; font-weight: 550; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.day.out .num { color: var(--faint); opacity: .6; }
.day.today .num { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.day.sel { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.dots { display: flex; gap: 3px; height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.day-panel { margin-top: 14px; }
.day-title { font-size: 15px; font-weight: 680; padding: 6px 4px 8px; }
.day-title small { color: var(--faint); font-weight: 500; margin-left: 6px; }
.day-title.is-today { color: var(--accent); }
.empty-day { width: 100%; text-align: left; padding: 14px; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--faint); }
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.event-row { display: grid; grid-template-columns: 4px 74px 1fr; gap: 12px; align-items: center; padding: 10px 12px 10px 10px; border-radius: 12px; background: var(--bg-2); cursor: pointer; }
.panel .event-row { background: var(--bg); }
.page > .day-panel .event-row, .agenda-day .event-row { background: var(--surface); }
.ev-bar { align-self: stretch; border-radius: 2px; background: var(--who); }
.ev-time { display: grid; font-variant-numeric: tabular-nums; line-height: 1.25; }
.ev-time b { font-weight: 650; font-size: 15px; }
.ev-time small { color: var(--faint); font-size: 12.5px; }
.ev-main { display: grid; min-width: 0; }
.ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta { color: var(--faint); font-size: 13px; }
.agenda-day { margin-bottom: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; color: var(--faint); font-size: 13px; padding: 18px 4px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.event-detail { display: grid; gap: 14px; }
.ed-when { font-size: 16px; border-left: 3px solid var(--who); padding-left: 12px; }
.ed-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ed-facts li { display: flex; align-items: center; gap: 12px; }
.ed-facts .ic { color: var(--muted); }
.ed-facts .who-dot { margin: 0 6px; width: 10px; height: 10px; }
.ed-notes { align-items: flex-start !important; white-space: pre-wrap; }
.ed-by { color: var(--faint); font-size: 13px; }

/* ---------- Chat ---------- */
body.in-chat #view { padding-bottom: 0; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 60px - var(--safe-t) - var(--tab-h) - var(--safe-b)); }
@media (min-width: 900px) { .chat { height: calc(100dvh - 60px); } }
.chat-scroll { flex: 1; overflow-y: auto; padding: 4px 14px 10px; overscroll-behavior: contain; }
.chat-list { display: flex; flex-direction: column; gap: 3px; }
.day-sep { text-align: center; margin: 14px 0 8px; }
.day-sep span { font-size: 12.5px; font-weight: 600; color: var(--faint); background: var(--bg-2); padding: 4px 10px; border-radius: 10px; }
.msg { display: flex; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg.mine { justify-content: flex-end; }
.bubble { max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-soft); position: relative; }
.msg.mine .bubble { background: var(--accent); color: var(--on-accent); border-color: transparent; border-bottom-right-radius: 6px; }
.msg.theirs .bubble { border-bottom-left-radius: 6px; }
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.bubble a { text-decoration: underline; }
.meta { display: flex; justify-content: flex-end; align-items: center; gap: 3px; font-size: 11.5px; opacity: .72; margin-top: 2px; font-variant-numeric: tabular-nums; }
.meta .ic.tiny { width: 15px; height: 15px; }
.msg-photo { display: block; width: min(260px, 60vw); max-height: 320px; overflow: hidden; border-radius: 12px; margin: -2px -6px 6px; background: var(--raised); position: relative; }
.msg-photo img { width: 100%; height: 100%; object-fit: cover; }
.msg-photo.uploading::after, .tile.uploading::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35) linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.chat-compose { border-top: 1px solid var(--line-soft); background: var(--bg); padding: 6px 10px 8px; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.quick:empty { display: none; }
.compose { display: flex; align-items: flex-end; gap: 6px; }
.compose textarea { min-height: 46px; max-height: 140px; resize: none; border-radius: 23px; padding: 11px 16px; line-height: 1.35; }
.attach { cursor: pointer; color: var(--muted); height: 46px; }

/* ---------- Fotos ---------- */
.meter { display: grid; gap: 6px; padding: 4px 2px 6px; font-size: 13px; color: var(--muted); }
.meter-bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.meter-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.meter.warn .meter-bar i { background: var(--minus); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 6px; } }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface); border-radius: 4px; }
@media (min-width: 640px) { .tile { border-radius: 10px; } }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.tile img.loaded, .msg-photo img.loaded, .mini-grid img.loaded { opacity: 1; }
.msg-photo img, .mini-grid img { opacity: 0; transition: opacity .25s; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.viewer .sheet { background: #05080d; color: #e7edf5; max-width: none; height: 100dvh; max-height: none; border-radius: 0; padding: calc(4px + var(--safe-t)) 0 calc(12px + var(--safe-b)); display: flex; flex-direction: column; }
.viewer .sheet::before { display: none; }
.viewer .sheet-head { background: transparent; padding: 4px 10px; position: static; }
.viewer .sheet-head .icon-btn { color: #fff; }
.viewer .sheet-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.viewer-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; touch-action: pan-y; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: filter .3s; }
.viewer-stage img.soft { filter: blur(2px); }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; }
.viewer-nav.prev { left: 10px; } .viewer-nav.next { right: 10px; }
@media (hover: none) { .viewer-nav { display: none; } }
.viewer-info { padding: 10px 16px 4px; }
.viewer-cap { font-size: 16px; font-weight: 550; margin-bottom: 4px; }
.viewer-meta { color: #9aa8bb; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewer-actions { display: flex; gap: 8px; padding: 8px 16px 0; justify-content: center; flex-wrap: wrap; }
.viewer-actions .btn { color: #e7edf5; border-color: #2b3647; }
.viewer-actions .btn.danger { color: var(--danger); background: transparent; border-color: #2b3647; }
@media (min-width: 640px) { .viewer.sheet-wrap { padding: 0; } .viewer .sheet { transform: none; opacity: 0; } }

/* ---------- Finanzen ---------- */
.balance { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 18px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); margin-bottom: 12px; }
.balance-text { font-size: 18px; font-weight: 680; letter-spacing: -.01em; }
.balance.plus { border-color: color-mix(in srgb, var(--plus) 45%, transparent); }
.balance.plus .balance-text { color: var(--plus); }
.balance.minus { border-color: color-mix(in srgb, var(--minus) 45%, transparent); }
.balance.minus .balance-text { color: var(--minus); }
.fin-summary { padding: 4px 2px 14px; }
.fin-total { color: var(--muted); }
.fin-total span { font-size: 28px; font-weight: 720; color: var(--text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-right: 4px; }
.fin-payers { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin: 4px 0 12px; }
.fin-payers > span { display: inline-flex; align-items: center; gap: 6px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.bar-val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 74px; text-align: right; }
.expenses { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.exp { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line-soft); cursor: pointer; }
.exp:first-child { border-top: 0; }
.exp-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, var(--surface)); color: var(--c); flex: none; }
.exp-icon .ic { width: 20px; height: 20px; }
.exp-main { flex: 1; min-width: 0; display: grid; }
.exp-title { font-weight: 600; }
.exp-meta { color: var(--faint); font-size: 13px; }
.exp-amount { font-weight: 680; font-variant-numeric: tabular-nums; }
.exp.settle .exp-title, .exp.settle .exp-amount { color: var(--muted); }
.amount-field { position: relative; }
.amount-field input { font-size: 26px !important; font-weight: 700; padding-right: 40px !important; font-variant-numeric: tabular-nums; }
.amount-field b { position: absolute; right: 14px; bottom: 11px; font-size: 22px; color: var(--muted); }
.custom-split { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.custom-split input { flex: 1; accent-color: var(--accent); }
.custom-split output { font-size: 13.5px; color: var(--muted); min-width: 120px; }

/* ---------- Mehr & Einstellungen ---------- */
.more-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.more-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line-soft); }
.more-list li:first-child .more-row { border-top: 0; }
.more-row > .ic:first-child { color: var(--accent); }
.more-row span { flex: 1; display: grid; }
.more-row small { color: var(--faint); font-size: 13px; }

.settings { display: grid; gap: 14px; }
.set-group { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.set-group h2 { font-size: 15px; font-weight: 680; }
.set-note { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.set-list { list-style: none; margin: 0 -14px; padding: 0; }
.set-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; font-weight: 550; border-top: 1px solid var(--line-soft); }
.set-list li:first-child .set-row { border-top: 0; }
.set-row .ic.tiny { margin-left: auto; color: var(--faint); }
.set-row.add { color: var(--accent); }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; font-weight: 550; }
.preset i { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.preset[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.colors-custom .field { flex: 1; }
.push-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg); }
.push-state p { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.push-state.on p { color: var(--plus); }
.notify-list { display: grid; gap: 2px; }
.link-box { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.version { color: var(--faint); font-size: 12.5px; text-align: center; }
.steps { margin: 12px 0; padding-left: 22px; display: grid; gap: 16px; }
.steps li { display: grid; gap: 8px; justify-items: start; }
.steps li::marker { font-weight: 700; color: var(--accent); }
.push-setup pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; background: var(--bg); padding: 10px; border-radius: 10px; max-height: 220px; overflow: auto; }
.push-setup code { background: var(--bg); padding: 1px 6px; border-radius: 6px; }
details summary { cursor: pointer; color: var(--accent); font-size: 14px; }

/* ---------- Aufgaben ---------- */
.chore-filter { padding: 2px 0 6px; }
.room-dot { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--room); margin-right: 6px; vertical-align: 1px; }
.chore-due { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; padding: 0 2px; font-variant-numeric: tabular-nums; }
.chore.late .chore-due { color: var(--minus); }
.chore.late .check .ic { border-color: color-mix(in srgb, var(--minus) 70%, transparent); }
.chore .who-dot { margin: 0 10px 0 6px; }
.group-title.late { color: var(--minus); }
.items.compact .item { min-height: 48px; }
.items.compact .item-name { font-size: 15px; }
.panel .items { background: var(--bg); }
.more-link { display: block; padding: 8px 2px 0; color: var(--accent); font-weight: 600; font-size: 14px; }
.fair { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); margin: 6px 0 4px; }
.fair-title { font-size: 13px; font-weight: 650; color: var(--muted); }
.fair-bar { display: flex; gap: 3px; height: 8px; }
.fair-bar i { background: var(--c); border-radius: 4px; min-width: 8px; }
.fair-legend { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.fair-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.fair-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.empty-actions { display: grid; gap: 8px; margin-top: 18px; }
.tpl-list { display: grid; gap: 2px; max-height: 52dvh; overflow: auto; margin: 0 -4px; padding: 0 4px; }
.check-line.tpl { padding: 8px 0; border-top: 1px solid var(--line-soft); align-items: flex-start; }
.check-line.tpl:first-child { border-top: 0; }
.check-line.tpl span { display: grid; }
.check-line.tpl small { color: var(--faint); font-size: 13px; }
.check-line.tpl input { margin-top: 2px; flex: none; }
.quick-actions { grid-template-columns: repeat(4, 1fr); }
.qa { font-size: 13px; padding: 12px 4px; }

/* ---------- Bereichsfarben (Einstellungen → Aussehen) ---------- */
body[data-area="einkauf"] { --accent: var(--c-einkauf); --accent-2: var(--c-einkauf); --on-accent: var(--on-c-einkauf); --on-accent-2: var(--on-c-einkauf); }
body[data-area="kalender"] { --accent: var(--c-kalender); --accent-2: var(--c-kalender); --on-accent: var(--on-c-kalender); --on-accent-2: var(--on-c-kalender); }
body[data-area="chat"] { --accent: var(--c-chat); --accent-2: var(--c-chat); --on-accent: var(--on-c-chat); --on-accent-2: var(--on-c-chat); }
body[data-area="aufgaben"] { --accent: var(--c-aufgaben); --accent-2: var(--c-aufgaben); --on-accent: var(--on-c-aufgaben); --on-accent-2: var(--on-c-aufgaben); }
body[data-area="fotos"] { --accent: var(--c-fotos); --accent-2: var(--c-fotos); --on-accent: var(--on-c-fotos); --on-accent-2: var(--on-c-fotos); }
body[data-area="finanzen"] { --accent: var(--c-finanzen); --accent-2: var(--c-finanzen); --on-accent: var(--on-c-finanzen); --on-accent-2: var(--on-c-finanzen); }
body[data-area="profil"] { --accent: var(--c-profil); --accent-2: var(--c-profil); --on-accent: var(--on-c-profil); --on-accent-2: var(--on-c-profil); }
body[data-area="rezepte"] { --accent: var(--c-rezepte); --accent-2: var(--c-rezepte); --on-accent: var(--on-c-rezepte); --on-accent-2: var(--on-c-rezepte); }
body[data-area="blumen"] { --accent: var(--c-blumen); --accent-2: var(--c-blumen); --on-accent: var(--on-c-blumen); --on-accent-2: var(--on-c-blumen); }
body[data-area="steuerung"] { --accent: var(--c-steuerung); --accent-2: var(--c-steuerung); --on-accent: var(--on-c-steuerung); --on-accent-2: var(--on-c-steuerung); }
body:not([data-area=""]) .topbar h1 { color: var(--accent); }
.tabbar a.active { color: var(--accent); }
.designs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.design { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px; border-radius: 12px; background: var(--d-bg); border: 2px solid var(--d-cd); color: #e8f1ff; font-size: 13.5px; font-weight: 600; text-align: left; }
.design i { width: 20px; height: 20px; border-radius: 50%; background: var(--d-ac); box-shadow: 0 0 0 4px var(--d-cd); flex: none; }
.design[aria-pressed="true"] { border-color: var(--d-ac); box-shadow: 0 0 0 1px var(--d-ac); }
.area-colors { display: grid; gap: 4px; margin-top: 6px; }
.area-color { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14.5px; }
.area-color i { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.area-color span { flex: 1; }
.area-color input[type=color] { width: 58px; height: 36px; flex: none; }

/* ---------- Einkauf: Läden untereinander ---------- */
.topbar-count { color: var(--muted); font-size: 14px; font-weight: 600; }
.shop-stack { display: grid; gap: 12px; }
.shop-sec { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.shop-head { display: flex; align-items: center; padding-right: 4px; }
.shop-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 8px 0 12px; text-align: left; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.shop-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.shop-count { color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.shop-chev { transition: transform .2s; color: var(--muted); }
.shop-toggle[aria-expanded="true"] .shop-chev { transform: rotate(180deg); }
.shop-sec .store-badge.sm { background: var(--c); color: #0c1420; }
.shop-sec .items.flat { border: 0; border-radius: 0; border-top: 1px solid var(--line-soft); background: transparent; }
.shop-done { display: block; padding: 8px 14px; }
.shop-add { display: flex; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid var(--line-soft); }
.shop-add input { flex: 1; min-width: 0; }

/* ---------- Profil ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; background: var(--who, var(--accent)); color: #0c1420; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.avatar img.loaded { opacity: 1; }
.profile-switch { margin: 4px 0 12px; }
.profile-head { display: grid; justify-items: center; gap: 6px; padding: 6px 0 14px; text-align: center; }
.profile-head h2 { font-size: 24px; font-weight: 750; }
.profile-avatar { position: relative; }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); border: 3px solid var(--bg); cursor: pointer; }
.profile-sub { color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: 14px; }
.profile-sub .link-btn { padding: 0; font-size: 14px; }
.profile-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ptile { display: grid; gap: 2px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.ptile .ic { color: var(--accent); margin-bottom: 4px; }
.ptile small { color: var(--muted); font-size: 13px; }
.set-head { display: flex; align-items: center; gap: 8px; }
.set-head h2 { flex: 1; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 4px 0 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.mehr-profile { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); margin-bottom: 12px; }
.mehr-profile span { flex: 1; display: grid; }
.mehr-profile small { color: var(--muted); }

/* ---------- Wunschzettel ---------- */
.occ-chips { margin-bottom: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
.occ-hint { color: var(--muted); font-size: 13.5px; margin: 0 2px 12px; }
.wishes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.wish { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.wish.done { opacity: .6; }
.wish-img { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--raised); color: var(--accent); }
.wish-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.wish-img img.loaded { opacity: 1; }
.wish-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wish-main[data-open] { cursor: pointer; }
.wish-main small { color: var(--muted); font-size: 13px; }
.wish-main .wish-prio { font-weight: 700; }
.wish-res { justify-self: start; margin-top: 6px; }

/* ---------- Zugänge ---------- */
.vault-gate { display: grid; justify-items: center; gap: 12px; text-align: center; max-width: 420px; margin: 20px auto; }
.vault-gate p { color: var(--muted); }
.vault-gate .form { width: 100%; text-align: left; }
.vault-lock { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.vault-lock .ic { width: 40px; height: 40px; }
.vault-search { margin-bottom: 12px; }
.vault-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vault-item { display: grid; gap: 6px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.vault-item.broken { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.vault-item small { color: var(--muted); font-size: 12.5px; }
.vault-top { display: flex; align-items: center; gap: 8px; }
.vault-top b { flex: 1; font-size: 16px; }
.vault-line { display: flex; align-items: center; gap: 6px; min-height: 36px; }
.vault-line span, .vault-line code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-line code, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15.5px; letter-spacing: .5px; }
.vault-url { color: var(--accent); font-size: 13.5px; }
.link-btn.danger { color: var(--danger); }

.profile .set-group { margin-bottom: 12px; }
:root[data-theme="light"] body:not([data-area=""]) .topbar h1,
:root[data-theme="light"] .link-btn, :root[data-theme="light"] .ptile .ic { color: color-mix(in srgb, var(--accent) 62%, #000); }

/* ---------- Rezepte ---------- */
.seg .seg-link { flex: 1; min-height: 38px; display: grid; place-items: center; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg .seg-link[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.stars { color: #efc057; letter-spacing: 1px; font-size: 14px; }
.stars i { font-style: normal; color: var(--line); }
.stars i.on { color: #efc057; }
.idea { display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.idea-head { display: flex; align-items: center; gap: 8px; }
.idea-head b { flex: 1; color: var(--accent); font-size: 16px; }
.idea-main { display: flex; align-items: center; gap: 12px; }
.idea-main span { display: grid; }
.idea-main small { color: var(--muted); }
.idea-img, .rc-img, .pick-img { display: grid; place-items: center; overflow: hidden; flex: none; background: var(--raised); color: var(--accent); }
.idea-img { width: 56px; height: 56px; border-radius: 12px; }
.idea-img img, .rc-img img, .pick-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.idea-img img.loaded, .rc-img img.loaded, .pick-img img.loaded { opacity: 1; }
.idea .btn { justify-self: start; }
.rcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 700px) { .rcards { grid-template-columns: 1fr 1fr; } }
.rcard { display: flex; align-items: stretch; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); overflow: hidden; }
.rcard-link { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; }
.rc-img { width: 92px; align-self: stretch; min-height: 88px; }
.rc-main { min-width: 0; display: grid; gap: 2px; padding: 10px 0; }
.rc-main b { font-size: 16px; }
.rc-main small { color: var(--muted); font-size: 13px; }
.icon-btn.fav { color: var(--faint); align-self: center; }
.icon-btn.fav.on { color: #f07a8a; }
.icon-btn.fav.on .ic { fill: currentColor; }
.r-hero { position: relative; height: 230px; background: var(--raised); overflow: hidden; margin-top: calc(-1 * var(--safe-t)); }
.r-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.r-hero img.loaded { opacity: 1; }
.r-hero-empty { display: grid; place-items: center; height: 100%; color: var(--accent); }
.r-hero-empty .ic { width: 64px; height: 64px; }
.r-hero-btn { position: absolute; top: calc(10px + var(--safe-t)); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 10, 20, .6); color: #fff; }
.r-hero-btn.left { left: 12px; } .r-hero-btn.right { right: 12px; }
@media (min-width: 900px) { .r-hero { border-radius: 0 0 var(--radius) var(--radius); } }
.r-detail { display: grid; gap: 12px; padding-top: 14px; }
.r-title { display: flex; align-items: center; gap: 8px; }
.r-title h1 { flex: 1; font-size: 26px; font-weight: 750; color: var(--accent); line-height: 1.15; }
.r-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.r-tags span { font-size: 12.5px; padding: 3px 9px; border-radius: 8px; background: var(--raised); color: var(--muted); }
.r-rate { display: flex; gap: 2px; }
.r-rate button { width: 38px; height: 38px; font-size: 25px; color: var(--line); }
.r-rate button.on { color: #efc057; }
.r-planned { color: var(--accent); font-size: 14px; font-weight: 600; }
.r-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper .icon-btn { border: 1px solid var(--line); font-size: 20px; }
.stepper b { min-width: 104px; text-align: center; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-soft); }
.ing-list li:first-child { border-top: 0; }
.ing-list small { color: var(--muted); }
.ing-q { width: 88px; flex: none; text-align: right; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.ing-head { font-weight: 700; color: var(--muted); padding-top: 14px !important; }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.steps-list li { padding-left: 4px; line-height: 1.5; }
.steps-list li::marker { color: var(--accent); font-weight: 800; }
.pre { white-space: pre-wrap; }
.eaten { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.eaten li { display: flex; align-items: center; gap: 10px; }
.eaten li > span:last-child { display: grid; }
.eaten small { color: var(--muted); }
.eaten img, .eaten-dot { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.eaten-dot { display: grid; place-items: center; background: var(--raised); color: var(--accent); }
.eat-preview { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.week-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.week-nav b { flex: 1; text-align: center; }
.week { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.wday { display: flex; gap: 10px; padding: 8px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.wday.today { border-color: var(--accent); }
.wday-d { width: 48px; flex: none; display: grid; place-items: center; align-content: center; border-radius: 10px; background: var(--raised); }
.wday.today .wday-d { background: var(--accent); color: var(--on-accent); }
.wday-d small { font-size: 12px; }
.wday-d b { font-size: 19px; }
.wday-meals { flex: 1; min-width: 0; display: grid; gap: 6px; }
.wmeal { display: flex; align-items: center; gap: 10px; text-align: left; padding: 4px; border-radius: 10px; }
.wmeal:hover { background: var(--raised); }
.wmeal img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.wmeal span { display: grid; }
.wmeal small { color: var(--muted); font-size: 12.5px; }
.wmeal.eaten b { color: var(--muted); }
.wadd { min-height: 40px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 14px; text-align: left; padding: 0 12px; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.pick-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; text-align: left; }
.pick-list button:hover { background: var(--raised); }
.pick-list span:last-child { display: grid; }
.pick-list small { color: var(--muted); }
.pick-img { width: 44px; height: 44px; border-radius: 10px; }
.pub-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; }
.pub-list li { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.pub-list .check-line { align-items: flex-start; }
.pub-list .check-line input { margin-top: 3px; flex: none; }
.pub-list span { display: grid; }
.pub-list span.off b { color: var(--muted); text-decoration: line-through; }
.pub-list small { color: var(--muted); font-size: 12.5px; }
.pub-list small.merge { color: var(--accent); }
.ed-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin: 8px 0; opacity: 0; }
.ed-photo.loaded { opacity: 1; }
.ed-meal { color: var(--muted); }
.ed-meal-actions { justify-content: flex-start; }
/* Kochmodus: ganzer Bildschirm */
.sheet-wrap.cook .sheet { max-width: none; width: 100%; height: 100dvh; max-height: none; border-radius: 0; padding-top: calc(8px + var(--safe-t)); display: flex; flex-direction: column; }
.sheet-wrap.cook .sheet::before { display: none; }
.sheet-wrap.cook .sheet-body { flex: 1; display: flex; }
.cook-body { flex: 1; display: flex; flex-direction: column; gap: 16px; max-width: 760px; width: 100%; margin: 0 auto; }
.cook-bars { display: flex; gap: 4px; }
.cook-bars i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.cook-bars i.on { background: var(--accent); }
.cook-top { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; }
.cook-top span { flex: 1; }
.cook-ing { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--raised); font-size: 15px; }
.cook-step { flex: 1; font-size: clamp(24px, 6.5vw, 34px); line-height: 1.35; font-weight: 600; }
.cook-timers { display: flex; flex-wrap: wrap; gap: 10px; }
.cook-timer { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 18px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); color: #efc057; }
.cook-timer b { font-size: 24px; font-variant-numeric: tabular-nums; }
.cook-timer small { font-weight: 600; }
.cook-timer.run { background: #efc057; color: #1d1405; border-color: transparent; }
.cook-timer.paused { border-color: #efc057; }
.cook-other { color: var(--muted); }
.cook-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: calc(8px + var(--safe-b)); }
.cook-nav .btn { min-height: 58px; font-size: 17px; }
.sheet-wrap.cook { padding: 0 !important; align-items: stretch; }

/* ---------- Blumen ---------- */
.all-good { color: var(--accent); font-weight: 600; padding: 6px 4px 2px; }
.hint.left { text-align: left; padding: 10px 4px; }
.care-row .care-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; color: #0c1420; background: var(--k); margin-right: 6px; white-space: nowrap; }
.care-row .care-ic { width: 44px; height: 44px; display: grid; place-items: center; color: var(--k); flex: none; }
.cal-sub { font-size: 13px; color: var(--muted); margin: 14px 2px 6px; font-weight: 650; }
.cal-care { margin-top: 6px; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pcard { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line-soft); }
.pcard-img { height: 118px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); overflow: hidden; }
.pcard-img .ic { width: 40px; height: 40px; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.pcard-img img.loaded { opacity: 1; }
.pcard-main { display: grid; gap: 2px; padding: 9px 10px 11px; }
.pcard-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-due { font-weight: 600; }
.pcard-due.late { color: var(--accent) !important; }
.lex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); }
.lex-list button { width: 100%; display: grid; text-align: left; padding: 11px 14px; background: var(--surface); }
.lex-list small { color: var(--muted); font-size: 13px; }
.p-sub { color: var(--muted); margin-top: -6px; }
.care-cards { display: grid; gap: 8px; }
.care-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.care-card.due { border-color: var(--k); }
.care-card .care-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--k); background: color-mix(in srgb, var(--k) 18%, var(--surface)); }
.care-main { flex: 1; min-width: 0; display: grid; }
.care-main small { color: var(--muted); font-size: 12.5px; }
.p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-facts span { padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; }
.p-facts small { display: block; color: var(--muted); font-size: 12px; }
.p-facts em { color: var(--muted); font-style: normal; font-size: 12.5px; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.p-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.p-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--raised); opacity: 0; cursor: pointer; }
.p-photos img.loaded { opacity: 1; }
.plog { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plog li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.plog li > span:last-child { display: grid; }
.plog small { color: var(--muted); }
.plog-k { flex: none; min-width: 104px; font-weight: 700; color: var(--k); }
.match-note { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 14px; }
.id-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.id-list button { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.id-list button span { flex: 1; display: grid; }
.id-list small { color: var(--muted); font-style: italic; }
.id-score { color: var(--muted); }
.id-score.hi { color: var(--accent); }
.sym-chips { margin-bottom: 10px; }
.causes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.causes li { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--raised); }
.causes span { color: var(--muted); font-size: 14px; }
.causes em { color: var(--accent); font-style: normal; font-weight: 700; font-size: 13.5px; }

/* ---------- Steuerung ---------- */
.ha-status { color: var(--muted); display: flex; align-items: center; gap: 6px; padding: 4px 2px; }
.ha-status .link-btn { padding: 0; }
.ha-warn { color: var(--minus); font-size: 13.5px; padding: 4px 2px; }
.ha-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .ha-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ha-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ha-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); text-align: left; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background .15s, transform .1s; }
.ha-tile:active { transform: scale(.97); }
.ha-tile.on { background: color-mix(in srgb, var(--lc, var(--accent)) 26%, var(--surface)); border-color: color-mix(in srgb, var(--lc, var(--accent)) 70%, transparent); }
.ha-tile.off-line { opacity: .5; }
.ha-tile.small { min-height: 74px; padding: 10px; gap: 4px; }
.ha-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.ha-tile.on .ha-ic { background: var(--lc, var(--accent)); color: #1d1405; box-shadow: 0 0 18px color-mix(in srgb, var(--lc, var(--accent)) 60%, transparent); }
.ha-tile.small .ha-ic { width: 30px; height: 30px; }
.ha-tile.small .ha-ic .ic { width: 18px; height: 18px; }
.ha-txt { display: grid; min-width: 0; width: 100%; }
.ha-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ha-tile.small .ha-txt b { font-size: 13.5px; }
.ha-txt small { color: var(--muted); font-size: 12.5px; }
.ha-more { position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.ha-more .ic { width: 18px; height: 18px; }
.ha-scenes { display: flex; flex-wrap: wrap; gap: 8px; }
.ha-scene { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-soft); font-weight: 650; }
.ha-scene.pressed { background: var(--accent); color: var(--on-accent); }
.ha-autos .item { gap: 8px; padding-right: 12px; }
.ha-detail { display: grid; gap: 14px; }
.ha-bulb { justify-self: center; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.ha-bulb .ic { width: 46px; height: 46px; }
.ha-bulb.on { background: var(--lc, var(--accent)); color: #1d1405; box-shadow: 0 0 40px color-mix(in srgb, var(--lc, var(--accent)) 55%, transparent); }
.ha-detail-row { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.ha-range { width: 100%; height: 34px; accent-color: var(--accent); }
.ha-range.kelvin { accent-color: #ffc56b; }
.ha-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.setup-steps { text-align: left; display: grid; gap: 8px; padding-left: 20px; color: var(--muted); }
.setup-steps b { color: var(--text); }
