/* 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:not(.avatar) { 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); }

/* Reparaturen */
.repair .wish-main small.repair-by { font-size: 12px; opacity: .75; }
.repair .wish-main .ic.tiny { vertical-align: -2px; }
.repair-check { flex: none; align-self: center; border: 1.5px solid var(--line-soft); border-radius: 50%; color: var(--muted); }
.repair-check[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #000); }
.repair-photo { border-radius: var(--radius); overflow: hidden; max-height: 220px; }
.repair-photo img { width: 100%; height: 100%; max-height: 220px; object-fit: cover; opacity: 0; }
.repair-photo img.loaded { opacity: 1; }
.form textarea { resize: vertical; min-height: 64px; font: inherit; }

/* ---------- 2.6.1: Bildschirmtastatur & Fotos ---------- */
/* Sheets enden über der Tastatur (Android über interactive-widget, iPhone über --kb) */
.sheet-wrap { bottom: var(--kb, 0px); }
.sheet { max-height: calc(100dvh - var(--kb, 0px) - 40px - var(--safe-t)); }
body.kb-open .sheet { padding-bottom: 16px; }
/* Felder nicht ganz an den Rand scrollen */
input, textarea, select { scroll-margin: 80px 0 24px; }
/* Bei offener Tastatur Platz schaffen: untere Leiste + Plus-Knopf weg */
body.kb-open .tabbar, body.kb-open .fab { display: none; }
body.kb-open #view { padding-bottom: 24px; }
body.kb-open .chat { height: calc(100dvh - var(--kb, 0px) - 60px - var(--safe-t)); }
/* Titelbild antippbar */
.r-hero img[data-hero] { cursor: zoom-in; }
.p-photos img { cursor: zoom-in; }
.viewer-actions .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- 2.7: Kontakte ---------- */
.c-av { flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #0a1b33)); }
.c-av img { width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.c-av img.loaded { opacity: 1; }
.c-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.c-row { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.c-row + .c-row { border-top: 1px solid var(--line-soft); }
.c-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 12px; text-align: left; }
.c-main { min-width: 0; display: grid; }
.c-main b { font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-quick { color: var(--accent); }
.c-letter { padding-top: 14px; }
.ic.fav { color: #ffc83d; fill: #ffc83d; }
.c-bday-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.c-bday { flex: none; width: 96px; display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); text-align: center; }
.c-bday b { font-size: 14px; margin-top: 4px; }
.c-bday small { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.c-bday.today { border-color: #ffc83d; background: color-mix(in srgb, #ffc83d 14%, var(--surface)); }

/* Visitenkarte (Stil wie in Arbeitszeit) */
.vcard { position: relative; border-radius: 16px; overflow: hidden; color: #fff; min-height: 180px; display: flex;
  background: linear-gradient(135deg, #12305a, #0a1b33); box-shadow: 0 8px 24px rgb(0 0 0 / .3); border-left: 7px solid var(--c); }
.vcard-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.vcard-bg.loaded { opacity: 1; }
.vcard.has-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgb(0 0 0 / .35), rgb(0 0 0 / .72)); }
.vcard-in { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 14px 14px; min-width: 0; }
.vcard-top { display: flex; justify-content: space-between; align-items: center; min-height: 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.vcard-who { display: flex; align-items: center; gap: 14px; }
.vcard-who .c-av { box-shadow: 0 0 0 3px rgb(255 255 255 / .85); }
.vcard-name { display: grid; min-width: 0; gap: 1px; }
.vcard-name b { font-size: 20px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.vcard-name span { font-size: 13.5px; opacity: .9; }
.vcard-name .vcard-co { color: var(--c); font-weight: 650; opacity: 1; filter: brightness(1.15); }
.vcard-name .vcard-bd { font-size: 12.5px; opacity: .8; }
.vcard-lines { margin-top: auto; font-size: 13px; line-height: 1.65; color: #ffffffe0; overflow-wrap: anywhere; }
.vcard-lines .ic, .vcard-name .ic { width: 14px; height: 14px; vertical-align: -2px; opacity: .85; }

.c-sheet .sheet-head h2:empty { visibility: hidden; }
.c-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 14px 0 6px; }
.c-act { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--raised); color: var(--accent); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.c-act span { color: var(--text); }
.c-act.wa { color: #25d366; }
.c-info { list-style: none; padding: 0; margin: 10px 0 0; display: grid; }
.c-info li { display: flex; align-items: center; gap: 8px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.c-lab { flex: 0 0 86px; color: var(--muted); font-size: 13px; }
.c-val { flex: 1; min-width: 0; color: var(--text); text-decoration: none; overflow-wrap: anywhere; display: grid; }
a.c-val { color: var(--accent); }
.c-val small { color: var(--muted); font-size: 12.5px; }
.c-by { color: var(--muted); font-size: 12px; margin: 10px 2px 0; }
.c-foot { flex-wrap: wrap; }
.c-preview { margin-bottom: 14px; }
body.kb-open .c-preview { display: none; }  /* beim Tippen mehr Platz */
.c-pics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.c-multi { display: flex; gap: 6px; align-items: center; }
.c-multi + .c-multi { margin-top: 6px; }
.c-multi select { flex: 0 0 34%; }
.c-multi input { flex: 1; min-width: 0; }
.c-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .c-foot [data-edit] { grid-column: 1 / -1; }
.back-auto { margin-left: -6px; }
.wish-main small.wish-by { font-size: 12px; opacity: .75; }

/* ---------- 2.7: Einkauf als eine durchgehende Liste ---------- */
.shop-quick { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.shop-quick input { flex: 1; min-width: 0; }
.shop-quick select { flex: 0 0 31%; width: 31%; min-width: 0; }
.shop-list { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: clip; }
.shop-list .shop-sec { background: none; border: 0; border-radius: 0; overflow: visible; }
.shop-list .shop-sec + .shop-sec { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.shop-list .shop-head { position: sticky; top: calc(60px + var(--safe-t)); z-index: 4; background: var(--surface);
  border-bottom: 3px solid var(--c); }
.shop-list .shop-toggle { min-height: 48px; padding-left: 14px; }
.shop-list .shop-name { color: var(--c); font-weight: 800; font-size: 17px; }
.shop-list .shop-sec[data-sec="allgemein"] .shop-name { color: var(--text); }
.shop-list .shop-sec[data-sec="allgemein"] { --c: var(--muted); }
.shop-list .items.flat { border-top: 0; }
.shop-empty { display: block; width: 100%; text-align: left; padding: 10px 14px 12px; color: var(--muted); font-size: 14px; font-style: italic; }
@media (min-width: 900px) { .shop-list .shop-head { top: 60px; } }

/* ---------- 2.7: Wichtige Tage & mehrere Erinnerungen ---------- */
.imp-private { display: flex; align-items: center; gap: 6px; color: #ff9ccc; font-size: 13.5px; font-weight: 600; margin: 2px 2px 12px; }
.imp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.imp-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); text-align: left; }
.imp-row.soon { border-color: color-mix(in srgb, #ff7ab6 55%, var(--line-soft)); }
.imp-row.today { border-color: #ff7ab6; background: color-mix(in srgb, #ff7ab6 14%, var(--surface)); }
.imp-emoji { font-size: 28px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--raised); flex: none; }
.imp-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.imp-main small { color: var(--muted); font-size: 13px; }
.imp-main .ic.tiny { vertical-align: -2px; }
.imp-note { font-style: italic; }
.imp-n { color: #ff7ab6; font-weight: 700; }
.imp-when { color: #ff9ccc; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.rem-rows { display: grid; gap: 6px; }
.rem-row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.rem-row select { flex: 1; min-width: 0; }
/* Steuerung: Szenen zum Auf-/Zuklappen */
.ha-fold { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; }
.ha-fold-n { font-size: 12px; background: var(--raised); border-radius: 999px; padding: 1px 8px; }
.ha-fold .ha-chev { margin-left: auto; transition: transform .2s; }
.ha-fold[aria-expanded="true"] .ha-chev { transform: rotate(180deg); }

/* ---------- 2.8: Startseite aus Kacheln ---------- */
.home-wrap { position: relative; min-height: 100%; }
.home-wrap.bg-gradient { background: var(--home-bg); }
.home-wrap.bg-photo { background: #000; }
.home-bg-img { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 0; pointer-events: none; }
.home-bg-img.loaded { opacity: .38; }
.home-wrap.bg-photo::before { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .15), rgb(0 0 0 / .55)); z-index: 0; pointer-events: none; }
.home-wrap > .page { position: relative; z-index: 1; }
.home-top { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 34px; }
.home-edit-hint { flex: 1; color: var(--muted); font-size: 12.5px; }
.home-edit-hint .ic { width: 14px; height: 14px; vertical-align: -2px; }
.home-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 12px; align-items: stretch; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.htile { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 4px 14px 14px; display: flex; flex-direction: column; min-height: 132px; }
.htile.t-wide { grid-column: span 2; }
.htile.t-big { grid-column: span 2; grid-row: span 2; }
.bg-gradient .htile, .bg-photo .htile { background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.htile[style*="--tc"] { background: color-mix(in srgb, var(--tc) 13%, var(--surface)); border-color: color-mix(in srgb, var(--tc) 40%, var(--line-soft)); }
.htile.tinted[style*="--tc"] { background: color-mix(in srgb, var(--tc) 26%, var(--surface)); }
.tile-head { display: flex; align-items: center; gap: 8px; padding: 9px 0 8px; color: var(--muted); text-decoration: none; min-width: 0; }
.tile-head > .ic:first-child { width: 18px; height: 18px; color: var(--tc, var(--accent)); flex: none; }
.tile-head h2 { font-size: 14.5px; font-weight: 680; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-head .panel-count, .tile-head .badge { margin-left: auto; }
.tile-head > .ic.tiny:last-child { margin-left: auto; flex: none; }
.tile-head .panel-count + .ic.tiny, .tile-head .badge + .ic.tiny { margin-left: 4px; }
.tile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.htile .events, .htile .items { background: var(--bg); }
.t-big { display: grid; gap: 1px; margin-top: auto; }
.t-big b { font-size: 34px; font-weight: 760; line-height: 1; color: var(--tc, var(--text)); letter-spacing: -.02em; }
.t-big span { font-weight: 620; font-size: 14px; }
.t-big small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.t-list li { display: flex; gap: 10px; align-items: center; min-width: 0; }
.t-list li > span:last-child, .t-list li > a { display: grid; min-width: 0; color: inherit; text-decoration: none; }
.t-list b { font-weight: 620; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-list small { color: var(--muted); font-size: 12.5px; }
.t-list .ic.tiny { width: 12px; height: 12px; vertical-align: -1px; }
.t-emoji { font-size: 20px; width: 28px; text-align: center; flex: none; }
.t-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin: 0 4px; }
.t-hello-tile { background: transparent !important; border: 0 !important; padding: 4px 2px 6px; min-height: 0; }
.t-hello { display: flex; align-items: center; gap: 14px; }
.t-hello .hero-date { font-size: clamp(26px, 7.5vw, 36px); }
.t-hello-sum { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.t-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.t-quick.small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.t-quick .qa { padding: 10px 4px; font-size: 12.5px; }
.t-quick .qa.on { background: color-mix(in srgb, #ffc83d 22%, var(--surface)); }
.t-quick .qa span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.t-weather { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.t-weather > div { display: grid; min-width: 0; }
.t-weather b { font-size: 32px; font-weight: 760; line-height: 1; }
.t-weather span { font-weight: 600; font-size: 13.5px; }
.t-weather small { color: var(--muted); font-size: 12px; }
.t-wicon { font-size: 40px; line-height: 1; }
.t-weather.small .t-wicon { font-size: 30px; }
.t-wtom { margin-left: auto; text-align: right; padding-left: 10px; border-left: 1px solid var(--line-soft); }
.t-wnote { color: var(--muted); font-size: 13px; }
.mini-grid.n1 { grid-template-columns: 1fr; }
.mini-grid.n1 img { aspect-ratio: 4/3; }
/* Bearbeiten */
.tiles.editing .htile { animation: wiggle .9s ease-in-out infinite alternate; outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.tiles.editing .htile:nth-child(2n) { animation-delay: -.45s; }
@keyframes wiggle { from { transform: rotate(-.5deg); } to { transform: rotate(.5deg); } }
.tiles.editing .tile-body { pointer-events: none; opacity: .75; }
.tiles.editing .t-hello-tile { border: 1px dashed var(--line) !important; border-radius: var(--radius); }
.htile.dragging { opacity: .55; animation: none !important; transform: scale(1.03); z-index: 5; }
.tile-edit { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; z-index: 3; }
.te-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 85%, transparent); border: 1px solid var(--line); color: var(--text); font-size: 18px; }
.te-btn .ic { width: 17px; height: 17px; }
.te-drag { cursor: grab; touch-action: none; }
.swatch.sw-auto, .swatch.sw-plain { display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--on-accent); border: 1px solid var(--line); }
.swatch.sw-plain { color: var(--muted); }
.look-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.look-opt { display: grid; gap: 4px; justify-items: center; font-size: 12px; color: var(--muted); padding: 4px; border-radius: 12px; border: 2px solid transparent; }
.look-opt[aria-pressed="true"] { border-color: var(--accent); }
.look-prev { width: 100%; aspect-ratio: 3/4; border-radius: 10px; border: 1px solid var(--line); }
/* Menü & untere Leiste anpassen */
.tab-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.menu-edit { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.menu-edit li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.menu-edit li > span { flex: 1; display: grid; font-weight: 600; }
.menu-edit li small { color: var(--muted); font-size: 12px; font-weight: 500; }
.menu-edit li > .ic { color: var(--accent); }
.menu-edit li.off { opacity: .45; }
.menu-edit li.intab > span { color: var(--muted); }
.more-list + .btn { margin-top: 12px; }
.home { align-content: start; } .tiles { align-content: start; grid-auto-rows: auto; }
.tiles.editing .t-hello-tile { padding-top: 46px; }
/* Licht-Kachel: bis zu 4 Lampen zum Antippen */
.lamps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lamps.wide.n3, .lamps.wide.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lamps.wide.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lamps.n1 { grid-template-columns: 1fr; }
.lamp { display: grid; justify-items: start; gap: 2px; padding: 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line-soft); text-align: left; min-width: 0; transition: background .15s, transform .1s; }
.lamp:active { transform: scale(.96); }
.lamp .ic { width: 22px; height: 22px; color: var(--muted); }
.lamp b { font-size: 13px; font-weight: 650; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lamp small { font-size: 11.5px; color: var(--muted); }
.lamp.on { background: color-mix(in srgb, var(--lc, #ffc66b) 26%, var(--surface)); border-color: color-mix(in srgb, var(--lc, #ffc66b) 60%, transparent); }
.lamp.on .ic { color: var(--lc, #ffc66b); }
.lamp.off-line { opacity: .45; }
.lamps.small .lamp { padding: 8px; }
.lamps.small .lamp small { display: none; }
.lamps.big .lamp { padding: 16px 12px; }
.lamps.big .lamp .ic { width: 30px; height: 30px; }
.lamps-foot { color: var(--muted); font-size: 13px; }
.tab-pick.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tab-pick.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ===== 2.9 Wohnung: Akte, Übergabe, Bericht ===== */
.fl-flat { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); margin-bottom: 10px; }
.fl-flat > .ic:first-child { color: var(--accent); flex: none; }
.fl-flat > .ic:last-child { color: var(--faint); flex: none; }
.fl-flat span { flex: 1; display: grid; min-width: 0; }
.fl-flat small { color: var(--muted); font-size: 13px; }
.fl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.fl-stats span { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 12px; color: var(--muted); display: grid; }
.fl-stats b { font-size: 19px; color: var(--text); }
.fl-item .wish-main { cursor: pointer; }
.fl-item.done b { text-decoration: line-through; opacity: .7; }
.fl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
.fl-tag { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--raised); color: var(--muted); }
.fl-tag.k-schaden { color: var(--danger); }
.fl-tag.k-mangel { color: #ffb648; }
.fl-tag.k-abnutzung { color: var(--accent); }
.fl-tag.lock { color: var(--accent); }
.fl-lock { color: var(--faint); align-self: center; flex: none; }
.fl-lock.on { color: var(--accent); }
.fl-ho-new { display: flex; gap: 8px; margin-bottom: 10px; }
.fl-ho-new .btn { flex: 1; }
.fl-report-btn { margin-top: 18px; }
.fl-hint { display: block; width: 100%; margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; padding: 8px; }
.fl-howto h4 { margin: 6px 0 6px; font-size: 15px; }
.fl-howto ul { padding-left: 18px; margin: 0 0 12px; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.fl-howto b { color: var(--text); }
.fl-howto .fine { text-align: left; }
.fl-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-thumb { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; background: var(--raised); flex: none; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.fl-thumb.sm { width: 40px; height: 40px; border-radius: 8px; }
.fl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fl-thumb img[data-photo] { opacity: 0; }
.fl-thumb img.loaded { opacity: 1; }
.fl-thumb.add { border: 1.5px dashed var(--line); background: transparent; }
.fl-x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 12px; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.fl-x .ic { width: 14px; height: 14px; }
.fl-head h3 { font-size: 19px; margin: 0 0 4px; }
.fl-dl { display: grid; grid-template-columns: 112px 1fr; gap: 6px 10px; margin: 12px 0; font-size: 14.5px; }
.fl-dl dt { color: var(--muted); }
.fl-dl dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.fl-proof { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }
.fl-status { margin: 14px 0; padding: 12px; border-radius: 12px; background: var(--raised); display: grid; gap: 4px; }
.fl-status small { color: var(--muted); }
.fl-status-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fl-sub { font-size: 14px; color: var(--muted); margin: 16px 0 8px; font-weight: 650; }
.fl-sub small { font-weight: 400; color: var(--faint); }
.fl-addenda { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.fl-addenda li { border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; }
.fl-addenda small { color: var(--faint); font-size: 12.5px; }
.fl-addenda p { margin: 2px 0 6px; white-space: pre-wrap; }
.fl-loglist { list-style: none; padding: 0; margin: 0; font-size: 13px; display: grid; gap: 4px; }
.fl-loglist li { display: grid; grid-template-columns: 150px 1fr auto; gap: 8px; color: var(--muted); }
.fl-loglist b { color: var(--text); font-weight: 600; }
.fl-letter { width: 100%; font: inherit; font-size: 14px; line-height: 1.45; background: var(--raised); color: var(--text); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; }
.fl-ho { padding-bottom: 40px; }
.fl-sec { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; display: grid; gap: 10px; }
.fl-sec h3 { font-size: 16px; margin: 0; }
.fl-sec textarea { width: 100%; }
.fl-row { display: grid; grid-template-columns: 1fr 1fr auto auto; grid-template-areas: "t t p x" "n v p x"; gap: 6px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.fl-row:first-of-type { border-top: 0; padding-top: 0; }
.fl-row [name=mtype] { grid-area: t; } .fl-row [name=mnum] { grid-area: n; } .fl-row [name=mval] { grid-area: v; }
.fl-row > .fl-thumb, .fl-row > label.icon-btn { grid-area: p; } .fl-row > [data-mdel] { grid-area: x; }
.fl-row.keys { grid-template-columns: 1fr 72px auto; grid-template-areas: none; padding: 0; border: 0; }
.fl-row select, .fl-row input { min-width: 0; }
.fl-room { border-top: 1px solid var(--line-soft); padding-top: 10px; display: grid; gap: 8px; }
.fl-room:first-of-type { border-top: 0; padding-top: 0; }
.fl-room-head { display: flex; gap: 6px; align-items: center; }
.fl-room-head input { flex: 1; font-weight: 650; }
.fl-room .link-btn { justify-self: start; }
.fl-checks { display: grid; gap: 8px; }
.fl-checks small { color: var(--faint); }
.fl-sign { display: grid; gap: 6px; }
.fl-sign-head { display: flex; gap: 10px; align-items: center; }
.fl-sign-head b { flex: none; font-size: 14px; }
.fl-sign-head input { flex: 1; min-width: 0; }
.fl-sign canvas { width: 100%; height: 130px; background: #fff; border-radius: 12px; touch-action: none; border: 1px solid var(--line); }
.fl-sign-foot { display: flex; justify-content: space-between; align-items: center; }
.fl-sign-foot small { color: var(--faint); }

/* Bericht – auf Papier-Optik, damit Bildschirm und PDF gleich aussehen */
.report { background: #fff; color: #111; border-radius: 14px; padding: 22px 18px; font-size: 13.5px; line-height: 1.45; }
.report.fl-inline { margin-bottom: 12px; }
.report h2 { font-size: 20px; margin: 0 0 10px; color: #111; }
.report h3 { font-size: 16px; margin: 0 0 8px; color: #111; }
.report h4 { font-size: 13.5px; margin: 12px 0 6px; color: #333; }
.report p { margin: 4px 0; white-space: pre-wrap; }
.rp-h { border-bottom: 2px solid #111; padding-bottom: 3px; margin-top: 22px !important; }
.report table { width: 100%; border-collapse: collapse; margin: 6px 0; }
.report th, .report td { text-align: left; vertical-align: top; padding: 4px 6px; border: 1px solid #ccc; }
.report th { background: #f2f2f2; font-weight: 600; width: 1%; white-space: nowrap; }
.rp-grid th { width: auto; }
.rp-grid.small { font-size: 11.5px; }
.rp-scroll { overflow-x: auto; }
.report .rp-grid { font-size: 12px; }
@media print { .rp-scroll { overflow: visible; } }
.rp-item { border-top: 1px solid #bbb; padding-top: 14px; margin-top: 16px; break-inside: auto; }
.rp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 8px 0; }
.rp-photos figure { margin: 0; break-inside: avoid; }
.rp-photos img { width: 100%; max-height: 320px; object-fit: contain; background: #f4f4f4; border: 1px solid #ddd; min-height: 80px; }
.rp-photos figcaption { font-size: 10.5px; color: #444; margin-top: 3px; }
.rp-mini { width: 70px; height: 52px; object-fit: cover; }
.rp-ok { color: #0a7a3a; }
.rp-bad { color: #c00; }
.rp-add { background: #f7f7f7; border-left: 3px solid #888; padding: 6px 10px; margin: 8px 0; break-inside: avoid; }
.rp-room { margin: 6px 0 10px; break-inside: avoid; }
.rp-list { margin: 4px 0; padding-left: 18px; }
.rp-proof { font-size: 11.5px; margin-top: 10px !important; }
.rp-proof .mono { font-size: 10.5px; }
.rp-signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; break-inside: avoid; }
.rp-sign { display: grid; gap: 2px; }
.rp-sign img, .rp-blank { width: 100%; height: 80px; object-fit: contain; border-bottom: 1px solid #111; display: block; }
.rp-sign small { font-size: 11px; color: #333; }
.rp-foot { margin-top: 24px; border-top: 2px solid #111; padding-top: 8px; font-size: 11.5px; color: #333; }
.rp-foot .fine { text-align: left; color: #666; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root { background: #fff !important; color-scheme: light; }
  html, body, #app, main, #view, .page { background: #fff !important; color: #111 !important; height: auto !important; overflow: visible !important; }
  .rail, .tabbar, .sync-pill, .no-print, .topbar, .fab, #toasts, .back-auto { display: none !important; }
  #view, .page { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  #app.app-mode { display: block !important; min-height: 0 !important; }
  .report { border-radius: 0; padding: 0; font-size: 11pt; }
  .rp-photos { grid-template-columns: repeat(2, 1fr); }
  .rp-photos img { max-height: 85mm; }
  .rp-item h3 { break-after: avoid; }
}
body[data-area="wohnung"] { --accent: var(--c-wohnung); --accent-2: var(--c-wohnung); --on-accent: var(--on-c-wohnung); --on-accent-2: var(--on-c-wohnung); }

/* ===== 2.9 Einkaufsliste exportieren ===== */
.shop-export { white-space: pre-wrap; font: inherit; font-size: 14.5px; line-height: 1.5; background: var(--raised); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px 14px; max-height: 50vh; overflow: auto; margin: 0; }
.print-shop { display: none; }
@media print {
  body.printing-shop > *:not(.print-shop) { display: none !important; }
  body.printing-shop { background: #fff !important; }
  body.printing-shop .print-shop { display: block; color: #111; font: 12pt/1.35 system-ui, sans-serif; }
  .print-shop h1 { font-size: 18pt; margin: 0; }
  .print-shop .ps-date { color: #555; margin: 2px 0 10px; }
  .print-shop section { break-inside: avoid; margin-bottom: 10px; }
  .print-shop h2 { font-size: 12pt; text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 4px; padding-bottom: 2px; border-bottom: 2.5px solid var(--c); }
  .print-shop ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 12mm; }
  .print-shop li { padding: 3px 0; display: flex; gap: 8px; align-items: baseline; break-inside: avoid; }
  .print-shop .ps-box { width: 11px; height: 11px; border: 1.5px solid #333; border-radius: 2px; flex: none; transform: translateY(1px); }
  .print-shop i { color: #666; font-size: 10pt; }
}

/* ===== 2.9 Filme & Serien ===== */
body[data-area="filme"] { --accent: var(--c-filme); --accent-2: var(--c-filme); --on-accent: var(--on-c-filme); --on-accent-2: var(--on-c-filme); }
.mv-random { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface)); border: 1px solid var(--line-soft); color: var(--text); font-size: 26px; margin-bottom: 10px; }
.mv-random span { flex: 1; display: grid; font-size: 15px; }
.mv-random small { color: var(--muted); font-size: 13px; }
.mv-random > .ic { color: var(--faint); }
.mv-search { width: 100%; margin-bottom: 8px; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; margin-top: 12px; }
.mv-card { display: grid; gap: 3px; text-align: left; color: var(--text); align-content: start; min-width: 0; }
.mv-card b { font-size: 13.5px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mv-card small { color: var(--muted); font-size: 11.5px; }
.mv-card .mv-prog { color: var(--accent); }
.mv-pwrap { position: relative; display: block; }
.mv-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: var(--raised); display: block; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.mv-poster.ph { display: grid; align-content: end; gap: 2px; padding: 10px 8px; background: linear-gradient(160deg, hsl(var(--h) 55% 38%), hsl(calc(var(--h) + 40) 60% 16%)); color: #fff; overflow: hidden; }
.mv-poster.ph b { font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }
.mv-poster.ph small { color: rgba(255,255,255,.75); font-size: 11px; }
.mv-fav { position: absolute; top: 6px; left: 6px; color: #ff4d7d; font-style: normal; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.mv-type { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.6); color: #fff; padding: 2px 6px; border-radius: 6px; }
.mv-stars { display: inline-flex; gap: 1px; color: var(--line); font-size: 14px; line-height: 1; }
.mv-stars i, .mv-stars button { font-style: normal; color: inherit; padding: 0; }
.mv-stars .on { color: #ffc83d; }
.mv-stars .half { background: linear-gradient(90deg, #ffc83d 50%, var(--line) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mv-stars.sm { font-size: 12px; }
.mv-stars.lg { font-size: 30px; gap: 4px; }
.mv-stars.lg button { min-width: 36px; min-height: 36px; }
.mv-provs { display: flex; flex-wrap: wrap; gap: 4px; }
.mv-provs.big .mv-prov { font-size: 13px; padding: 4px 9px 4px 4px; }
.mv-prov { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 2px 6px 2px 2px; border-radius: 7px; background: var(--raised); color: var(--muted); white-space: nowrap; }
.mv-prov img { width: 18px; height: 18px; border-radius: 5px; }
.mv-provs.big .mv-prov img { width: 26px; height: 26px; border-radius: 7px; }
.mv-prov:not(:has(img)) { padding-left: 6px; }
.mv-prov.mine { background: color-mix(in srgb, var(--accent) 22%, var(--raised)); color: var(--text); }
.mv-prov.disk { background: color-mix(in srgb, #9aa7ff 25%, var(--raised)); color: var(--text); padding-left: 6px; }
.mv-attr { font-size: 11px; color: var(--faint); text-align: center; margin: 18px 4px 4px; }
.mv-attr.left { text-align: left; margin: 8px 0 0; }
.mv-attr a { color: var(--accent); }
.mv-find { display: flex; gap: 8px; margin-bottom: 10px; }
.mv-find input { flex: 1; }
.mv-results { display: grid; gap: 6px; margin-bottom: 12px; max-height: 58vh; overflow: auto; }
.mv-res { display: flex; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; background: var(--raised); color: var(--text); }
.mv-res-p { width: 46px; flex: none; }
.mv-res-p .mv-poster { border-radius: 6px; box-shadow: none; }
.mv-res-p .mv-poster.ph b { font-size: 8px; } .mv-res-p .mv-poster.ph { padding: 4px; }
.mv-res > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.mv-res small { color: var(--muted); font-size: 12.5px; }
.mv-res .mv-res-o { color: var(--faint); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mv-have { font-style: normal; font-size: 11px; color: var(--accent); white-space: nowrap; }
.mv-imp { list-style: none; padding: 0; display: grid; gap: 8px; max-height: 45vh; overflow: auto; }
.mv-imp span { display: grid; }
.mv-imp small { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.mv-sheet .sheet-head { display: none; }
.mv-sheet .sheet-body { padding-top: 0; }
.mv-hero { position: relative; margin: 0 -18px 12px; padding: 54px 18px 16px; display: flex; gap: 14px; align-items: flex-end; background: linear-gradient(180deg, rgba(0,0,0,.15), var(--surface) 92%), var(--bg, linear-gradient(160deg, hsl(var(--h, 200) 50% 30%), var(--surface))) center / cover; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; min-height: 170px; }
.mv-hero-p { width: 104px; flex: none; }
.mv-hero-t { display: grid; gap: 3px; min-width: 0; }
.mv-hero-t h2 { font-size: 21px; line-height: 1.2; margin: 0; }
.mv-hero-t small, .mv-hero-t p { color: var(--muted); font-size: 13px; margin: 0; }
.mv-avg { display: flex; align-items: center; gap: 6px; }
.mv-avg b { color: var(--text); }
.mv-close { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.45); color: #fff; }
.mv-status { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.mv-favbtn[aria-pressed="true"] { color: #ff4d7d; }
.mv-date { padding: 4px 8px; min-height: 0; width: auto; }
.fine.left { text-align: left; }
.mv-sec { border-top: 1px solid var(--line-soft); padding: 14px 0 6px; display: grid; gap: 8px; }
.mv-sec h3 { font-size: 15px; margin: 0; }
.mv-sec p { margin: 0; }
.mv-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px !important; }
.mv-tag { font-style: italic; color: var(--muted); }
.mv-step { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.mv-step label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.mv-step input { width: 80px; }
.mv-step .btn { margin-left: auto; }
.mv-progress small { color: var(--muted); }
.mv-diskrow { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.mv-diskrow select { flex: 1; }
.mv-rate-row { display: flex; gap: 12px; align-items: center; }
.mv-rate-row > div { display: grid; gap: 2px; }
.mv-rate-row small.fine { text-align: left; }
.mv-cmt { color: var(--muted); font-size: 13.5px; font-style: italic; }
.mv-rate textarea, .mv-sec textarea { width: 100%; }
.mv-cast { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.mv-actor { width: 76px; flex: none; display: grid; gap: 2px; text-align: center; }
.mv-actor img, .mv-actor i { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto; background: var(--raised); display: grid; place-items: center; font-style: normal; font-weight: 700; color: var(--muted); }
.mv-actor b { font-size: 11.5px; line-height: 1.2; }
.mv-actor small { font-size: 10.5px; color: var(--faint); line-height: 1.2; }
.mv-pick { margin: 10px 0; min-height: 150px; }
.mv-pick.spin { animation: mvspin .45s ease; }
@keyframes mvspin { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.mv-pickcard { display: flex; gap: 14px; padding: 12px; border-radius: 14px; background: var(--raised); }
.mv-pickcard > .mv-poster { width: 96px; flex: none; }
.mv-pickcard > div { display: grid; gap: 4px; align-content: start; }
.mv-pickcard b { font-size: 17px; }
.mv-pickcard small { color: var(--muted); }
.t-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.t-posters span { display: grid; gap: 3px; min-width: 0; }
.t-posters small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-posters .mv-poster { box-shadow: none; border-radius: 8px; }
.t-posters .mv-poster.ph b { font-size: 10px; } .t-posters .mv-poster.ph { padding: 5px; }

/* ===== 2.9 Startseite & Filme am PC: volle Breite, größere Kacheln ===== */
@media (min-width: 1100px) {
  #view.view-start, #view.view-filme { max-width: none; }
  .view-start .page { padding: 12px 32px 32px; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
  .view-start .home { zoom: 1.12; }
  .htile { min-height: 160px; }
  .htile.t-big { min-height: 334px; }
  .mv-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 16px; }
}
@media (min-width: 1700px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .view-start .home { zoom: 1.25; }
}
@media (min-width: 2300px) {
  .view-start .home { zoom: 1.4; }
  .view-start .page { padding: 16px 40px 40px; }
}

/* ===== 2.9.2 Startseite: freies Raster, Größe am Eckgriff ===== */
.tiles.free { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--row); gap: var(--gap); grid-auto-flow: row; position: relative; align-content: start; }
.tiles.free .htile { min-height: 0; overflow: hidden; }
.tiles.free .tile-body { overflow: hidden; min-height: 0; }
.tiles.free.editing { background-image: linear-gradient(color-mix(in srgb, var(--line) 35%, transparent) 1px, transparent 1px); background-size: 100% calc(var(--row) + var(--gap)); border-radius: 12px; min-height: 60vh; }
.tiles.free.editing .htile { cursor: grab; touch-action: pan-y; }
.tiles.free .htile.dragging { z-index: 10; opacity: .85; transform-origin: center; transition: none; box-shadow: 0 18px 40px rgb(0 0 0 / .45); cursor: grabbing; }
.tiles.free .htile.resizing { z-index: 10; animation: none !important; outline: 2px solid var(--accent); }
.tile-ghost { border: 2px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, transparent); pointer-events: none; z-index: 0; }
.te-resize { position: absolute; right: 0; bottom: 0; width: 34px; height: 34px; cursor: nwse-resize; touch-action: none; z-index: 4; background: linear-gradient(135deg, transparent 52%, var(--accent) 52%); border-radius: 0 0 var(--radius) 0; }
.te-resize::after { content: ""; position: absolute; right: 6px; bottom: 6px; width: 10px; height: 10px; border-right: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); }
.te-size { position: absolute; left: 8px; bottom: 6px; z-index: 3; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 7px; background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--muted); pointer-events: none; }
.tiles.free .t-quick { gap: 6px; }
.tiles.free .t-quick .qa { min-width: 0; padding: 8px 2px; }
.t-quick.all { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.tiles.free .lamps { gap: 6px; }
.tiles.free .htile.ts-small .tile-head { padding: 7px 0 4px; }
.tiles.free .t-hello-tile { overflow: hidden; }
.tiles.free .htile.ts-small .tile-edit { top: 4px; right: 4px; gap: 2px; }
.tiles.free .htile.ts-small .te-btn { width: 28px; height: 28px; font-size: 15px; }
.tiles.free .htile.ts-small .te-btn .ic { width: 14px; height: 14px; }

/* ===== 2.9.3 Inhalt füllt die Kachel: alles wächst mit der Kachelgröße ===== */
.tiles.free .htile { container-type: size; }
.tiles.free .tile-body { display: flex; flex-direction: column; }
.tiles.free .tile-head h2 { font-size: clamp(14px, 3.4cqmin, 22px); }
.tiles.free .tile-head > .ic:first-child { width: clamp(18px, 4cqmin, 28px); height: clamp(18px, 4cqmin, 28px); }
/* Schnellaktionen & Lampen: Felder füllen die ganze Kachel, Symbole und Schrift wachsen mit */
.tiles.free .t-quick.fill, .tiles.free .lamps.fill { flex: 1; min-height: 0; align-content: stretch; }
.tiles.free .t-quick.fill .qa { height: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--qs) * .06); font-size: clamp(12px, calc(var(--qs) * .14), 22px); }
.tiles.free .t-quick.fill .qa .ic { width: clamp(20px, calc(var(--qs) * .34), 64px); height: clamp(20px, calc(var(--qs) * .34), 64px); }
.tiles.free .lamps.fill .lamp { height: 100%; min-height: 0; align-content: center; padding: clamp(8px, calc(var(--qs) * .08), 20px); }
.tiles.free .lamps.fill .lamp .ic { width: clamp(20px, calc(var(--qs) * .2), 48px); height: clamp(20px, calc(var(--qs) * .2), 48px); }
.tiles.free .lamps.fill .lamp b { font-size: clamp(12.5px, calc(var(--qs) * .1), 20px); }
.tiles.free .lamps.fill .lamp small { font-size: clamp(11px, calc(var(--qs) * .075), 16px); }
/* Große Zahlen (offen, dringend, Pflanzen …) wachsen mit der Kachel */
.tiles.free .t-big { margin-top: auto; margin-bottom: auto; }
.tiles.free .t-big b { font-size: clamp(28px, min(26cqh, 20cqw), 150px); }
.tiles.free .t-big span { font-size: clamp(14px, min(6.5cqh, 5cqw), 30px); }
.tiles.free .t-big small { font-size: clamp(12px, min(4.5cqh, 3.6cqw), 20px); white-space: normal; }
/* Begrüßung: mittig und mitwachsend */
.tiles.free .t-hello-tile .tile-body { justify-content: center; }
.tiles.free .t-hello .hero-date { font-size: clamp(24px, min(9cqw, 26cqh), 96px); line-height: 1.05; }
.tiles.free .t-hello .hero-greet { font-size: clamp(13px, min(3cqw, 8cqh), 28px); }
.tiles.free .t-hello-sum { font-size: clamp(13px, min(2.6cqw, 7cqh), 24px); }
.tiles.free .t-hello .avatar { width: clamp(44px, min(14cqw, 34cqh), 150px) !important; height: clamp(44px, min(14cqw, 34cqh), 150px) !important; font-size: clamp(18px, min(6cqw, 14cqh), 64px) !important; }
/* Wetter */
.tiles.free .t-weather { margin: auto 0; }
.tiles.free .t-wicon { font-size: clamp(30px, min(30cqh, 18cqw), 130px); }
.tiles.free .t-weather b { font-size: clamp(30px, min(24cqh, 16cqw), 120px); }
.tiles.free .t-weather span { font-size: clamp(13px, min(6cqh, 4cqw), 26px); }
.tiles.free .t-weather small, .tiles.free .t-wtom span { font-size: clamp(12px, min(4.5cqh, 3cqw), 20px); }
/* Leere Hinweise mittig statt verloren oben */
.tiles.free .panel-empty { margin: auto 0; text-align: center; font-size: clamp(13px, min(6cqh, 4cqw), 22px); }
/* Listen: Schrift wächst etwas mit */
.tiles.free .t-list b, .tiles.free .items .item-name { font-size: clamp(14px, min(5cqh, 3.4cqw), 20px); }
.tiles.free .store-chip { font-size: clamp(13px, min(5cqh, 3.4cqw), 20px); }
.tiles.free .lamps.fill .lamp b, .tiles.free .lamps.fill .lamp small { line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tiles.free .lamps.fill .lamp { overflow: hidden; gap: 4px; }
.tiles.free .store-chip { font-size: clamp(13px, min(7cqh, 4cqw), 26px); padding: .45em .8em; }
.tiles.free .store-chips { gap: clamp(6px, 2cqmin, 14px); }
.tiles.free .lamps.fill .lamp { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.tiles.free .lamps.fill .lamp > * { flex: none; }

/* ===== 2.9.4 Einstellungen aufklappbar ===== */
.set-group.fold > h2 { cursor: pointer; display: flex; align-items: center; gap: 8px; user-select: none; margin: -4px 0; padding: 4px 0; }
.set-group.fold > h2::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.set-group.fold.zu > h2::after { transform: rotate(-45deg); }
.set-group.fold.zu > :not(h2) { display: none !important; }
.set-group.fold.zu { gap: 0; }
.set-note.warn { color: #ffb648; }
.pin-input { letter-spacing: .4em; font-size: 22px; text-align: center; }

/* ===== 2.9.5 Persönliche/private Listen & regelmäßige Einkäufe ===== */
.vis-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 7px; background: var(--raised); color: var(--muted); vertical-align: 2px; }
.vis-tag.priv { color: #ff8fb8; }
.vis-tag .ic.tiny { width: 11px; height: 11px; }
.reg-hint { margin: 10px 0 4px; padding: 10px 12px; border-radius: var(--radius); background: color-mix(in srgb, #ffb648 12%, var(--surface)); border: 1px solid color-mix(in srgb, #ffb648 35%, var(--line-soft)); }
.reg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.reg-head .ic { color: #ffb648; width: 18px; height: 18px; }
.reg-head b { flex: 1; }
.reg-hint ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.reg-hint li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line-soft); }
.reg-hint li:first-child { border-top: 0; }
.reg-hint li > span { flex: 1; display: grid; min-width: 0; }
.reg-hint small { color: var(--muted); font-size: 12.5px; }
.reg-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.reg-list li { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.reg-list li.off { opacity: .5; }
.reg-main { display: grid; min-width: 0; }
.reg-main small { color: var(--muted); font-size: 12px; }
.reg-every { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.reg-every input { width: 56px; padding: 6px; min-height: 0; }
.reg-list select { max-width: 120px; padding: 6px; min-height: 0; }
.reg-auto { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.reg-new { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.reg-new input[name=n] { flex: 1; min-width: 0; }
.reg-new label { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.reg-new input[name=e] { width: 56px; padding: 6px; min-height: 0; }
@media (max-width: 560px) { .reg-list li { grid-template-columns: 1fr auto auto; } .reg-list li .reg-main { grid-column: 1 / -1; } }

/* Filme: Listen Gemeinsam / Nur … (2.9.6) */
.mv-scope { margin: 2px 0 8px; }
.mv-scope-hint { margin: -2px 2px 10px; }
.mv-only { margin: 4px 0 10px; align-items: flex-start; }
.mv-only > span { padding-top: 8px; }
.mv-only .chips { flex: 1; }
.mv-demo-hint { text-align: left; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; margin: 6px 0 10px; }

/* Blumen: Herkunft der Pflegewerte (2.9.7) */
.care-src { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 13.5px; color: var(--muted); display: grid; gap: 6px; }
.care-src p { margin: 0; line-height: 1.4; }
.care-src b { color: var(--text); }
.care-src.found, .care-src.default { border-color: color-mix(in srgb, #ffb648 45%, var(--line-soft)); }
.care-src .btn, .care-src .link-btn { justify-self: start; }
.pcard-std { color: #ffb648 !important; font-weight: 600; }
.lex-fix { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, #ffb648 12%, var(--surface)); border: 1px solid color-mix(in srgb, #ffb648 40%, var(--line-soft)); }
.lex-fix p { flex: 1; margin: 0; display: grid; gap: 2px; font-size: 14px; }
.lex-fix small { color: var(--muted); font-size: 12.5px; }

/* Kalender: Einträge aus anderen Bereichen (2.9.8) */
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 4px; vertical-align: middle; }
.event-row.linked .ev-title { font-weight: 600; }
.event-row.linked .ev-bar { opacity: .85; }

/* Prüfung 2.9.8: Datumsfelder in Zweierreihen nicht über den Rand laufen lassen */
.field-row > .field { min-width: 0; }
.field-row input[type="date"], .field-row input[type="time"], .field-row input[type="datetime-local"] { min-width: 0; width: 100%; }

/* =====================================================================
   2.9.10 Alle Seiten responsiv am PC (ab 1100 px Breite)
   Vorher war jede Seite außer Start auf 760 px Breite begrenzt.
   ===================================================================== */
@media (min-width: 1100px) {
  #view { max-width: none; }
  #view:not(.view-start) > .topbar,
  #view:not(.view-start) > .page { width: 100%; max-width: 1600px; margin-inline: auto; }
  #view:not(.view-start) > .page { padding: 8px 32px 48px; }
  #view:not(.view-start) > .topbar { padding-left: 32px; padding-right: 32px; }
  .fab { right: 40px; }

  /* Listen mit Zeilen → mehrere Spalten (Trennlinien bleiben über die Lücke sichtbar) */
  #app.app-mode { grid-template-columns: 236px minmax(0, 1fr); }
  #view { min-width: 0; }
  .items:not(.flat), .more-list, .c-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
    gap: 8px; background: none; border: 0; border-radius: 0; overflow: visible;
  }
  .items:not(.flat) > li, .more-list > li, .c-list > li { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
  .more-list .more-row { border-top: 0; height: 100%; }
  .lex-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

  /* Karten → Raster */
  .wishes, .vault-list, .rcards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); align-items: start; }
  .pgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
  .ha-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
  .ha-grid.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
  .fl-stats { max-width: 760px; }

  /* Einkauf: jeder Laden als eigene Karte nebeneinander */
  .shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; align-items: start; background: none; border: 0; overflow: visible; }
  .shop-list .shop-sec { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: clip; }
  .shop-list .shop-sec + .shop-sec { border-top: 1px solid var(--line-soft); margin-top: 0; }
  .shop-list .shop-head { position: static; }
  .view-einkauf .shop-quick { max-width: 760px; }

  /* Kalender: Monat links, Tagesliste rechts – Liste in Spalten */
  .view-kalender .page:has(> .month) { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr); gap: 0 32px; align-items: start; }
  .view-kalender .page:has(> .month) > * { grid-column: 1; }
  .view-kalender .page:has(> .month) > .day-panel { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; position: sticky; top: 70px; max-height: calc(100dvh - 90px); overflow: auto; }
  .view-kalender .day { aspect-ratio: auto; min-height: 88px; align-content: start; gap: 6px; }
  .view-kalender .page:not(:has(> .month)) { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 4px 24px; align-items: start; }
  .view-kalender .page:not(:has(> .month)) > .legend, .view-kalender .page:not(:has(> .month)) > .empty { grid-column: 1 / -1; }

  /* Chat: lesbare Breite */
  .view-chat .chat { max-width: 980px; width: 100%; margin-inline: auto; }

  /* Finanzen: Übersicht links, Ausgaben rechts */
  .view-finanzen .page { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 14px 32px; align-items: start; }
  .view-finanzen .page > * { grid-column: 1; }
  .view-finanzen .page > .expenses, .view-finanzen .page > .empty { grid-column: 2; grid-row: 1 / span 6; }

  /* Einstellungen & Profil: Gruppen nebeneinander */
  .settings { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); align-items: start; }
  .view-profil .page.profile { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
  .view-profil .page.profile > .profile-switch, .view-profil .page.profile > .profile-head { grid-column: 1 / -1; }
  .view-profil .page.profile > .profile-switch { max-width: 520px; justify-self: center; width: 100%; }

  /* Schalter, Filter, Suche nicht über die volle Breite ziehen */
  .page > .profile-switch, .page > .chore-filter, .mv-scope, .page > div > .profile-switch { max-width: 620px; }
  .vault-search, .mv-search, .page .search { max-width: 620px; }
  .mv-random { max-width: 620px; }

  /* Detailseiten (Pflanze, Rezept) mittig mit lesbarer Breite */
  .r-hero { max-width: 1100px; margin-inline: auto; border-radius: 0 0 var(--radius) var(--radius); height: 300px; }
  .r-detail { max-width: 1100px; margin-inline: auto; }
}
@media (min-width: 1700px) {
  #view:not(.view-start) > .topbar, #view:not(.view-start) > .page { max-width: 1900px; }
}

/* ---------- 3.0: Arbeit & Taschen (aus der Arbeitszeit-App) ---------- */
.tsz-stat { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.tsz-ste { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--sc, var(--accent)) 20%, var(--surface)); flex: none; }
.tsz-stt { display: flex; flex-direction: column; min-width: 0; }
.tsz-stt small { color: var(--muted); }
.tsz-chips { margin: 0 0 6px 46px; gap: 6px; }
.tsz-chips .chip { padding: 4px 10px; font-size: 12.5px; min-height: 30px; }
.tsz-list, .tsz-items { list-style: none; margin: 0; padding: 0; }
.tsz-bag { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; cursor: pointer; color: var(--text); }
.tsz-em { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); flex: none; }
.tsz-em.big { width: 52px; height: 52px; font-size: 28px; }
.tsz-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tsz-main small { color: var(--muted); }
.tsz-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.tsz-bar { display: block; height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.tsz-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.tsz-head { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.tsz-head h2 { margin: 0; font-size: 18px; }
.tsz-head small { color: var(--muted); }
.tsz-prog { display: flex; gap: 10px; align-items: baseline; margin-top: 4px; }
.tsz-prog b { font-size: 24px; }
.tsz-prog span { color: var(--muted); }
.tsz-done { margin: 10px 0 0; font-weight: 600; }
.tsz-items li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); }
.tsz-ck { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; color: var(--on-accent); flex: none; cursor: pointer; padding: 0; }
.tsz-items li.on .tsz-ck { background: var(--accent); border-color: var(--accent); }
.tsz-items li.on .tsz-in { text-decoration: line-through; color: var(--muted); }
.tsz-in { flex: 1; min-width: 0; }
.tsz-in small { color: var(--muted); }
.tsz-gear { font-size: 11px; }
.tsz-add { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.tsz-add input { flex: 1 1 160px; }
.tsz-add select { flex: 0 1 150px; }
.htile .tsz-stat { padding: 4px 0; }
.htile .tsz-chips { margin-left: 46px; }
