/* Familien-Assistent Dashboard – Design: das Wetter färbt den Tag */
@font-face { font-family: "Bricolage"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light dark;
  --font: "Bricolage", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #F5F7F8;  --surface: #FFFFFF;
  --ink: #1B2733; --ink-2: #51606C; --ink-3: #7C8995;
  --line: #E0E6EA;
  --accent: #3F7D5C; --accent-ink: #FFFFFF; --accent-soft: #DDEBE2; --accent-strong: #2C5C42;
  --danger: #B3402F; --danger-ink: #FFFFFF;

  --sky-ink: #1B2733;
  --sky-clear: #FFDF7E; --sky-cloud: #D8DFE5; --sky-rain: #A8C2DB;
  --sky-snow: #E4EDF5;  --sky-storm: #98A5BF; --sky-fog: #D2D8D8;

  --bin-black: #3A3F45; --bin-brown: #8A5A34; --bin-blue: #3B74D8; --bin-yellow: #E9B91C;
  --bin-purple: #8B5CC8; --bin-orange: #E5832B; --bin-green: #3F9B5B; --bin-red: #C9483A;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161C; --surface: #18212A;
    --ink: #E9EEF2; --ink-2: #AAB6C0; --ink-3: #7F8C97;
    --line: #26313B;
    --accent: #6FB38F; --accent-ink: #0C1812; --accent-soft: #1F3429; --accent-strong: #93D3B0;
    --danger: #F08A78; --danger-ink: #2A0D07;
    --sky-ink: #EEF2F5;
    --sky-clear: #6B5214; --sky-cloud: #2D363F; --sky-rain: #203649;
    --sky-snow: #2B3945;  --sky-storm: #2B3048; --sky-fog: #313839;
    --bin-black: #A4AFBA;
  }
}
:root[data-theme="dark"] {
  --bg: #10161C; --surface: #18212A;
  --ink: #E9EEF2; --ink-2: #AAB6C0; --ink-3: #7F8C97;
  --line: #26313B;
  --accent: #6FB38F; --accent-ink: #0C1812; --accent-soft: #1F3429; --accent-strong: #93D3B0;
  --danger: #F08A78; --danger-ink: #2A0D07;
  --sky-ink: #EEF2F5;
  --sky-clear: #6B5214; --sky-cloud: #2D363F; --sky-rain: #203649;
  --sky-snow: #2B3945;  --sky-storm: #2B3048; --sky-fog: #313839;
  --bin-black: #A4AFBA;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
svg { display: block; }

/* ---------- Gerüst und Navigation ---------- */
.shell { min-height: 100dvh; }
.view { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around;
  background: color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px;
  text-decoration: none; font-size: 12px; font-weight: 560; color: var(--ink-2); }
.nav-ico { display: grid; place-items: center; width: 58px; height: 30px; border-radius: 15px; transition: background .2s; }
.nav-ico svg { width: 24px; height: 24px; }
.nav-item[aria-current="page"] { color: var(--ink); }
.nav-item[aria-current="page"] .nav-ico { background: var(--accent-soft); color: var(--accent-strong); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
  .nav { position: sticky; top: 0; height: 100dvh; flex-direction: column; justify-content: flex-start; gap: 10px;
    padding: 32px 10px; border-top: 0; border-right: 1px solid var(--line); background: var(--surface);
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-item { flex: none; }
  .view { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 32px 56px; }
}

/* ---------- Wetterblock ---------- */
.hero { --sky-bg: var(--sky-cloud); position: relative; background: var(--sky-bg); color: var(--sky-ink);
  padding: calc(env(safe-area-inset-top) + 14px) 22px 30px; border-radius: 0 0 34px 34px; transition: background .4s; }
.hero[data-sky="clear"] { --sky-bg: var(--sky-clear); }
.hero[data-sky="cloud"] { --sky-bg: var(--sky-cloud); }
.hero[data-sky="rain"]  { --sky-bg: var(--sky-rain); }
.hero[data-sky="snow"]  { --sky-bg: var(--sky-snow); }
.hero[data-sky="storm"] { --sky-bg: var(--sky-storm); }
.hero[data-sky="fog"]   { --sky-bg: var(--sky-fog); }
@media (min-width: 900px) {
  .hero { margin-top: 28px; border-radius: 34px; padding: 26px 40px 38px; }
}
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-date { font-size: 15px; font-weight: 560; opacity: .82; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px -6px 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-kicker { margin-top: 24px; font-size: 15px; font-weight: 560; opacity: .78; }
.hero-headline { margin-top: 4px; max-width: 17em; font-size: clamp(29px, 8.4vw, 42px); line-height: 1.08;
  font-weight: 640; letter-spacing: -.022em; text-wrap: balance; }
.hero-meta { display: flex; align-items: flex-end; gap: 18px; margin-top: 26px; }
.temp { font-size: 76px; line-height: .82; font-weight: 300; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.meta-text { display: grid; gap: 2px; padding-bottom: 3px; font-size: 15px; font-weight: 500; }
.hero-trend { margin-top: 18px; font-size: 15px; font-weight: 520; opacity: .9; }
.cond { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 650; }
.cond svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Inhalt ---------- */
.today-grid { display: grid; gap: 0 64px; padding: 0 20px; }
@media (min-width: 900px) { .today-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 0 40px; } }
.col { display: grid; align-content: start; gap: 30px; margin-top: 30px; }
.section h2 { margin-bottom: 4px; font-size: 20px; font-weight: 650; letter-spacing: -.012em; }
.sub { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.empty { padding: 12px 0; color: var(--ink-3); }
.note-err { padding: 12px 0; color: var(--ink-3); font-size: 14px; }

.tl-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--line); }
.tl-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.tl-time.soft { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.tl-title { font-weight: 500; overflow-wrap: anywhere; }
.tl-row svg { width: 20px; height: 20px; color: var(--accent-strong); }

.todo { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 50px; padding: 10px 0;
  border: 0; border-top: 1px solid var(--line); background: none; text-align: left; transition: opacity .3s, transform .3s; }
.todo-title { font-weight: 500; overflow-wrap: anywhere; }
.ring { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border: 2px solid var(--ink-3);
  border-radius: 50%; color: var(--accent-ink); transition: background .15s, border-color .15s; }
.ring svg { width: 15px; height: 15px; opacity: 0; }
.todo.done .ring { background: var(--accent); border-color: var(--accent); }
.todo.done .ring svg { opacity: 1; }
.todo.done .todo-title { color: var(--ink-3); text-decoration: line-through; }
.todo.gone { opacity: 0; transform: translateX(14px); }

.bins-tonight { margin-bottom: 8px; padding: 16px 16px 14px; border-radius: 22px; background: var(--accent-soft); }
.bins-title { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bin { --c: var(--bin-black); display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px 7px 10px;
  border-radius: 999px; background: var(--surface); font-size: 15px; font-weight: 620; }
.bin svg { width: 22px; height: 22px; fill: var(--c); }
.bins-note { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.bin-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bin-row b { font-weight: 650; font-variant-numeric: tabular-nums; }
.bin-row span { color: var(--ink-2); }

.row-link { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); text-decoration: none; }
.row-link > span:first-child, .row-link > span:last-child { display: grid; place-items: center; }
.row-link > span:first-child svg { width: 24px; height: 24px; color: var(--accent-strong); }
.row-link .grow { flex: 1; font-weight: 560; }
.row-link .meta { color: var(--ink-2); }
.row-link > span:last-child svg { width: 18px; height: 18px; color: var(--ink-3); }

.bd-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.bd-row .name { font-weight: 560; }
.bd-row .sub2 { color: var(--ink-2); font-size: 14px; }
.bd-row .when { color: var(--ink-2); white-space: nowrap; font-size: 14px; }
.meal { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.meal small { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Mehr / Platzhalter ---------- */
.page { padding: calc(env(safe-area-inset-top) + 28px) 20px 0; max-width: 640px; }
.page h1 { font-size: 32px; font-weight: 680; letter-spacing: -.025em; }
.page > p { margin-top: 10px; color: var(--ink-2); }
.me { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.avatar { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; font-size: 19px; }
.group { margin-top: 28px; }
.group h2 { margin-bottom: 10px; font-size: 16px; font-weight: 650; color: var(--ink-2); }
.seg { display: inline-flex; padding: 3px; border-radius: 14px; background: var(--line); }
.seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 11px; background: none; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.soon { display: grid; justify-items: start; gap: 14px; }
.soon-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-strong); }
.soon-ico svg { width: 28px; height: 28px; }
.version { margin-top: 36px; font-size: 13px; color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 650; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-line { background: none; color: var(--ink); border: 1.5px solid var(--line); }
.btn-quiet { min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--ink-2); font-weight: 560; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:disabled { opacity: .5; }
.btn-block { width: 100%; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 30px; padding: 32px 20px; }
.login-card { width: min(100%, 380px); display: grid; gap: 14px; }
.brand { width: min(100%, 380px); display: flex; align-items: center; gap: 12px; font-size: 27px; font-weight: 700; letter-spacing: -.025em; }
.mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #1F2B3A; color: #F2C230; }
.mark svg { width: 28px; height: 28px; }
.login h1 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; }
.hint { color: var(--ink-2); }
.person { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 12px 16px;
  border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); font-size: 20px; font-weight: 620; text-align: left; }
.person:hover { border-color: var(--accent); }
.code-input { width: 100%; padding: 14px 8px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface);
  font-size: 36px; font-weight: 600; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.code-input:focus { border-color: var(--accent); outline: none; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.err { color: var(--danger); font-weight: 560; }
.center { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }

/* ---------- Hilfen ---------- */
.skeleton { min-height: 300px; background: var(--line); border-radius: 0 0 34px 34px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 20; max-width: calc(100% - 40px);
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 560; transform: translateX(-50%); }
@media (min-width: 900px) { .toast { bottom: 32px; } }

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

/* ---------- Seiten: Todos, Einkauf, Kalender, Geburtstage, Rezepte, Einstellungen, System ---------- */
.page.wide { max-width: 760px; }
.add-row { display: flex; gap: 10px; margin: 18px 0 8px; }
.add-row .input { flex: 1; min-width: 0; }
.add-row .btn { flex: none; min-height: 52px; }
.input { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 17px; }
textarea.input { padding: 14px 16px; line-height: 1.5; resize: vertical; }
.input:focus { border-color: var(--accent); outline: none; }
.list { margin-top: 8px; }
.row-wrap { display: flex; align-items: center; border-top: 1px solid var(--line); }
.row-wrap .todo { flex: 1; min-width: 0; border-top: 0; }
.grow { flex: 1; min-width: 0; }
.todo .grow { display: grid; text-align: left; }
.by { color: var(--ink-3); font-size: 13px; }
.icon-btn.quiet { margin: 0; flex: none; color: var(--ink-3); }
.sub-h { margin: 24px 0 2px; font-size: 15px; font-weight: 650; color: var(--ink-2); }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.actions-row.tight { margin-top: 4px; }
.btn.small { min-height: 40px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
.btn-danger { background: var(--danger); color: var(--danger-ink); }
.btn.danger { color: var(--danger); }
.btn svg { width: 20px; height: 20px; }
.hint { margin-top: 12px; color: var(--ink-2); }
.pad { padding-top: 10px; }

.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h1 { flex: 1; text-align: center; font-size: 24px; }
.cal-nav .icon-btn { margin: 0; }
.cal-days { margin-top: 10px; }
.cal-day { padding-top: 18px; scroll-margin-top: 12px; }
.cal-day h2 { margin-bottom: 2px; font-size: 16px; font-weight: 650; color: var(--ink-2); }
.cal-day.now h2 { color: var(--accent-strong); }
.cal-day.past { opacity: .6; }
button.tl-row, a.tl-row { width: 100%; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; text-decoration: none; color: inherit; }
.tl-row.ev { align-items: center; min-height: 48px; }
.fab { position: fixed; right: 20px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 9; display: grid; place-items: center;
  width: 60px; height: 60px; border: 0; border-radius: 20px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .24); }
.fab svg { width: 26px; height: 26px; }
@media (min-width: 900px) { .fab { right: 40px; bottom: 36px; } }
.banner { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; }

.bd .name { font-weight: 560; }
.bd .sub2 { color: var(--ink-2); font-size: 14px; }
.bd .when { color: var(--ink-2); font-size: 14px; white-space: nowrap; margin: 0 4px 0 12px; }
.row-wrap.bd { padding: 8px 0; }

a.meal { text-decoration: none; color: inherit; }
.meal { align-items: center; }
.meal.big { padding: 16px 0; font-size: 17px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-bottom: 10px; text-decoration: none; color: var(--ink-2); font-weight: 560; }
.back-link svg { width: 20px; height: 20px; }
.recipe h1 { font-size: 30px; }
.recipe .sub2 { margin-top: 2px; color: var(--ink-3); font-size: 14px; }
.recipe-desc { margin-top: 14px; font-size: 17px; color: var(--ink-2); }
.recipe-text { margin: 18px 0; font-size: 17px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.recipe .btn { margin-top: 6px; }

.links { margin-top: 24px; }
.links .row-link + .row-link { border-top: 0; }
.version a { color: inherit; }

.settings { display: grid; gap: 36px; margin-top: 10px; }
.set-group { display: grid; gap: 14px; }
.set-group h2 { font-size: 20px; font-weight: 650; letter-spacing: -.012em; }
.checks { display: grid; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 6px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); font-size: 13px; font-weight: 560; }
.swatch i { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--c); }
.swatch[aria-pressed="true"] { border-color: var(--accent); }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.kv span:last-child { color: var(--ink-2); text-align: right; }
.dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--accent); }
.dot.off { background: var(--danger); }
.dev { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.dev .name { font-weight: 560; }
.dev .sub2 { color: var(--ink-2); font-size: 14px; }

/* ---------- Dialoge (unten als Sheet, am PC mittig) ---------- */
dialog.sheet { width: min(100%, 520px); max-width: 100%; max-height: 92dvh; margin: auto auto 0; padding: 0; overflow: auto;
  border: 0; border-radius: 28px 28px 0 0; background: var(--surface); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(10, 16, 22, .55); }
@media (min-width: 700px) { dialog.sheet { margin: auto; border-radius: 28px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 10px 0 22px; }
.sheet-head h2 { font-size: 20px; font-weight: 650; letter-spacing: -.012em; overflow-wrap: anywhere; }
.sheet-head .icon-btn { margin: 0; flex: none; }
.sheet-body { display: grid; gap: 14px; padding: 12px 22px calc(22px + env(safe-area-inset-bottom)); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.sheet-actions .btn { min-height: 48px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 13px; color: var(--ink-3); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ev-when { font-weight: 560; }

/* ---------- Eigene Liste ---------- */
.personal { margin-top: 52px; padding-top: 22px; border-top: 2px solid var(--accent-soft); }
.pers-h { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; letter-spacing: -.012em; }
.pers-h svg { width: 20px; height: 20px; color: var(--accent-strong); }
.personal .add-row { margin-top: 12px; }
