/* ==========================================================================
   Familien-App – Design-System
   Dunkel ist Standard; [data-theme="light"] schaltet auf hell.
   Mobil: untere Tab-Leiste. Ab 900px: Seitenleiste + mehrspaltige Layouts.
   ========================================================================== */
:root {
  --bg: #0e1014; --bg-elev: #13161c; --surface: #181c23; --surface-2: #1f242d; --surface-3: #2a303b;
  --border: rgba(255,255,255,.07); --border-strong: rgba(255,255,255,.14);
  --text: #eceef2; --text-2: #b6bcc7; --muted: #8a919d;
  --accent: #7c8cff; --accent-2: #a78bfa; --accent-ink: #0e1014; --accent-soft: rgba(124,140,255,.15);
  --ok: #3ccf91; --ok-soft: rgba(60,207,145,.14); --warn: #f5b84a; --warn-soft: rgba(245,184,74,.15);
  --danger: #ff6b7a; --danger-soft: rgba(255,107,122,.13);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.5);
  --radius: 18px; --radius-sm: 12px; --radius-xs: 8px;
  --tab-h: 64px; --top-h: 60px; --side-w: 248px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --card-sheen: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 120px);
  --card-edge: inset 0 1px 0 rgba(255,255,255,.04);
  --glow-a: rgba(124,140,255,.10); --glow-b: rgba(236,72,153,.05);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f5f8; --bg-elev: #fbfbfd; --surface: #ffffff; --surface-2: #f1f2f6; --surface-3: #e6e8ee;
  --border: rgba(15,20,30,.08); --border-strong: rgba(15,20,30,.16);
  --text: #161a22; --text-2: #3d4452; --muted: #5f6673;
  --accent: #4f5fe8; --accent-2: #7c3aed; --accent-ink: #ffffff; --accent-soft: rgba(79,95,232,.1);
  --ok: #0b8655; --ok-soft: rgba(18,164,107,.1); --warn: #9a6200; --warn-soft: rgba(201,133,16,.12);
  --danger: #bf1f33; --danger-soft: rgba(224,54,73,.09);
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 6px 20px rgba(16,24,40,.06);
  --shadow-lg: 0 24px 60px rgba(16,24,40,.18);
  --card-sheen: none; --card-edge: 0 0 0 0 transparent; --seg-on: var(--surface);
  --glow-a: rgba(79,95,232,.07); --glow-b: rgba(236,72,153,.04);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg.i { width: 22px; height: 22px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.xs { width: 15px; height: 15px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--accent-soft); }

/* ---------- Grundgerüst ---------- */
.app { min-height: 100%; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 18px;
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .back { margin-left: -8px; }
.topbar h1 { font-size: 22px; font-weight: 750; letter-spacing: -.02em; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .1s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
main.content {
  max-width: 760px; margin: 0 auto; padding: 8px 16px calc(var(--tab-h) + 96px + env(safe-area-inset-bottom));
}
.view-enter { animation: viewIn .32s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Untere Tab-Leiste (mobil) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; position: relative; transition: color .2s;
}
.tabbar a .pill { width: 56px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .25s var(--ease), transform .2s var(--ease); }
.tabbar a.active { color: var(--text); }
.tabbar a.active .pill { background: var(--accent-soft); color: var(--accent); }
.tabbar a:active .pill { transform: scale(.92); }

/* Floating Action Button (mobil) */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  height: 56px; min-width: 56px; padding: 0 20px 0 16px; border-radius: 18px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700; font-size: 15.5px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform .2s var(--ease), opacity .2s;
}
.fab:active { transform: scale(.95); }
.fab[hidden] { display: none; }
.page-actions { display: none; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: var(--side-w) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; gap: 2px;
    border-right: 1px solid var(--border); background: var(--bg-elev); overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
  .brand .logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; color: #fff; }
  .brand b { display: block; font-size: 16px; letter-spacing: -.01em; }
  .brand small { color: var(--muted); font-size: 12.5px; }
  .nav-section { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; }
  .sidebar a.nav {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); font-weight: 560; font-size: 15px;
    transition: background .15s, color .15s;
  }
  .sidebar a.nav:hover { background: var(--surface-2); color: var(--text); }
  .sidebar a.nav.active { background: var(--accent-soft); color: var(--accent); }
  .sidebar a.nav .count { margin-left: auto; font-size: 12px; background: var(--surface-3); color: var(--text-2); border-radius: 10px; padding: 1px 8px; }
  .sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; color: var(--text); }
  .sidebar .me:hover { background: var(--surface-2); }
  .sidebar .me small { display: block; color: var(--muted); font-size: 12.5px; }
  .tabbar, .fab { display: none !important; }
  .topbar { padding: 0 28px; height: 72px; }
  .topbar h1 { font-size: 26px; }
  .topbar .me-btn { display: none; }
  main.content { max-width: 1240px; padding: 8px 28px 60px; }
  main.content.narrow { max-width: 820px; margin: 0; }
  .page-actions { display: flex; gap: 8px; }
}

/* ---------- Bausteine ---------- */
.card {
  background: var(--surface) var(--card-sheen); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: var(--shadow), var(--card-edge);
}
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card h3, .section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title { margin: 22px 4px 10px; }
.section-title .more { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 14px; }
.grid { display: grid; gap: 14px; }
.grid > .card { margin-bottom: 0; }
@media (min-width: 900px) {
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .dash > div > .card:last-child { margin-bottom: 0; }
  .split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 22px; align-items: start; }
}
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .big { font-size: 40px; margin-bottom: 6px; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-weight: 650; font-size: 15.5px; cursor: pointer;
  transition: transform .1s, background .15s, border-color .15s, opacity .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn.icon { padding: 0; width: 46px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=search], input[type=date], input[type=time], input[type=number], input[type=password], input[type=email], input[type=url], input[type=tel], input:not([type]), select, textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type=date], input[type=time] { min-width: 0; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { filter: var(--picker-filter, invert(.7)); }
[data-theme="light"] { --picker-filter: none; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .three { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; }
.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 4px 0; cursor: pointer; font-weight: 600; color: var(--text); }
.switch small { display: block; color: var(--muted); font-weight: 400; }
.switch input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; flex: 0 0 auto; cursor: pointer; transition: background .2s; border: 0; min-height: 0; padding: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 4px; gap: 4px; }
.segmented button, .segmented a { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 10px; font-weight: 650; font-size: 14.5px; color: var(--text-2); cursor: pointer; text-align: center; transition: background .2s, color .2s; }
.segmented .on { background: var(--seg-on, var(--surface-3)); color: var(--text); box-shadow: var(--shadow); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; transition: transform .15s; padding: 0; }
.swatch.on { border-color: var(--text); transform: scale(1.08); }

