@font-face { font-family: "Jakarta"; src: url(/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #fff6ef;
  --card: #ffffff;
  --card-2: #fbf1ea;
  --ink: #1e2235;
  --ink-2: #454a60;
  --muted: #8a8ea3;
  --line: #f1e6dd;
  --shadow: 0 1px 2px rgba(30, 34, 53, .04), 0 8px 24px rgba(30, 34, 53, .06);

  /* Sonnenuntergang */
  --sun: #ff7a3d;   --sun-soft: #ffeadf;
  --coral: #ff5d73; --coral-soft: #ffe6ea;
  --gold: #ffb52e;  --gold-soft: #fff2d6;
  --sea: #3b6fd8;   --sea-soft: #e7eefd;
  --green: #1fa971; --green-soft: #e3f6ec;
  --sunset: linear-gradient(135deg, #ffb52e 0%, #ff7a3d 45%, #ff5d73 100%);

  --c: var(--sun); --c-soft: var(--sun-soft); /* Bereichsfarbe */
  --font: "Jakarta", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15141c; --card: #201f2a; --card-2: #2a2835; --ink: #f5f1ee; --ink-2: #cfcbd6; --muted: #8f8b9c; --line: #2f2d3b;
    --shadow: none;
    --sun-soft: #3a2519; --coral-soft: #3b1f27; --gold-soft: #3a2e14; --sea-soft: #1c2840; --green-soft: #15302a;
    color-scheme: dark;
  }
}
body[data-route="liste"] { --c: var(--green); --c-soft: var(--green-soft); }
body[data-route="kalender"] { --c: var(--sea); --c-soft: var(--sea-soft); }
body[data-route="haushalt"] { --c: #f08c00; --c-soft: var(--gold-soft); }
body[data-route="wir"] { --c: var(--coral); --c-soft: var(--coral-soft); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 500 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
input, select, textarea { font-size: 16px; }
svg { display: block; flex: none; }
a { color: var(--c); font-weight: 650; text-decoration: none; }

#app { padding: calc(var(--safe-top) + 14px) 16px calc(var(--safe-bottom) + 100px); max-width: 640px; margin: 0 auto; }

/* ---------- Kopf ---------- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 2px 18px; }
.head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.1; }
.head .sub { color: var(--muted); font-size: 15px; font-weight: 600; margin-top: 2px; }
.head-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent); }
.head-btn:active { transform: scale(.94); }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--c); font-weight: 700; font-size: 15px; margin: 2px 0 4px; }

/* ---------- Karten & Zeilen ---------- */
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 4px 16px; margin-bottom: 14px; }
.card.pad { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.card-title .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--c-soft); color: var(--c); }
.card-head .act { color: var(--c); font-weight: 700; font-size: 14px; }
.label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 8px; }

.rows > * + * { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 58px; width: 100%; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 650; overflow-wrap: anywhere; }
.row .m { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 1px; overflow-wrap: anywhere; }
.row .end { color: var(--muted); font-size: 14px; font-weight: 600; flex: none; text-align: right; }
.row.tap:active { opacity: .6; }
.row.done .t { color: var(--muted); text-decoration: line-through; }
.chev { color: var(--muted); opacity: .6; }

.check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 55%, transparent); flex: none; display: grid; place-items: center; color: #fff; transition: .15s; }
.check.on { background: var(--c); border-color: var(--c); }
.check svg { opacity: 0; } .check.on svg { opacity: 1; }

.who { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; color: #fff; }
.who.u0 { background: var(--sea); }
.who.u1 { background: var(--coral); }
.who.both { background: linear-gradient(90deg, var(--sea) 50%, var(--coral) 50%); }
.who.none { background: none; border: 2px dashed color-mix(in srgb, var(--muted) 50%, transparent); }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750; padding: 3px 9px; border-radius: 999px; background: var(--c-soft); color: var(--c); vertical-align: 2px; }
.pill.hot { background: var(--coral-soft); color: var(--coral); }
.pill.late { background: var(--coral-soft); color: var(--coral); }

