/* ─── Grundlagen & Farben ──────────────────────────────────────── */
:root {
  --chris: #3B82F6;
  --iana: #EC4899;

  --bg: #f2f3f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-sunken: #e9eaef;
  --glass: rgba(242, 243, 247, 0.72);
  --text: #16181d;
  --text-2: #5b606b;
  --text-3: #9aa0ab;
  --border: rgba(20, 24, 34, 0.07);
  --border-strong: rgba(20, 24, 34, 0.12);
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --shadow-sm: 0 1px 2px rgba(20, 24, 34, 0.06);
  --shadow-card: 0 2px 10px rgba(20, 24, 34, 0.05);
  --shadow-lg: 0 12px 40px rgba(20, 24, 34, 0.14);
  --shadow-fab: 0 10px 28px rgba(37, 99, 235, 0.4);
  --radius: 16px;
  --radius-sm: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0b0f;
    --surface: #17191f;
    --surface-2: #1e2027;
    --surface-sunken: #101218;
    --glass: rgba(10, 11, 15, 0.7);
    --text: #f5f6f8;
    --text-2: #a7adba;
    --text-3: #6a707c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --accent: #4B93FF;
    --accent-soft: rgba(75, 147, 255, 0.16);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
select { -webkit-appearance: none; appearance: none; }
.hidden { display: none !important; }

/* dekorativer Hintergrund */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.5; }
.blob.b1 { width: 320px; height: 320px; top: -80px; right: -80px; background: var(--chris); opacity: 0.28; }
.blob.b2 { width: 300px; height: 300px; bottom: 40px; left: -100px; background: var(--iana); opacity: 0.22; }
@media (prefers-color-scheme: dark) { .blob.b1 { opacity: 0.22; } .blob.b2 { opacity: 0.18; } }

/* ─── Onboarding ───────────────────────────────────────────────── */
.onboarding { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.onboarding-card { text-align: center; max-width: 340px; width: 100%; }
.onboarding-logo {
  width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 24px;
  background: linear-gradient(140deg, var(--chris), var(--iana)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 42px;
  box-shadow: var(--shadow-lg);
}
.onboarding-card h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.onboarding-card p { color: var(--text-2); margin-bottom: 30px; font-size: 16px; }
.who-buttons { display: flex; flex-direction: column; gap: 12px; }
.who-btn {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
  font-size: 18px; font-weight: 600; color: var(--text); transition: transform 0.12s ease;
}
.who-btn:active { transform: scale(0.97); }
.who-avatar { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; }
.who-btn .ti-chevron-right { margin-left: auto; color: var(--text-3); font-size: 20px; }

/* ─── Kopfbereich ──────────────────────────────────────────────── */
.app { min-height: 100%; padding-bottom: calc(96px + var(--safe-bottom)); }
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: calc(12px + var(--safe-top)) 18px 10px; border-bottom: 1px solid var(--border);
}
.header-top { display: flex; align-items: flex-start; justify-content: space-between; }
.header-sub { font-size: 13px; color: var(--text-3); font-weight: 600; letter-spacing: 0.01em; }
.header-title h1 { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.avatars { display: flex; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; border: 2.5px solid var(--bg); box-shadow: var(--shadow-sm); }
.avatar + .avatar { margin-left: -12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--text-2); box-shadow: var(--shadow-sm); }
.icon-btn:active { background: var(--surface-sunken); }

.segmented { position: relative; display: flex; margin-top: 15px; background: var(--surface-sunken); border-radius: 12px; padding: 4px; }
.seg-indicator { position: absolute; top: 4px; left: 4px; height: calc(100% - 8px); width: calc((100% - 8px) / 3); background: var(--surface); border-radius: 9px; box-shadow: var(--shadow-sm); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
.seg-btn { position: relative; z-index: 1; flex: 1; text-align: center; padding: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: color 0.2s; }
.seg-btn.active { color: var(--text); }

.month-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.nav-btn { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 21px; color: var(--text-2); }
.nav-btn:active { background: var(--surface-sunken); }
.range-label { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; padding: 4px 10px; border-radius: 10px; }
.range-label:active { background: var(--surface-sunken); }

/* ─── Hinweis-Banner ───────────────────────────────────────────── */
.notify-banner {
  display: flex; align-items: center; gap: 11px; margin: 12px 18px 0; padding: 12px 14px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(236, 72, 153, 0.1));
  border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-card);
  font-size: 14px; animation: slideDown 0.35s ease;
}
.nb-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.nb-text { flex: 1; color: var(--text); }
.nb-text strong { font-weight: 700; }
.notify-close { color: var(--text-3); font-size: 18px; display: flex; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ─── Ansichten ────────────────────────────────────────────────── */
.view-container { padding: 14px 18px 0; }

/* nächster Termin – Hero */
.next-hero {
  border-radius: 20px; padding: 16px 18px; margin-bottom: 18px; color: #fff;
  background: linear-gradient(135deg, var(--nh-color), var(--nh-color2));
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.next-hero .nh-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.next-hero .nh-title { font-size: 21px; font-weight: 700; margin: 4px 0 6px; letter-spacing: -0.01em; }
.next-hero .nh-meta { display: flex; align-items: center; gap: 14px; font-size: 14px; opacity: 0.92; flex-wrap: wrap; }
.next-hero .nh-meta span { display: inline-flex; align-items: center; gap: 5px; }
.next-hero .nh-count { position: absolute; top: 14px; right: 16px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,0.22); padding: 5px 11px; border-radius: 20px; }
.next-hero .nh-cat { position: absolute; bottom: -12px; right: -8px; font-size: 92px; opacity: 0.14; }

/* Monatsansicht */
.weekday-row { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 8px; }
.weekday-row span { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.03em; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-cell { aspect-ratio: 1 / 1.12; border-radius: 13px; display: flex; flex-direction: column; align-items: center; padding-top: 7px; background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--shadow-sm); transition: transform 0.1s ease; }
.day-cell:active { transform: scale(0.93); }
.day-cell.other-month { background: transparent; box-shadow: none; }
.day-cell.other-month .day-num { color: var(--text-3); opacity: 0.45; }
.day-cell.today { border-color: var(--accent); }
.day-cell.today .day-num { color: var(--accent); }
.day-cell.selected { background: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-fab); }
.day-cell.selected .day-num { color: #fff; }
.day-num { font-size: 15px; font-weight: 600; }
.day-dots { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; justify-content: center; max-width: 90%; }
.day-dot { width: 6px; height: 6px; border-radius: 50%; }
.day-cell.selected .day-dot { box-shadow: 0 0 0 1.5px rgba(255,255,255,0.6); }

.day-events { margin-top: 22px; }
.day-events-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }

/* Wochenansicht */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 18px; }
.week-day { border-radius: 14px; padding: 9px 0 8px; text-align: center; background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--shadow-sm); }
.week-day.today { border-color: var(--accent); }
.week-day.selected { background: var(--accent); color: #fff; box-shadow: var(--shadow-fab); }
.week-day .wd-name { font-size: 10px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.week-day.selected .wd-name { color: rgba(255,255,255,0.85); }
.week-day .wd-num { font-size: 18px; font-weight: 700; margin-top: 3px; }
.week-day .wd-dots { display: flex; gap: 3px; justify-content: center; margin-top: 5px; height: 6px; }

/* Terminkarten */
.event-card { display: flex; gap: 13px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 13px 15px 13px 14px; margin-bottom: 11px; position: relative; overflow: hidden; box-shadow: var(--shadow-card); transition: transform 0.1s ease; }
.event-card:active { transform: scale(0.985); }
.event-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--card-color, var(--accent)); }
.event-cat-chip { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; background: var(--chip-bg); color: var(--card-color); }
.event-body { flex: 1; min-width: 0; }
.event-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.event-title { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.event-time-badge { font-size: 13px; font-weight: 700; color: var(--card-color); white-space: nowrap; }
.event-time-badge.allday { color: var(--text-3); font-weight: 600; }
.event-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.event-owner { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.owner-pin { width: 8px; height: 8px; border-radius: 50%; background: var(--card-color); }
.event-loc { font-size: 12.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 3px; }
.event-loc i, .event-owner i { font-size: 14px; }
.event-notes { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.event-badges { display: flex; gap: 6px; margin-top: 7px; }
.mini-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-sunken); padding: 3px 8px; border-radius: 8px; }
.mini-badge i { font-size: 13px; }
.event-new-dot { position: absolute; top: 13px; right: 13px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 20%, transparent); }