/* Avatare & Chips */
.avatar {
  --c: #888; width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden;
  background: var(--c); color: #fff; font-weight: 750; font-size: 14px; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; font-size: 21px; }
.avatar.xl { width: 88px; height: 88px; font-size: 32px; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.avatars .avatar:first-child { margin-left: 0; }
.avatars .more { margin-left: 6px; font-size: 13px; color: var(--muted); align-self: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip.plain { padding: 3px 10px; }
.chip .dot { width: 18px; height: 18px; border-radius: 50%; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); min-height: 58px; }
.list > li:last-child { border-bottom: 0; }
.list > li.clickable { cursor: pointer; border-radius: 12px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; transition: background .15s; }
.list > li.clickable:hover { background: var(--surface-2); }
.list .title { font-weight: 600; }
.list .meta { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 3px; }
.check {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--border-strong); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: transparent; transition: all .2s var(--ease); padding: 0;
}
.check:hover { border-color: var(--accent); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(1.18); } }
.done .title { text-decoration: line-through; color: var(--muted); }
.del-btn { opacity: .55; }
.del-btn:hover { opacity: 1; color: var(--danger); background: var(--danger-soft); }
.overdue { color: var(--danger) !important; font-weight: 650; }

/* Toast, Banner */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; z-index: 100;
  box-shadow: var(--shadow-lg); transition: all .3s var(--ease); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 32px; left: calc(50% + var(--side-w) / 2); } }
.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 16px; border-radius: var(--radius); margin: 4px 0 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), color-mix(in srgb, var(--accent-2) 18%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); animation: slideDown .45s var(--ease);
}
.banner .emoji { font-size: 26px; line-height: 1; }
.banner b { display: block; margin-bottom: 2px; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* Sheets / Dialoge */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(5,7,10,.55); z-index: 90; opacity: 0; transition: opacity .25s; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-elev); border-radius: 24px 24px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.sheet.show { transform: none; }
.sheet .grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 4px auto 10px; }
.sheet header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; position: sticky; top: -8px; background: var(--bg-elev); padding: 6px 0; z-index: 1; }
.sheet header h2 { flex: 1; margin: 0; font-size: 20px; letter-spacing: -.01em; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 48px)); border-radius: 24px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .3s var(--ease), opacity .25s; padding: 14px 24px 24px; max-height: 88vh; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grabber { display: none; }
}