.empty { text-align: center; padding: 28px 12px 24px; color: var(--muted); font-weight: 500; }
.empty .ic { width: 56px; height: 56px; border-radius: 18px; background: var(--c-soft); color: var(--c); display: grid; place-items: center; margin: 0 auto 10px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 750; font-size: 15px; background: var(--c); color: #fff; flex: none; }
.btn.soft { background: var(--c-soft); color: var(--c); }
.btn.ghost { background: transparent; color: var(--muted); padding: 0 8px; }
.btn.danger { background: var(--coral-soft); color: var(--coral); }
.btn.sunset { background: var(--sunset); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:active { transform: scale(.97); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.seg { display: flex; background: var(--card-2); border-radius: 14px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; height: 38px; border-radius: 11px; font-size: 14px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* ---------- Quick-Add ---------- */
.quick { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 6px 6px 16px; margin-bottom: 14px; }
.quick input { flex: 1; border: 0; background: none; outline: none; height: 44px; font-weight: 600; }
.quick input::placeholder { color: var(--muted); font-weight: 500; }
.quick button { width: 44px; height: 44px; border-radius: 14px; background: var(--c); color: #fff; display: grid; place-items: center; flex: none; }

/* ---------- Formular ---------- */
.field { margin-bottom: 12px; }
.field .lbl { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 6px 4px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border-radius: 14px; border: 0; background: var(--card-2); padding: 12px 14px; outline: none; font-weight: 600; -webkit-appearance: none; appearance: none; }
.field input[type=date], .field input[type=time], .field input[type=datetime-local] { display: block; text-align: left; min-width: 0; }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 2px var(--c); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); font-weight: 500; }
.field .hint { color: var(--muted); font-size: 13px; margin: 6px 4px 0; }
.field.big input { font-size: 20px; font-weight: 750; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { height: 38px; padding: 0 14px; border-radius: 999px; background: var(--card-2); font-size: 14px; font-weight: 700; }
.chips button.on { background: var(--c); color: #fff; }

/* ---------- Sheet ---------- */
#sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 30, .4); z-index: 40; animation: fade .2s; }
#sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 26px 26px 0 0; padding: 8px 16px calc(var(--safe-bottom) + 18px);
  max-width: 640px; margin: 0 auto; animation: up .28s cubic-bezier(.2, .9, .3, 1);
}
#sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.sheet-head button { font-size: 16px; font-weight: 600; color: var(--muted); padding: 6px 2px; }
.sheet-head button.save { color: var(--c); font-weight: 800; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Tabbar ---------- */
#tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--safe-bottom) + 8px); z-index: 30; display: flex; justify-content: space-around;
  max-width: 560px; margin: 0 auto; padding: 8px 6px; border-radius: 26px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgba(30, 34, 53, .14), 0 0 0 1px var(--line);
}
#tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; position: relative; border-radius: 18px; }
#tabbar button svg { width: 24px; height: 24px; }
#tabbar button.on { color: var(--tc); }
#tabbar button.on::before { content: ""; position: absolute; inset: 0 8px; border-radius: 16px; background: color-mix(in srgb, var(--tc) 13%, transparent); z-index: -1; }
#tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--card); }

#toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 10px); z-index: 60; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; animation: fade .2s; max-width: 90vw; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* ---------- Heute: Foto-Hero ---------- */
.hero { position: relative; margin: calc(-14px - var(--safe-top)) -16px 0; height: min(58vh, 470px); overflow: hidden; border-radius: 0 0 32px 32px; background: var(--sunset); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 16, 30, .35) 0%, rgba(20, 16, 30, 0) 28%, rgba(20, 16, 30, 0) 50%, rgba(20, 16, 30, .7) 100%); }
.hero .top { position: absolute; top: calc(var(--safe-top) + 12px); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; z-index: 2; color: #fff; }
.hero .date { font-weight: 700; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.glass { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero .bottom { position: absolute; left: 18px; right: 18px; bottom: 20px; z-index: 2; color: #fff; }
.hero h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero .together { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.22); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 700; font-size: 14px; }
.hero .monthday { margin-bottom: 10px; display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 16px 10px; border-radius: 20px; background: var(--sunset); box-shadow: 0 8px 24px rgba(255, 93, 115, .45); }
.hero .monthday b { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.hero .monthday span { font-weight: 750; font-size: 17px; }
.hero.nophoto::after { background: none; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 14px; }
.tile { border-radius: 22px; padding: 14px 16px 16px; text-align: left; color: var(--ink); background: var(--card); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.tile .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 10px; }
.tile .n { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.tile .l { font-size: 13px; font-weight: 650; color: var(--muted); margin-top: 4px; }
.tile:active { transform: scale(.98); }

.notice { display: flex; gap: 12px; align-items: center; background: var(--gold-soft); border-radius: 18px; padding: 12px 14px; margin: 16px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.notice b { color: var(--ink); }
.notice .ic { color: #c9820a; }

.love { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.love button { border-radius: 20px; padding: 14px; color: #fff; font-weight: 750; font-size: 15px; text-align: left; display: flex; flex-direction: column; gap: 10px; min-height: 96px; justify-content: space-between; }
.love button:first-child { background: var(--sunset); }
.love button:last-child { background: linear-gradient(135deg, #5b8cf0, #3b6fd8); }
.love button:active { transform: scale(.98); }

/* ---------- Haushalt ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 8px 0 4px; }
.week button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; }
.week .wd { font-size: 12px; color: var(--muted); font-weight: 700; }
.week .cell { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--card-2); color: var(--muted); }
.week .cell.u0 { background: var(--sea); color: #fff; }
.week .cell.u1 { background: var(--coral); color: #fff; }
.week .today .wd { color: var(--sun); }
.week .today .cell:not(.u0):not(.u1) { box-shadow: inset 0 0 0 2px var(--sun); color: var(--sun); }
.legend { display: flex; gap: 14px; font-size: 13px; font-weight: 650; color: var(--muted); padding: 6px 0 14px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }

.bar { height: 6px; border-radius: 3px; background: var(--card-2); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--sun); }
.bar.late i { background: var(--coral); }
.due-late { color: var(--coral); font-weight: 700; }

/* Müll */
.bin-hero { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; margin: 8px 0 4px; }
.bin-hero .t { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.bin-hero .m { font-weight: 650; font-size: 14px; opacity: .8; }
.binicon { flex: none; }
.pickups { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 14px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.pickups::-webkit-scrollbar { display: none; }
.pickup { flex: none; min-width: 86px; border-radius: 16px; background: var(--card-2); padding: 10px 12px; }
.pickup .d { font-weight: 800; font-size: 15px; }
.pickup .w { font-size: 12px; font-weight: 650; color: var(--muted); }
.pickup .dots { display: flex; gap: 4px; margin-top: 8px; }
.pickup .dots i { width: 12px; height: 12px; border-radius: 4px; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; }
.cal-head .m { font-size: 18px; font-weight: 800; }
.cal-head button.nav { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--c-soft); color: var(--c); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; padding-bottom: 12px; }
.cal-grid .wd { font-size: 12px; color: var(--muted); padding: 2px 0 8px; font-weight: 700; }
.cal-grid .d { height: 50px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cal-grid .d span { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.cal-grid .d.other { opacity: .3; }
.cal-grid .d.today span { color: var(--c); background: var(--c-soft); }
.cal-grid .d.sel span { background: var(--c); color: #fff; }
.cal-grid .d.monthday span { box-shadow: inset 0 0 0 2px var(--coral); }
.cal-grid .dots { display: flex; gap: 2px; height: 6px; }
.cal-grid .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sea); }

/* ---------- Login ---------- */
.login-bg { position: fixed; inset: 0; background: var(--sunset); }
.login-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,30,.1) 0%, rgba(20,16,30,.15) 40%, rgba(20,16,30,.75) 100%); }
.login { position: relative; z-index: 1; min-height: calc(100dvh - var(--safe-top) - 40px); display: flex; flex-direction: column; justify-content: flex-end; color: #fff; padding-bottom: 10px; }
.login h1 { font-size: 44px; font-weight: 800; letter-spacing: -.04em; margin: 0; line-height: 1; }
.login .lede { font-weight: 600; opacity: .9; margin: 8px 0 22px; }
.login .box { background: var(--card); color: var(--ink); border-radius: 26px; padding: 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); --c: var(--sun); --c-soft: var(--sun-soft); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pick button { height: 54px; border-radius: 16px; background: var(--card-2); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pick button.on { background: var(--sun); color: #fff; }
[hidden] { display: none !important; }