/* Datumsgruppen */
.date-group-header { display: flex; align-items: baseline; gap: 9px; margin: 22px 2px 12px; }
.date-group-header .dg-day { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.date-group-header .dg-rest { font-size: 13px; color: var(--text-3); font-weight: 600; }
.date-group-header.is-today .dg-day { color: var(--accent); }
.list-first { margin-top: 4px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty i { font-size: 42px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty p { font-size: 15px; }

/* ─── FAB & Sync-Badge ─────────────────────────────────────────── */
.fab { position: fixed; right: 20px; bottom: calc(26px + var(--safe-bottom)); z-index: 30; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(140deg, var(--accent), #4f46e5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: var(--shadow-fab); transition: transform 0.12s ease; }
.fab:active { transform: scale(0.9); }
.sync-badge { position: fixed; left: 18px; bottom: calc(28px + var(--safe-bottom)); z-index: 25; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--surface); border: 1px solid var(--border); padding: 7px 11px; border-radius: 20px; box-shadow: var(--shadow-sm); }
.sync-badge.online { color: #16a34a; }

/* ─── Modal ────────────────────────────────────────────────────── */
.modal, .sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.modal-backdrop, .sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet { position: relative; width: 100%; max-height: 93vh; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 18px calc(28px + var(--safe-bottom)); animation: sheetUp 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 4px auto 14px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-title { font-size: 16px; font-weight: 700; }
.text-btn { font-size: 16px; color: var(--text-2); padding: 6px 2px; }
.text-btn.primary { color: var(--accent); font-weight: 700; }

.modal-body { display: flex; flex-direction: column; gap: 14px; }
.title-field { padding: 10px 2px 2px; }
#fTitle { width: 100%; font-size: 23px; font-weight: 700; border: none; background: transparent; color: var(--text); outline: none; letter-spacing: -0.01em; }
#fTitle::placeholder { color: var(--text-3); font-weight: 600; }

.cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 12px; background: var(--surface-sunken); border: 1.5px solid transparent; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.cat-chip i { font-size: 16px; }
.cat-chip.active { background: var(--cc-bg); border-color: var(--cc-color); color: var(--cc-color); }

.group { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2px 14px; }
.field-row { display: flex; align-items: center; gap: 13px; padding: 13px 0; }
.field-row + .field-row, #timeFields .field-row:first-child { border-top: 1px solid var(--border); }
#timeFields .field-row { border-top: 1px solid var(--border); }
.field-row.align-top { align-items: flex-start; }
.field-icon { color: var(--text-3); font-size: 20px; width: 22px; display: flex; justify-content: center; flex-shrink: 0; }
.field-label { color: var(--text); font-size: 16px; }
.field-label.block { display: block; margin-bottom: 12px; padding-left: 2px; }
.field-row input[type="date"], .field-row input[type="time"], .field-row select { margin-left: auto; flex: 1; min-height: 34px; font-size: 16px; border: none; background: transparent; color: var(--text); outline: none; text-align: right; max-width: none; }
.field-row select { text-align-last: right; }
.field-row input[type="text"], .field-row textarea { flex: 1; font-size: 16px; border: none; background: transparent; color: var(--text); outline: none; resize: none; }
.field-row input::placeholder, .field-row textarea::placeholder { color: var(--text-3); }
.toggle-row .field-label { flex: 1; }
#timeFields { overflow: hidden; }

.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; margin-left: auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--surface-sunken); border-radius: 31px; transition: 0.2s; }
.slider::before { content: ''; position: absolute; height: 27px; width: 27px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.switch input:checked + .slider { background: #22c55e; }
.switch input:checked + .slider::before { transform: translateX(20px); }

.owner-field { padding: 4px 2px; }
.owner-buttons { display: flex; gap: 10px; }
.owner-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: 13px; border: 2px solid var(--border); font-size: 15px; font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.owner-btn .owner-swatch { width: 16px; height: 16px; border-radius: 50%; }
.owner-btn.active { border-color: var(--ob-color); color: var(--text); background: var(--ob-bg); }

.delete-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 4px; padding: 15px; border-radius: 14px; background: rgba(239, 68, 68, 0.1); color: #ef4444; font-size: 15px; font-weight: 700; }
.delete-btn:active { background: rgba(239, 68, 68, 0.2); }

/* Aktionsmenü */
.action-sheet { position: relative; width: 100%; padding: 8px 12px calc(14px + var(--safe-bottom)); animation: sheetUp 0.28s cubic-bezier(0.32, 0.72, 0, 1); }
.action-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; background: var(--surface); font-size: 16px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.action-item:first-child { border-radius: 16px 16px 0 0; }
.action-item:nth-last-child(2) { border-radius: 0 0 16px 16px; border-bottom: none; }
.action-item i { font-size: 21px; color: var(--text-2); }
.action-item.cancel { justify-content: center; margin-top: 8px; border-radius: 16px; color: var(--accent); font-weight: 700; border-bottom: none; }
.action-item:active { background: var(--surface-sunken); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-bottom)); transform: translateX(-50%); z-index: 60; background: #16181d; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn 0.25s ease; max-width: 88%; text-align: center; }
@media (prefers-color-scheme: dark) { .toast { background: #2a2d36; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ─── Lebendigkeit: Animationen & Ebenen ───────────────────────── */

/* treibende Farbnebel */
@media (prefers-reduced-motion: no-preference) {
  .blob { animation: drift 20s ease-in-out infinite alternate; }
  .blob.b2 { animation-duration: 26s; animation-delay: -8s; }
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-30px, 24px) scale(1.12); }
  to   { transform: translate(20px, -18px) scale(1.05); }
}

/* Statistik-Pillen */
.stats-row { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.stats-row::-webkit-scrollbar { display: none; }
.stat-pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.stat-pill i { font-size: 15px; color: var(--accent); }
.stat-pill b { color: var(--text); font-weight: 700; }
.stat-pill.love i { color: #ec4899; }

/* Tage mit Terminen heben sich ab */
.day-cell.has-ev .day-num { font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .day-cell.today:not(.selected) { animation: todayPulse 2.6s ease-out infinite; }
}
@keyframes todayPulse {
  0%   { box-shadow: 0 0 0 0 rgba(75, 147, 255, 0.35); }
  60%  { box-shadow: 0 0 0 9px rgba(75, 147, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 147, 255, 0); }
}

/* Karten gleiten gestaffelt herein */
.ec-anim { opacity: 0; animation: fadeUp 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) forwards; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .ec-anim { opacity: 1; animation: none; } }

/* Ansichtswechsel weich einblenden */
.view-fade { animation: viewIn 0.3s ease; }
@keyframes viewIn { from { opacity: 0.3; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Wasserzeichen-Icon auf Terminkarten */
.card-mark {
  position: absolute; right: -8px; bottom: -16px; font-size: 68px;
  color: var(--card-color); opacity: 0.07; pointer-events: none; line-height: 1;
}

/* Kopfzeile der Tagesliste mit Schnell-Hinzufügen */
.day-events-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.day-events-head .day-events-title { margin-bottom: 0; }
.mini-add {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  transition: transform 0.12s ease;
}
.mini-add:active { transform: scale(0.88); }

/* schönere Leerzustände */
.empty-art { display: flex; justify-content: center; margin-bottom: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .empty-art svg { animation: floaty 3.4s ease-in-out infinite alternate; }
}
@keyframes floaty { from { transform: translateY(-4px); } to { transform: translateY(5px); } }
.empty-cta {
  margin-top: 14px; padding: 11px 20px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 700;
}
.empty-cta:active { transform: scale(0.96); }

/* Feuerwerk-Partikel */
.pop-bit { position: fixed; z-index: 90; pointer-events: none; transform: translate(-50%, -50%); }

/* FAB dreht sich beim Öffnen */
.fab { transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1); }
.fab.fab-open { transform: rotate(135deg); }

/* Farb-Legende unter dem Monatsraster */
.legend-row { display: flex; gap: 16px; justify-content: center; margin-top: 10px; }
.legend-row span { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.legend-row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ─── Ebenen: Tab-Leiste, Startseite, Einkaufsliste ────────────── */

.app { padding-bottom: calc(110px + var(--safe-bottom)); }
.fab { bottom: calc(100px + var(--safe-bottom)); }
.toast { bottom: calc(170px + var(--safe-bottom)); }

/* Banner überall sichtbar (schwebt oben) */
.notify-banner {
  position: fixed; top: calc(10px + var(--safe-top)); left: 12px; right: 12px; z-index: 46;
  background: var(--surface); box-shadow: var(--shadow-lg);
}

/* Tab-Leiste */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 8px 14px calc(10px + var(--safe-bottom));
  background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tab-btn {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px; border-radius: 14px; color: var(--text-3); transition: color 0.2s;
}
.tab-btn i { font-size: 24px; }
.tab-btn span { font-size: 10.5px; font-weight: 700; }
.tab-btn.active { color: var(--accent); }
.tab-btn.active i { animation: tabPop 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes tabPop { 0% { transform: scale(0.85); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.tab-badge {
  position: absolute; top: 2px; right: calc(50% - 24px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2.5px var(--bg);
}

/* Startseite */
.home-wrap { padding: calc(16px + var(--safe-top)) 18px 0; }
.home-hero {
  position: relative; border-radius: 26px; overflow: hidden;
  padding: 26px 22px 22px; color: #fff;
  background: linear-gradient(135deg, #3B82F6 0%, #7c5bd6 52%, #EC4899 100%);
  box-shadow: var(--shadow-lg);
}
.home-hero .hh-date { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.85; }
.home-hero .hh-names { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; display: flex; align-items: center; gap: 10px; }
.home-hero .hh-names .amp { font-size: 22px; opacity: 0.9; }
.home-hero .hh-sub { font-size: 14px; opacity: 0.92; }
.home-hero .hh-avatars { position: absolute; top: 22px; right: 20px; display: flex; }
.home-hero .hh-avatars .avatar { width: 40px; height: 40px; font-size: 16px; border-color: rgba(255,255,255,0.55); }
.home-hero .hh-art { position: absolute; right: -18px; bottom: -26px; opacity: 0.2; pointer-events: none; }
.float-heart { position: absolute; color: #fff; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .float-heart { animation: heartFloat 5.5s ease-in infinite; }
}
@keyframes heartFloat {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  15% { opacity: 0.5; }
  70% { opacity: 0.25; }
  100% { transform: translateY(-90px) scale(1.15); opacity: 0; }
}

.home-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.home-card {
  position: relative; display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 16px; box-shadow: var(--shadow-card); overflow: hidden;
  transition: transform 0.12s ease; width: 100%;
}
.home-card:active { transform: scale(0.98); }
.home-card .hc-icon {
  width: 52px; height: 52px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
}
.home-card .hc-body { flex: 1; min-width: 0; }
.home-card .hc-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.home-card .hc-title { font-size: 16.5px; font-weight: 700; margin-top: 2px; }
.home-card .hc-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.home-card .hc-go { color: var(--text-3); font-size: 22px; }
.home-card .hc-new {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.home-tip {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 13px 14px; border-radius: 15px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); line-height: 1.5;
}
.home-tip i { font-size: 17px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

/* Einkaufsliste */
.shop-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 18px 10px;
}
.shop-header h1 { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; }
.shop-add {
  display: flex; gap: 10px; padding: 4px 18px 12px;
  position: sticky; top: 0; z-index: 15;
}
.shop-add input {
  flex: 1; height: 50px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 16px; padding: 0 16px;
  outline: none; box-shadow: var(--shadow-sm);
}
.shop-add input:focus { border-color: var(--accent); }
.shop-add input::placeholder { color: var(--text-3); }
.shop-add button {
  width: 50px; height: 50px; border-radius: 16px; flex-shrink: 0;
  background: linear-gradient(140deg, var(--accent), #4f46e5); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  box-shadow: var(--shadow-fab); transition: transform 0.12s ease;
}
.shop-add button:active { transform: scale(0.9); }

.shop-hint {
  display: flex; gap: 11px; margin: 4px 18px 10px; padding: 13px 14px;
  border-radius: 15px; background: rgba(239, 159, 39, 0.12);
  font-size: 12.5px; line-height: 1.5; color: var(--text-2);
}
.shop-hint i { font-size: 19px; color: #ba7517; flex-shrink: 0; }
.shop-hint code { font-weight: 700; }

.shop-list { padding: 2px 18px 0; }
.shop-group-title { font-size: 13px; font-weight: 700; color: var(--text-3); margin: 16px 2px 9px; text-transform: uppercase; letter-spacing: 0.04em; }
.shop-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 13px 14px; margin-bottom: 9px; box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.shop-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--item-color); }
.shop-check {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid var(--item-color); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; transition: all 0.15s ease;
}
.shop-item.done .shop-check { background: var(--item-color); border-color: var(--item-color); }
.shop-body { flex: 1; min-width: 0; }
.shop-title { font-size: 15.5px; font-weight: 600; transition: opacity 0.2s; }
.shop-item.done .shop-title { text-decoration: line-through; opacity: 0.45; }
.shop-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.shop-meta .owner-pin { width: 7px; height: 7px; }
.shop-del { color: var(--text-3); font-size: 19px; padding: 6px; display: flex; }
.new-chip {
  font-size: 10px; font-weight: 800; color: #fff; background: #ef4444;
  padding: 2.5px 7px; border-radius: 8px; letter-spacing: 0.04em;
}
.shop-empty { text-align: center; padding: 36px 20px; color: var(--text-3); }
.shop-empty i { font-size: 40px; margin-bottom: 10px; display: block; opacity: 0.5; }
.shop-empty p { font-size: 15px; }