/* ---------- Startseite ---------- */
.hello { margin: 6px 4px 16px; }
.hello h2 { margin: 0; font-size: 28px; letter-spacing: -.025em; font-weight: 780; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.verse {
  position: relative; overflow: hidden; border-radius: 22px; padding: 22px 22px 16px; margin-bottom: 14px; color: #f6f3ee;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,214,153,.30), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(124,140,255,.38), transparent 60%),
    linear-gradient(140deg, #2a2340 0%, #1c2440 55%, #142235 100%);
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.08);
}
[data-theme="light"] .verse {
  color: #2b2338;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,200,120,.45), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(150,160,255,.40), transparent 60%),
    linear-gradient(140deg, #fff7ec 0%, #f3f0ff 60%, #eaf2ff 100%);
  border-color: rgba(60,40,90,.08);
}
.verse::before { content: "“"; position: absolute; top: -34px; right: 14px; font-family: var(--serif); font-size: 180px; line-height: 1; opacity: .12; }
.verse .label { font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; opacity: .75; display: flex; align-items: center; gap: 8px; }
.verse blockquote { margin: 12px 0 10px; font-family: var(--serif); font-size: 21px; line-height: 1.5; font-weight: 500; letter-spacing: .003em; text-wrap: pretty; }
.verse .ref { font-weight: 700; font-size: 15px; }
.verse .trans { font-size: 12.5px; opacity: .7; }
.verse .actions { display: flex; gap: 6px; margin-left: auto; }
.verse .actions button { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: inherit; display: grid; place-items: center; transition: background .15s; }
[data-theme="light"] .verse .actions button { background: rgba(60,40,90,.08); }
.verse .actions button:hover { background: rgba(255,255,255,.22); }
@media (min-width: 900px) { .verse { padding: 28px 30px 20px; } .verse blockquote { font-size: 24px; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s; }
.stat:active { transform: scale(.97); }
.stat .n { font-size: 26px; font-weight: 780; letter-spacing: -.03em; }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.today-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.today-item:last-child { border-bottom: 0; }
.today-item .em { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); flex: 0 0 auto; }
.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-strip img { aspect-ratio: 1; object-fit: cover; border-radius: 12px; width: 100%; background: var(--surface-2); }
.rsvp-mini { display: flex; gap: 6px; margin-top: 8px; }

/* ---------- Kalender ---------- */
.month { user-select: none; }
.month-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.month-head h3 { flex: 1; margin: 0; font-size: 18px; text-transform: none; letter-spacing: -.01em; color: var(--text); font-weight: 750; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-grid .dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.day {
  aspect-ratio: 1; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 6px 2px 4px; font-size: 15px; font-weight: 600; color: var(--text); position: relative; transition: background .15s; min-width: 0; overflow: hidden;
}
.day:hover { background: var(--surface-2); }
.day.other { color: var(--muted); }
.day.other .num { font-weight: 400; }
.day.today .num { background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.day.sel { background: var(--accent-soft); }
.day .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.day .dots { display: flex; gap: 3px; margin-top: 3px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--accent)); display: block; }
.day .evs { display: none; }
@media (min-width: 900px) {
  .month.big .day { aspect-ratio: auto; min-height: 104px; align-items: stretch; padding: 6px; text-align: left; }
  .month.big .day .num { width: 26px; height: 26px; font-size: 13.5px; }
  .month.big .day .dots { display: none; }
  .month.big .day .evs { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
  .month.big .day .evs span {
    font-size: 11.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background: color-mix(in srgb, var(--c, var(--accent)) 22%, transparent); color: var(--text); border-left: 3px solid var(--c, var(--accent));
  }
  .month.big .day .evs .more { background: none; border: 0; color: var(--muted); }
  .month.big .month-grid { gap: 6px; }
  .month.big .day { background: var(--surface-2); }
  .month.big .day.other { background: transparent; }
  .month.big .day.sel { outline: 2px solid var(--accent); background: var(--accent-soft); }
}
.agenda-day { margin-bottom: 16px; }
.agenda-day h4 { margin: 0 4px 8px; font-size: 14px; font-weight: 750; display: flex; gap: 8px; align-items: baseline; }
.agenda-day h4 small { color: var(--muted); font-weight: 500; }
.agenda-day h4.today { color: var(--accent); }
.ev { display: flex; gap: 12px; align-items: stretch; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; cursor: pointer; transition: transform .12s, background .15s; box-shadow: var(--shadow); }
.ev:hover { background: var(--surface-2); }
.ev:active { transform: scale(.985); }
.ev .bar { width: 4px; border-radius: 4px; background: var(--c, var(--accent)); flex: 0 0 auto; }
.ev .time { min-width: 50px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.ev .time small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.ev .t { font-weight: 650; }
.ev.special { background: linear-gradient(135deg, var(--warn-soft), transparent); }
.rsvp-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rsvp button { border: 2px solid var(--border-strong); background: var(--surface-2); border-radius: 14px; padding: 12px 6px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14.5px; transition: all .2s var(--ease); }
.rsvp button .e { font-size: 22px; }
.rsvp button.on.ja { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.rsvp button.on.vielleicht { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.rsvp button.on.nein { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.resp-group h4 { margin: 14px 0 6px; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.resp { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.resp .c { font-size: 14px; color: var(--text-2); background: var(--surface-2); padding: 6px 10px; border-radius: 4px 12px 12px 12px; margin-top: 4px; display: inline-block; }
.detail-hero { padding: 20px; border-radius: 22px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c, var(--accent)) 30%, var(--surface)), var(--surface)); border: 1px solid var(--border); }
.detail-hero h2 { margin: 0 0 10px; font-size: 24px; letter-spacing: -.02em; }
.detail-hero .facts { display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.detail-hero .facts div { display: flex; gap: 10px; align-items: center; }

/* ---------- Fotos ---------- */
.albums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .albums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .albums { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
.album { display: block; color: var(--text); cursor: pointer; }
.album .cover { aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow); position: relative; }
.album .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.album:hover .cover img { transform: scale(1.04); }
.album b { display: block; margin-top: 8px; font-size: 15.5px; }
.album small { color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
@media (min-width: 700px) { .photos { grid-template-columns: repeat(4, 1fr); gap: 6px; } }
@media (min-width: 1100px) { .photos { grid-template-columns: repeat(6, 1fr); } }
.photos button { border: 0; padding: 0; aspect-ratio: 1; background: var(--surface-2); cursor: zoom-in; overflow: hidden; position: relative; }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease), opacity .3s; }
.photos button:hover img { transform: scale(1.05); }
.photos .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 10px 0; }
.upload-progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); display: flex; flex-direction: column; animation: fadeIn .2s; touch-action: pan-y; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox .lb-top { display: flex; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; color: #fff; }
.lightbox .lb-top .icon-btn { color: #fff; }
.lightbox .lb-top .icon-btn:hover { background: rgba(255,255,255,.12); }
.lightbox .lb-stage { flex: 1; display: grid; place-items: center; position: relative; overflow: hidden; min-height: 0; }
.lightbox .lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s var(--ease), opacity .2s; user-select: none; -webkit-user-drag: none; }
.lightbox .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lightbox .nav-btn.prev { left: 16px; } .lightbox .nav-btn.next { right: 16px; }
@media (hover: none) { .lightbox .nav-btn { display: none; } }
.lightbox .lb-bottom { color: #eee; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); text-align: center; }
.lightbox .lb-bottom .caption { font-size: 16px; }
.lightbox .lb-bottom small { color: #aaa; }

/* ---------- Pinnwand ---------- */
.post { padding: 16px; }
.post .head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post .head b { display: block; }
.post .head small { color: var(--muted); }
.post .text { white-space: pre-wrap; word-wrap: break-word; font-size: 16px; }
.post .img { margin: 10px -16px 0; cursor: zoom-in; }
.post .img img { width: 100%; max-height: 520px; object-fit: cover; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.reactions button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 15px; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; transition: transform .15s, background .15s; }
.reactions button:active { transform: scale(.9); }
.reactions button.mine { border-color: var(--accent); background: var(--accent-soft); }
.reactions button span { font-size: 13px; font-weight: 700; color: var(--text-2); }
.reactions button.add { opacity: .7; }
.comments { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.comment { display: flex; gap: 8px; align-items: flex-start; }
.comment .bubble { background: var(--surface-2); padding: 8px 12px; border-radius: 4px 14px 14px 14px; font-size: 14.5px; }
.comment .bubble b { font-size: 13px; display: block; }
.pinned { color: var(--warn); font-weight: 600; }

/* ---------- Umfragen ---------- */
.poll-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--border-strong); margin-bottom: 8px; cursor: pointer; overflow: hidden; background: var(--surface-2); transition: border-color .2s; width: 100%; text-align: left; font-size: 15.5px; }
.poll-opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); transition: width .6s var(--ease); z-index: 0; }
.poll-opt > *:not(.fill) { position: relative; z-index: 1; }
.poll-opt.mine { border-color: var(--accent); }
.poll-opt .pct { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; }
.poll-opt .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: 0 0 auto; }
.poll-opt.multi .mark { border-radius: 6px; }
.poll-opt.mine .mark { background: var(--accent); border-color: var(--accent); color: #fff; }
.poll-opt:disabled { cursor: default; }

/* ---------- Challenges ---------- */
.progress { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress div { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ok), #8be0b8); transition: width .8s var(--ease); }
.lb { counter-reset: lb; }
.lb li { gap: 12px; }
.lb .rank { width: 28px; text-align: center; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb .rank.r1 { font-size: 22px; } .lb .rank.r2 { font-size: 20px; } .lb .rank.r3 { font-size: 19px; }
.lb .amount { font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.lb .bar { height: 6px; border-radius: 3px; background: var(--accent); opacity: .7; margin-top: 6px; }
.ch-emoji { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: var(--surface-2); flex: 0 0 auto; }

/* ---------- Mehr / Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; color: var(--text); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); transition: transform .15s, background .15s; min-height: 112px; }
.tile:hover { background: var(--surface-2); }
.tile:active { transform: scale(.97); }
.tile .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c, var(--accent)); }
.tile b { font-size: 16px; }
.tile small { color: var(--muted); font-size: 13px; margin-top: -6px; }

/* ---------- Familie ---------- */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.member { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; color: var(--text); transition: background .15s, transform .15s; box-shadow: var(--shadow); }
.member:hover { background: var(--surface-2); }
.member:active { transform: scale(.97); }
.member b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member small { color: var(--muted); font-size: 12.5px; }

/* ---------- Onboarding ---------- */
.onb { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }
.onb-card { width: min(460px, 100%); }
.onb .logo-big { width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 40%, transparent); }
.onb .logo-big svg { width: 40px; height: 40px; }
.onb h1 { text-align: center; margin: 0 0 6px; font-size: 28px; letter-spacing: -.025em; }
.onb p.lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.code-input { text-align: center; font-size: 22px !important; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px; margin: 0 -4px; }
.pick { border: 1.5px solid var(--border); background: var(--surface); border-radius: 18px; padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: all .15s; }
.pick:hover { border-color: var(--accent); background: var(--surface-2); }
.pick:active { transform: scale(.96); }
.pick b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick small { color: var(--muted); font-size: 11.5px; display: flex; gap: 3px; align-items: center; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-strong); transition: all .15s; }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; margin: 0 auto; }
.pin-pad button { height: 60px; border-radius: 18px; border: 0; background: var(--surface-2); font-size: 24px; font-weight: 650; cursor: pointer; transition: background .1s, transform .1s; }
.pin-pad button:active { transform: scale(.94); background: var(--surface-3); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Benachrichtigungen */
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 14px; cursor: pointer; transition: background .15s; align-items: flex-start; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--accent-soft); }
.notif.unread small { color: var(--text-2); }
.notif .em { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.notif b { display: block; font-size: 15px; }
.notif p { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.notif small { color: var(--muted); font-size: 12.5px; }

.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Konten & Gruppen ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px; width: 100%; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-pick button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 22px; cursor: pointer; transition: transform .15s, border-color .15s; }
.emoji-pick button.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); transform: scale(1.06); }
.group-list { display: flex; flex-direction: column; gap: 8px; }
.group-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; transition: background .15s, border-color .15s; }
.group-row:hover { background: color-mix(in srgb, var(--surface-2) 70%, var(--accent) 8%); }
.group-row.on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.group-row b { display: block; font-size: 15.5px; }
.group-row small { color: var(--muted); font-size: 12.5px; }
.group-row .check { color: var(--accent); display: grid; }
.group-row .count, .g-switch .count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 1px 7px; }
.g-emoji { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface); border: 1px solid var(--border); flex: none; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.row-btns .btn { flex: 1 1 160px; }
/* Gruppen-Schalter in der Seitenleiste (Desktop) */
.g-switch { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; margin: 0 0 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: background .15s; }
.g-switch:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--accent) 10%); }
.g-switch b { display: block; font-size: 15px; letter-spacing: -.01em; }
.g-switch small { color: var(--muted); font-size: 12px; }
.g-switch svg { color: var(--muted); flex: none; }
/* Gruppen-Schalter im Kopf (Handy) */
.g-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 46vw; padding: 6px 10px 6px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 650; cursor: pointer; flex: none; }
.g-chip span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.topbar .title-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar .title-wrap h1 { flex: none; }
@media (min-width: 900px) { .g-chip { display: none; } }
.invite-box { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--border)); }
.invite-box code { font-size: 20px; font-weight: 750; letter-spacing: .06em; flex: 1; }
.role-badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.scope-toggle { display: inline-flex; }
.danger-text { color: var(--danger, #ef4444) !important; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.member-row:last-child { border-bottom: 0; }
.member-row .grow { min-width: 0; }
.member-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 899px) { #themeBtn { display: none; } .topbar h1 { font-size: 21px; } }
.clamp2 { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.g-switch small { white-space: nowrap; }
.g-switch .count { padding: 0 6px; font-size: 11px; }
.topbar.chip-compact .g-chip .n { display: none; }
.topbar.chip-compact .g-chip { padding: 6px 8px; }
/* Erste Schritte */
.setup { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); margin-bottom: 14px; }
.setup-steps { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: transform .15s, background .15s; }
.setup-step:hover { transform: translateY(-1px); }
.setup-step .em { font-size: 22px; }
.setup-step b { display: block; font-size: 14.5px; }
.setup-step small { color: var(--muted); font-size: 12.5px; }
.setup-step.done { opacity: .6; }
.setup-step.done b { text-decoration: line-through; }
/* Wunschlisten */
.wish-hero { background: linear-gradient(135deg, color-mix(in srgb, #f472b6 18%, var(--surface)), var(--surface)); }
.wish-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; background: color-mix(in srgb, #f472b6 22%, transparent); }
.wish-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wish-list .card { margin: 0; }
.wish .title { font-weight: 680; font-size: 16px; }
.wish a.small { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.wish-act { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.wish.taken { background: transparent; }
.wish.taken .title { color: var(--text-2); }

/* Countdown zu großen Ereignissen */
.countdowns { display: grid; gap: 10px; margin-bottom: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.countdown { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 16px; color: inherit; text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface)); }
.countdown .n { min-width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; font-weight: 800;
  background: var(--accent); color: var(--accent-ink, #fff); font-variant-numeric: tabular-nums; }
.countdown b { font-size: 16px; }
.feedbox { word-break: break-all; font-family: ui-monospace, monospace; font-size: 12.5px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2, rgba(127,127,127,.12)); }
.steps-ol { margin: 6px 0 0 18px; padding: 0; line-height: 1.55; }
@media (min-width: 900px) { .mobile-only { display: none !important; } }

/* Essensplan & Rezepte */
.segmented.sub { background: transparent; border-color: transparent; padding: 0; }
.segmented.sub a { border: 1px solid var(--border); }
.week-head { margin: 0 0 12px; }
.meal-week { display: grid; gap: 10px; }
@media (min-width: 700px) { .meal-week { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.meal-day { margin: 0; padding: 10px 12px 12px; }
.meal-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.meal-day.past { background: transparent; box-shadow: none; }
.meal-day.past .md-head b { color: var(--muted); }
.md-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.md-head span:not(.tag) { color: var(--muted); font-size: 13.5px; }
.meal-slot { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1.5px dashed var(--border-strong); background: transparent; color: inherit;
  border-radius: 12px; padding: 9px 12px; margin-top: 6px; cursor: pointer; font: inherit; min-height: 48px; }
.meal-slot.set { border-style: solid; border-color: var(--border); background: var(--surface-2); }
.meal-slot:hover { border-color: var(--accent); }
.meal-slot .sl { font-size: 18px; }
.meal-slot .mt { display: block; font-weight: 650; }
.meal-slot small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.recipe-pick { display: flex; flex-wrap: wrap; gap: 8px; max-height: 34vh; overflow-y: auto; }
.rpick { border: 1.5px solid var(--border); background: var(--surface-2); color: inherit; border-radius: 999px; padding: 8px 13px; font: inherit; font-size: 14.5px; cursor: pointer; }
.rpick.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.recipe { margin: 0; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; padding: 14px; transition: transform .15s, border-color .15s; }
.recipe:hover { border-color: var(--accent); }
.recipe:active { transform: scale(.98); }
.recipe .re { font-size: 34px; line-height: 1.1; margin-bottom: 4px; }
.recipe small { font-size: 12.5px; }
.recipe-hero { text-align: center; }
.recipe-hero .row { justify-content: center; }
.re-big { font-size: 56px; line-height: 1; margin-bottom: 6px; }
.ingr { list-style: none; margin: 10px 0 14px; padding: 0; }
.ingr li label { display: flex; gap: 12px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ingr li:last-child label { border-bottom: 0; }
.ingr input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.ingr input:not(:checked) + span { color: var(--muted); text-decoration: line-through; }
.steps-text { white-space: pre-wrap; line-height: 1.6; }

/* Suche */
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; padding: 4px 6px 4px 14px; margin-bottom: 6px; color: var(--muted); }
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-bar input[type=search] { border: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0; font-size: 17px; }
.s-hit { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; width: 100%; min-height: 52px; }
.s-hit .title { display: block; }
.s-hit .meta { display: block; }
.s-lead { width: 34px; height: 34px; display: grid; place-items: center; font-size: 19px; flex: none; }
.s-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
mark { background: var(--warn-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Automatischer Geburtstagsgruß */
.post.bday-post { background: linear-gradient(140deg, color-mix(in srgb, var(--warn) 18%, var(--surface)) 0%, var(--surface) 55%, color-mix(in srgb, var(--accent-2) 14%, var(--surface)) 100%); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.post.bday-post .text { font-size: 17px; }
.bday-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--warn-soft); flex: none; }

/* Barrierefreiheit: sichtbarer Tastatur-Fokus, Sprunglink */
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.content:focus { outline: none; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 12px; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }

/* Kontrast: Initialen auf hellen Personenfarben dunkel, helle Tags im Light-Mode dunkler */
.avatar.dark-ink { color: #111318; text-shadow: none; }
[data-theme="light"] .tag.warn { color: #865300; }
[data-theme="light"] .tag.ok { color: #08734a; }
[data-theme="light"] .tag.danger { color: #b81d30; }
[data-theme="light"] .tag.accent { color: #3a48c9; }
/* Handy-Startseite: Begrüßung ist die Überschrift – „Start“ nur für Screenreader, Platz für den Gruppen-Wechsler */
@media (max-width: 899px) {
  .topbar:not(.chip-compact) #pageTitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .topbar:not(.chip-compact) .g-chip { margin-left: 0; margin-right: auto; }
}
.bring li { gap: 10px; }
.bring li.taken .title { color: var(--text-2); }

/* Einkauf: Sortierung nach Supermarkt-Abteilung */
.sort-toggle { display: inline-flex; gap: 4px; margin: -2px 0 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.sort-toggle button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 650; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.sort-toggle button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.aisle + .aisle { margin-top: 6px; }
.aisle-h { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.aisle-h .muted { font-weight: 600; margin-left: 2px; }

/* Familien-Infos */
.info-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.info-grid .card { margin: 0; }
.info-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); flex: 0 0 auto; }
.card.info h3 { text-transform: none; letter-spacing: 0; font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.25; }
.info h3 .tag { vertical-align: middle; padding: 2px 6px; }
.kv { margin: 12px 0 0; display: grid; gap: 2px; }
.kv-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); min-height: 40px; }
.kv-row:first-child { border-top: 0; }
.kv-row dt { color: var(--muted); font-size: 13.5px; width: 34%; flex: 0 0 auto; overflow-wrap: anywhere; }
.kv-row dd { margin: 0; flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; }
.kv-row dd .v { flex: 1; min-width: 0; }
.kv-row.text dd { font-weight: 450; color: var(--text-2); }
.kv-row dd .icon-btn { flex: 0 0 auto; }
.masked { letter-spacing: .12em; color: var(--muted); }
@media (max-width: 520px) { .info .reveal span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .info .reveal { padding: 8px 10px; } }

/* Dienste */
.chore .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.chore-who { display: inline-flex; align-items: center; gap: 6px; }
.chore.mine .chore-who b { color: var(--accent); }
.chore.done .title { text-decoration: line-through; color: var(--muted); }
.pick-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.pm { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; min-width: 0; }
.pm.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.pm .ellipsis { flex: 1; min-width: 0; }
.pm-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 750; }

/* Offline-Hinweis */
.offline-bar { margin: 0 16px 8px; padding: 9px 14px; border-radius: 12px; background: color-mix(in srgb, #f59e0b 16%, var(--surface)); border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent); color: var(--text); font-size: 13.5px; font-weight: 600; }
.offline-bar[hidden] { display: none; }
.linkish { background: none; border: 0; padding: 6px 4px; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.reset-code { font-size: 30px; font-weight: 800; letter-spacing: .12em; text-align: center; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border); font-variant-numeric: tabular-nums; user-select: all; }
.btn.going { margin: -4px 0 14px; border: 1px dashed var(--border); }
.btn.wrap-text { white-space: normal; text-align: center; line-height: 1.3; height: auto; min-height: 44px; padding-block: 9px; }
.poll-opt .avatars .more { color: var(--text-2); }

/* Checklisten */
.cl-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cl-grid .card { margin: 0; }
.cl-card { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.cl-card:hover { border-color: var(--accent); }
.progress.sm { height: 8px; }
.list-tabs a { white-space: nowrap; }
@media (max-width: 420px) { .list-tabs a { font-size: 13px; padding-left: 4px; padding-right: 4px; } }
@media (max-width: 370px) { .list-tabs .seg-ic { display: none; } }
/* Sehr schmale Handys: lange Knopftexte umbrechen statt überstehen */
.btn { max-width: 100%; }
@media (max-width: 380px) { .btn { white-space: normal; text-align: center; line-height: 1.25; } }
.tile { min-width: 0; overflow-wrap: anywhere; }
.cl-title { font-weight: 650; font-size: 16px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-head { margin: 0; font-size: 20px; line-height: 1.25; }
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; text-align: left; padding: 8px 8px 8px 18px; }
.toast-action { white-space: nowrap; flex: 0 0 auto; border: 0; background: transparent; color: #b4bcff; font: inherit; font-weight: 750; padding: 8px 12px; border-radius: 10px; cursor: pointer; min-height: 40px; }
[data-theme=dark] .toast-action { color: #5b4bd6; }
.toast-action:hover { background: color-mix(in srgb, var(--bg) 85%, var(--text)); }
/* Infos: in schmalen Karten (z. B. 3 Spalten am Desktop) nur das Augen-Symbol zeigen, damit der Titel Platz hat */
.info-grid .card.info { container-type: inline-size; }
@container (max-width: 380px) { .info .reveal span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .info .reveal { padding: 8px 10px; } }

/* ===== Große Tippflächen auf Touch-Geräten (mind. 44 × 44 px, auch für ältere Familienmitglieder) ===== */
.check { position: relative; }
.check::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; } /* unsichtbar größere Tippfläche */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .check { width: 32px; height: 32px; }
  .check::after { inset: -10px; }
  .btn.sm { min-height: 44px; }
  .g-chip { min-height: 44px; }
  .chip.plain[data-sugg], .chip.plain[data-preset], button.chip { min-height: 40px; padding: 6px 14px; font-size: 14px; }
  .segmented button, .segmented a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .sort-toggle button { min-height: 38px; padding: 6px 14px; }
  .swatch { width: 44px; height: 44px; }
  .reactions button { min-height: 40px; padding: 6px 12px; }
  .card h3 a.more { padding: 10px 4px; margin: -10px 0; }
  .maplink { min-height: 40px; }
}
.maplink { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: 14px; text-decoration: none; }
/* Ganze Zeile antippbar (Einkauf, Checklisten) */
.list li .grow[data-toggle-row] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) {
  .info .reveal { min-width: 44px; }
  label.row:has(> input[type=checkbox]) { min-height: 44px; }
  .comment .del-btn { width: 40px; height: 40px; }
}
.segmented a, .segmented button { gap: 5px; }
/* Schriftgröße „Groß“ / „Sehr groß“ (Einstellungen): ganze Oberfläche gleichmäßig vergrößern */
html[data-size="l"] { zoom: 1.12; }
html[data-size="xl"] { zoom: 1.22; }
html[data-size] .list-tabs .seg-ic { display: none; }
html[data-size="xl"] .list-tabs a { font-size: 13px; padding-left: 3px; padding-right: 3px; }
.list-tabs { overflow-x: auto; scrollbar-width: none; }
.list-tabs::-webkit-scrollbar { display: none; }
.tabbar a { min-width: 0; }
.tabbar a .pill { max-width: calc(100% - 6px); }
.info-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.cl-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.g-switch small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-size] .btn { white-space: normal; text-align: center; line-height: 1.25; }
@media (max-width: 480px) { html[data-size="xl"] .list-tabs a { font-size: 12.5px; } }
/* Hilfe & Tipps */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq .card { margin: 0; padding: 0; }
.faq summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 56px; cursor: pointer; font-weight: 650; font-size: 16px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '›'; font-size: 26px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(90deg); }
.faq-ic { font-size: 22px; width: 32px; text-align: center; }
.faq-a { padding: 0 16px 14px 60px; font-size: 15.5px; line-height: 1.55; color: var(--text-2); }
.faq-a p { margin: 0 0 8px; } .faq-a ol { margin: 0 0 8px; padding-left: 20px; } .faq-a li { margin-bottom: 4px; }
@media (max-width: 420px) { .faq-a { padding-left: 16px; } }
.linkish.small { font-size: 15px; min-height: 44px; padding: 10px 8px; }

/* Unterseiten auf schmalen Handys: Platz für den Titel statt Gruppen-Knopf (Wechseln geht auf den Hauptseiten) */
@media (max-width: 480px) { .topbar.has-back .g-chip { display: none; } }
.rsvp-mini { width: 100%; flex-wrap: wrap; }
.rsvp-mini .btn { flex: 1 1 auto; white-space: nowrap; padding-inline: 10px; }
/* Sehr kleine Handys: „Sehr groß“ etwas zurücknehmen, damit nichts aus dem Bild ragt */
@media (max-width: 340px) { html[data-size="xl"] { zoom: 1.1; } html[data-size="l"] { zoom: 1.06; } }
/* Links in Wünschen/Infos: größere Tippfläche, ohne das Layout zu verschieben */
.ext-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
@media (pointer: coarse) { .ext-link { min-height: 44px; } }
/* Zwei Felder nebeneinander: nie breiter als das Formular; Datumsfelder bei großer Schrift untereinander */
.form .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.form .two input, .form .two select { min-width: 0; width: 100%; }
@media (max-width: 480px) { html[data-size="xl"] .form .two:has(input[type="date"]), html[data-size="l"] .form .two:has(input[type="date"]) { grid-template-columns: minmax(0, 1fr); } }
/* Handy-Kopfzeile: Platz für den Titel */
@media (max-width: 599px) {
  .topbar.chip-compact .g-chip svg { display: none; }
  .topbar.chip-compact .g-chip { min-width: 44px; justify-content: center; padding: 6px; }
  .topbar h1.two-line { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.12; }
}
/* Große Schrift: Kopfzeile wächst nur wenig mit (die Symbole sind schon groß genug) */
@media (max-width: 899px) {
  html[data-size="l"] .topbar { zoom: .95; }
  html[data-size="xl"] .topbar { zoom: .88; }
}
@media (max-width: 400px) { .topbar { gap: 4px; padding-right: 8px; } }
/* Große Schrift: Kalendertage dürfen höher werden, damit die Termin-Punkte sichtbar bleiben */
html[data-size="l"] .month:not(.big) .day, html[data-size="xl"] .month:not(.big) .day { aspect-ratio: auto; min-height: 46px; padding-top: 4px; }
@media (max-width: 899px) { html[data-size="l"] .month .day, html[data-size="xl"] .month .day { aspect-ratio: auto; min-height: 46px; padding-top: 4px; } }
.onb-size { display: block; margin: 14px auto 0; color: var(--text-2); }
.onb-size b { color: var(--text); }
.onb { align-content: center; }
/* Großer Monatskalender: wenn die Spalten zu schmal werden (z. B. große Schrift), Punkte statt abgeschnittener „1…“-Einträge */
.month.big { container-type: inline-size; }
@container (max-width: 500px) {
  .month.big .day .evs { display: none !important; }
  .month.big .day .dots { display: flex !important; }
  .month.big .day { min-height: 58px !important; align-items: center !important; }
}
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { min-width: 0; overflow-wrap: break-word; }
/* Große Schrift auf kleineren Laptops: zweispaltige Seiten untereinander */
@media (max-width: 1279px) { html[data-size="xl"] .split, html[data-size="l"] .split { grid-template-columns: minmax(0, 1fr); } }
.topbar h1 { min-width: 0; } .main-col { min-width: 0; }
/* Sehr große Schrift: „Weitergeben“ steckt im Antipp-Menü des Dienstes – Symbol ausblenden, mehr Platz für den Text */
@media (max-width: 480px) { html[data-size="xl"] li.chore [data-cskip] { display: none; } }
/* Sehr große Schrift: in Umfragen nur die Zahl statt Gesichter-Stapel – mehr Platz für Datum/Antwort */
@media (max-width: 480px) { html[data-size="xl"] .poll-opt .row > :first-child:not(.pct) { display: none; } }
.tag.when-inline, .when-wrap { display: none; }
@media (max-width: 480px) { html[data-size="xl"] .tag.when-side, html[data-size="l"] .tag.when-side { display: none; } html[data-size="xl"] .tag.when-inline, html[data-size="l"] .tag.when-inline { display: inline-flex; } html[data-size="xl"] .when-wrap, html[data-size="l"] .when-wrap { display: block; } }
/* Sehr große Schrift auf dem Handy: Knöpfe rutschen unter den Text, statt ihn zusammenzuquetschen */
@media (max-width: 480px) {
  html:is([data-size="xl"], [data-size="l"]) .card.info > header { flex-wrap: wrap; }
  html:is([data-size="xl"], [data-size="l"]) .card.info > header h3 { flex: 1 1 7em; }
  html:is([data-size="xl"], [data-size="l"]) .card.info > header .tag.accent { display: none; }
  html:is([data-size="xl"], [data-size="l"]) .list li:has([data-unres]) { flex-wrap: wrap; }
  html:is([data-size="xl"], [data-size="l"]) .list li:has([data-unres]) .grow { flex: 1 1 60%; }
  html:is([data-size="xl"], [data-size="l"]) .list li [data-unres] { margin-left: auto; }
}
@media (max-width: 480px) { html:is([data-size="xl"], [data-size="l"]) .card.info > header h3 + * { margin-left: auto; } }
/* Keine einzelnen Wörter allein in der letzten Zeile */
p, h2, h3, .title, .hello p { text-wrap: pretty; }
@media (max-width: 480px) { html[data-size="xl"] .stat, html[data-size="l"] .stat { padding: 10px 8px; } html[data-size="xl"] .stat .l, html[data-size="l"] .stat .l { font-size: 12px; } }
/* Große Schrift auf dem Handy: Infos als „Bezeichnung über Wert“, Gruppen-Knopf unter den Namen */
@media (max-width: 480px) {
  html[data-size="xl"] .kv-row, html[data-size="l"] .kv-row { flex-wrap: wrap; row-gap: 0; }
  html[data-size="xl"] .kv-row dt, html[data-size="l"] .kv-row dt { width: 100%; }
  html[data-size="xl"] .kv-row dd .v, html[data-size="l"] .kv-row dd .v { overflow-wrap: break-word; }
  html:is([data-size="xl"], [data-size="l"]) .group-row { flex-wrap: wrap; }
  html:is([data-size="xl"], [data-size="l"]) .group-row > .grow { flex: 1 1 60%; }
  html:is([data-size="xl"], [data-size="l"]) .group-row > [data-act] { margin-left: auto; }
}
@media (max-width: 480px) { .members { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .members > * { min-width: 0; overflow-wrap: break-word; } }
/* Sehr große Schrift: Anheften/Löschen untereinander, damit der Name Platz hat */
@media (max-width: 480px) { html:is([data-size="xl"], [data-size="l"]) .post .head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 10px; } html:is([data-size="xl"], [data-size="l"]) .post .head > :not(.icon-btn) { grid-row: span 2; } html:is([data-size="xl"], [data-size="l"]) .post .head > .icon-btn { grid-column: 3; } }
@media (min-width: 900px) { .tip-card .btn.block { width: auto; display: inline-flex; margin-left: 40px; } }
@media (max-width: 480px) { html:is([data-size="xl"], [data-size="l"]) .segmented button:has(> .seg-ic) { flex-direction: column; gap: 2px; } }
#size button { padding-inline: 4px; min-width: 0; line-height: 1.1; }

/* Große Schrift: Admin-Hinweis unter den Namen statt daneben; Einträge aus anderen Gruppen umbrechen statt abschneiden */
.role-inline { display: none; }
@media (max-width: 480px) {
  html:is([data-size="xl"], [data-size="l"]) .role-side { display: none; }
  html:is([data-size="xl"], [data-size="l"]) .role-inline { display: inline; }
}
html:is([data-size="xl"], [data-size="l"]) .today-item .ellipsis { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; }
/* Große Schrift: Namen lieber auf zwei Zeilen als mit „…“ abgeschnitten */
html:is([data-size="xl"], [data-size="l"]) #content :is(.ellipsis, .cl-title) {
  white-space: normal; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
html:is([data-size="xl"], [data-size="l"]) #content .today-item .ellipsis { -webkit-line-clamp: 3; }
html:is([data-size="xl"], [data-size="l"]) #content .g-switch small { display: block; white-space: normal; overflow: visible; text-overflow: clip; }
.invite-box { flex-wrap: wrap; } .invite-box code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Anmeldung: erster Eindruck ---------- */
.onb { position: relative; isolation: isolate; overflow: hidden; }
.onb::before {
  content: ""; position: fixed; inset: -20vh -20vw; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 30vmax at 15% 5%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(36vmax 28vmax at 90% 20%, color-mix(in srgb, #ec4899 18%, transparent), transparent 70%),
    radial-gradient(40vmax 30vmax at 60% 105%, color-mix(in srgb, #14b8a6 16%, transparent), transparent 70%);
}
[data-theme="light"] .onb::before { opacity: .75; }
.onb .logo-big { background: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, color-mix(in srgb, var(--accent-2) 70%, #f0abfc)); box-shadow: 0 18px 44px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 1px 0 rgba(255,255,255,.35); }
.onb .logo-big svg { width: 44px; height: 44px; }
.onb h1 { font-size: 30px; }
.onb p.lead { margin-bottom: 14px; }
.onb-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 22px; }
.onb-pills span { font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 4px 9px; white-space: nowrap; border-radius: 999px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); }
.onb-card > form, .onb-card > .card { box-shadow: var(--shadow-lg); }
.onb-hero { display: none; }
@media (min-width: 960px) {
  .onb { grid-template-columns: minmax(0, 500px) minmax(0, 440px); column-gap: clamp(48px, 7vw, 110px); justify-content: center; align-content: center; }
  .onb > [data-size-cycle] { grid-column: 2; }
  .onb-pills { display: none; }
  .onb-hero { display: block; grid-row: 1 / span 2; align-self: center; position: relative; }
  .onb-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -.01em; color: var(--text-2); margin-bottom: 22px; }
  .onb-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
  .onb-mark svg { width: 22px; height: 22px; }
  .onb-hero h2 { font-size: 40px; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 28px; text-wrap: balance;
    background: linear-gradient(120deg, var(--text) 30%, color-mix(in srgb, var(--accent) 70%, var(--text))); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .onb-feat { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
  .onb-feat li { display: flex; gap: 14px; align-items: center; }
  .onb-feat .fi { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; display: grid; place-items: center; font-size: 21px;
    background: color-mix(in srgb, var(--c) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
  .onb-feat b { display: block; font-size: 16px; }
  .onb-feat small { color: var(--muted); font-size: 14px; }
  .onb-float { position: relative; height: 120px; margin-top: 30px; }
  .onb-float .mini { position: absolute; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); }
  .onb-float .mini > span { font-size: 24px; }
  .onb-float .mini b { display: block; font-size: 14px; } .onb-float .mini small { color: var(--muted); font-size: 12.5px; }
  .onb-float .m1 { left: 0; top: 0; transform: rotate(-2deg); }
  .onb-float .m2 { left: 190px; top: 46px; transform: rotate(1.5deg); }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 960px) {
  .onb-float .m1 { animation: floaty 6s ease-in-out infinite; } .onb-float .m2 { animation: floaty 7s ease-in-out -2s infinite; }
  @keyframes floaty { 50% { translate: 0 -6px; } }
}
@media (max-width: 430px) { .onb-pills span:nth-child(4) { display: none; } }

/* ---------- Feinschliff Optik ---------- */
/* Ganz sanftes Farblicht oben – gibt der App Tiefe, ohne zu stören */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 20% 0%, var(--glow-a), transparent 70%), radial-gradient(50% 90% at 95% 0%, var(--glow-b), transparent 70%);
}
.card h3 > svg.i, .section-title > svg.i { color: var(--accent); opacity: .9; }
.tabbar a.active .pill { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 18%, transparent)); }
.album .cover { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.06); }
.album .cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); pointer-events: none; }
.album b { margin-top: 10px; letter-spacing: -.01em; }
.album.featured { grid-column: span 2; }
.album.featured .cover { aspect-ratio: 2 / 1; }
@media (max-width: 699px) { .album.featured .cover { aspect-ratio: 16 / 10; } }
.album.featured .cap { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.62)); color: #fff; display: grid; justify-items: start; gap: 2px; }
.album.featured .cap b { margin: 0; font-size: 20px; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.album.featured .cap small { color: rgba(255,255,255,.85); font-size: 13px; }
.album.featured .cap .tag { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-bottom: 6px; }
@media (min-width: 700px) { .album.featured { display: flex; } .album.featured .cover { flex: 1; aspect-ratio: auto; min-height: 220px; } }
.album.featured .cover img { position: absolute; inset: 0; }
.agenda-day h4 { font-size: 15px; letter-spacing: -.01em; }
.agenda-day h4.today::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); align-self: center; margin-right: 2px; }
.detail-hero { position: relative; box-shadow: var(--shadow); overflow: hidden; }
.detail-hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--accent)) 35%, transparent), transparent 70%); pointer-events: none; }
.detail-hero.has-tile h2 { padding-right: 72px; }
.date-tile { position: absolute; top: 18px; right: 18px; z-index: 1; width: 58px; border-radius: 14px; overflow: hidden; text-align: center; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--border); }
.date-tile span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: color-mix(in srgb, var(--c, var(--accent)) 72%, #000); padding: 3px 0; }
.date-tile b { display: block; font-size: 24px; line-height: 1.25; padding: 2px 0 4px; letter-spacing: -.02em; }
.hello p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.today-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }
.today-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.month.big .day.today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
@media (min-width: 900px) { .photos { gap: 8px; border-radius: 0; overflow: visible; } .photos button { border-radius: 12px; box-shadow: var(--shadow); } }
[data-theme="light"] .today-pill { color: #3442b8; }
.sidebar .g-switch small { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }

/* ===== Admin-Panel & App-weiter Hinweis ===== */
.app-banner { display: flex; align-items: center; gap: 12px; margin: 10px 16px 0; padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); color: var(--text); font-size: 14.5px; line-height: 1.4; }
.app-banner .emoji { font-size: 20px; flex: none; }
.app-banner.warn { border-color: color-mix(in srgb, #f59e0b 45%, transparent); background: color-mix(in srgb, #f59e0b 14%, transparent); }
.app-banner.success { border-color: color-mix(in srgb, #22c55e 45%, transparent); background: color-mix(in srgb, #22c55e 13%, transparent); }
.app-banner .icon-btn { flex: none; }
@media (min-width: 900px) { .app-banner { margin: 12px 28px 0; } }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 14px; padding: 2px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-weight: 650; font-size: 14px; min-height: 40px; }
.admin-tabs a.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.admin-sum li a { display: flex; align-items: center; gap: 10px; width: 100%; color: inherit; min-height: 44px; }
.admin-sum li a svg { color: var(--muted); flex: none; }
.swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--c); display: inline-block; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.swatch-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c, conic-gradient(red, yellow, lime, cyan, blue, magenta, red)); cursor: pointer; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); position: relative; overflow: hidden; padding: 0; min-height: 0; }
.swatch-btn.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px var(--text); }
.swatch-btn.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.admin-preview { padding: 12px; border-radius: 12px; border: 1px dashed var(--border); margin: 4px 0 12px; }
.logo-prev img { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; display: block; box-shadow: var(--shadow); }
.admin-mod { min-height: 48px; border-bottom: 1px solid var(--border); }
.admin-mod:last-child { border-bottom: 0; }
.text-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.text-row:last-child { border-bottom: 0; }
.text-row.changed input { border-color: var(--accent); }
.text-row code, .admin-sum code { font-size: 11.5px; }
.verse-list li { gap: 10px; align-items: center; padding: 10px 0; }
.verse-list li.off { opacity: .55; }
.rule { gap: 6px; align-items: center; }
.audit li { padding: 10px 0; }
.pick-bar { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--text); color: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: 14px; width: max-content; max-width: calc(100vw - 24px); }
@media (min-width: 900px) { .pick-bar { bottom: 24px; } }
.picking body *:not(.pick-bar, .pick-bar *, .sheet, .sheet *):hover { outline: 2px dashed var(--accent); outline-offset: 2px; cursor: text; }
.app-logo-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.onb .logo-big:has(img), .onb-mark:has(img) { overflow: hidden; padding: 0; }

/* ===== Neu seit deinem letzten Besuch ===== */
.neu-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 60%); }
.neu-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count-pill { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 12px; font-weight: 750; padding: 1px 8px; letter-spacing: 0; }
.neu-list li.neu-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; min-height: 56px; }
.neu-lead { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); overflow: hidden; color: inherit; }
.neu-lead img { width: 100%; height: 100%; object-fit: cover; }
.neu-head { display: block; color: var(--text); font-weight: 650; line-height: 1.3; }
.neu-cta { flex: none; white-space: nowrap; }
@media (max-width: 560px) { .neu-list li.neu-item { flex-wrap: wrap; row-gap: 8px; } .neu-list li.neu-item > .grow { flex: 1 1 calc(100% - 60px); } .neu-cta { margin-left: 56px; } }

/* App-Name (Admin-Panel): PC in der Seitenleiste, Handy auf der Startseite über dem Gruppen-Wechsler */
.brand { display: none; }
@media (min-width: 900px) {
  .sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
  .brand-logo { width: 32px; height: 32px; border-radius: 9px; flex: none; object-fit: cover; }
  .brand-name { font-weight: 750; font-size: 16px; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
}
.topbar .title-wrap { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.topbar .title-wrap h1 { flex: 1; min-width: 0; }
.app-name { display: none; }
@media (max-width: 899px) {
  .topbar:not(.chip-compact) .title-wrap { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
  .topbar:not(.chip-compact) .app-name { display: flex; align-items: center; gap: 7px; max-width: 100%; font-weight: 750; font-size: 16px; letter-spacing: -.01em; line-height: 1.15; }
  .app-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app-name-logo { width: 22px; height: 22px; border-radius: 6px; flex: none; object-fit: cover; }
  .topbar:not(.chip-compact) .g-chip { min-height: 30px; padding: 2px 9px 2px 7px; font-size: 12.5px; max-width: 100%; }
  .topbar.chip-compact .title-wrap h1 { order: 0; }
}
/* Sprache auf der Anmeldeseite (DE | RU) */
.onb-card { position: relative; }
.onb-lang { position: absolute; top: 12px; right: 12px; margin: 0; padding: 3px; font-size: 13px; }
.onb-lang button { min-width: 40px; padding: 4px 10px; font-weight: 700; }

/* ---------- Automatisch übersetzte Inhalte ---------- */
[data-ut].ut-on:not([data-ut="b"])::after { content: " 🌐" / ""; font-size: .72em; opacity: .55; }
.ut-toggle { display: block; margin: 4px 0 0; padding: 2px 0; background: none; border: 0; color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; min-height: 24px; }
.ut-toggle:hover { color: var(--accent); }
