@font-face { font-family: "Inter"; src: url("fonts/Inter-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
/* Nach Änderungen an Inktera.woff2 die ?v= hier und beim preload in index.php erhöhen (sonst bleibt die alte im Cache).
   Inktera (Demo von Limitype, nur private Nutzung), aufbereitet mit fonts/inktera_build.py: nur Buchstaben und Satzzeichen,
   Zeilenmasse mittig. Die Demo stempelt die Ziffern 5–9 und hat U+00A0–00BF falsch belegt; diese kommen aus Inter. */
@font-face { font-family: "Inktera"; src: url("fonts/Inktera.woff2?v=1") format("woff2"); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0020-002F, U+003A-007E, U+00C0-00FF, U+0131, U+0152-0153, U+0160-0161, U+0178, U+017D-017E, U+2013-2014, U+2018-201E, U+2022, U+2026; }

:root {
  /* Palette: #AE63F2 Violett, #6366F2 Indigo, #ABF292 Grün, #ECF26D Gelb, #8A759D Grau-Violett */
  --bg: #f8f6fc; --card: #ffffff; --ink: #261f30; --muted: #76668a; --line: #e8e2f0;
  --accent: #6366f2; --accent-ink: #fff; --accent2: #ae63f2; --soft: #f0ebf8;
  --ok: #3f7f2c; --ok-bg: #e4f9da; --var: #756800; --var-bg: #f8fbd0; --no: #c0392b; --no-bg: #fbe6e3;
  --bring: #3c9b6a;
  --brand: linear-gradient(90deg, #ae63f2, #6366f2); --brand-solid: #8864f2; /* wie der Verlauf im App-Symbol */
  --eat: linear-gradient(90deg, #4fa83a, #2c7a3c); --eat-solid: #3f8f34; /* «EAT» in FAMILEAT, Grün der Palette, dunkel genug für hellen Grund */
  --navbar: #ffffff; /* Bereich der Handy-Navigation unten: hell weiss, dunkel lila */
  --r: 14px; --shadow: 0 1px 2px rgba(50, 30, 80, .06), 0 2px 10px rgba(50, 30, 80, .05);
  color-scheme: light;
}
/* Dunkel: automatisch nach Betriebssystem, ausser «Hell» gewählt; oder fest «Dunkel» (data-theme, Familie → Darstellung) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1720; --card: #24202c; --ink: #f1edf7; --muted: #ab9dbd; --line: #383142; --soft: #2e2938;
    --accent: #9a9cf8; --accent-ink: #17142a; --accent2: #c99af7;
    --ok: #abf292; --ok-bg: #26351f; --var: #ecf26d; --var-bg: #36361a; --no: #f08a7c; --no-bg: #43231f;
    --shadow: none; color-scheme: dark; --navbar: #ae63f2;
    --brand: linear-gradient(90deg, #c99af7, #9a9cf8); --brand-solid: #b29bf8; --eat: linear-gradient(90deg, #abf292, #7fdc6a); --eat-solid: #abf292;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1720; --card: #24202c; --ink: #f1edf7; --muted: #ab9dbd; --line: #383142; --soft: #2e2938;
  --accent: #9a9cf8; --accent-ink: #17142a; --accent2: #c99af7;
  --ok: #abf292; --ok-bg: #26351f; --var: #ecf26d; --var-bg: #36361a; --no: #f08a7c; --no-bg: #43231f;
  --shadow: none; color-scheme: dark; --navbar: #ae63f2;
    --brand: linear-gradient(90deg, #c99af7, #9a9cf8); --brand-solid: #b29bf8; --eat: linear-gradient(90deg, #abf292, #7fdc6a); --eat-solid: #abf292;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 16px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .f { fill: currentColor; stroke: none; }
h1, h2, h3 { margin: 0; }
/* Titel in Inktera (nur eine Schnittstärke, fehlende Zeichen kommen aus Inter) */
h1, h2 { font-family: "Inktera", "Inter", system-ui, sans-serif; font-weight: 400; font-synthesis: none; letter-spacing: 0; }
a { color: var(--accent); }

.main { max-width: 640px; margin: 0 auto; padding: 8px 16px calc(96px + env(safe-area-inset-bottom)); }
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.topbar { max-width: 640px; margin: 0 auto; padding: 12px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.topbar h1 { font-size: 1.5rem; }
/* Rechts: App-Symbol mit Namen, klein und zurückhaltend (kein Knopf) */
.eat { color: var(--eat-solid); }
.splash .eat { color: #abf292; }
.brand { display: flex; align-items: center; gap: 6px; font-family: "Inktera", "Inter", system-ui, sans-serif; font-size: .95rem; font-synthesis: none; color: var(--brand-solid); white-space: nowrap; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .brand .famil { background: var(--brand); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .eat, .brand .eat { background: var(--eat); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .splash .eat { background: linear-gradient(90deg, #abf292, #ecf26d); -webkit-background-clip: text; background-clip: text; }
}
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 6px; flex: none; background: url("icon-192.png") center / cover; }
.sub { margin: 0; color: var(--muted); font-size: .9rem; }
.topsub { flex-basis: 100%; display: flex; align-items: center; min-height: 36px; }
.topsub .weeknav { margin-left: -6px; }
.weeknav { display: flex; align-items: center; gap: 2px; }
.wklbl { font-weight: 600; font-size: .92rem; padding: 6px 8px; border-radius: 10px; }
.ic { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; }
.ic:hover, .wklbl:hover { background: var(--soft); }
.ic.sm { width: 30px; height: 30px; } .ic.sm svg { width: 16px; height: 16px; }

/* Unterster Streifen (Bereich der Handy-Knöpfe) in Lila */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: center; background: linear-gradient(var(--card), var(--card)) top / 100% calc(100% - env(safe-area-inset-bottom)) no-repeat, var(--navbar); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
html { background: var(--navbar); }
.tabs button { flex: 1; max-width: 128px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: .72rem; color: var(--muted); }
.tabs button.on { color: var(--accent); font-weight: 600; }
.tabs svg { width: 23px; height: 23px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 12px; background: var(--soft); font-weight: 600; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.bring { background: var(--bring); color: #fff; min-height: 50px; font-size: 1.05rem; }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.danger { background: var(--no-bg); color: var(--no); }
.btn.wide { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.link { color: var(--accent); font-weight: 600; padding: 6px 0; }
.actions-row { display: flex; gap: 8px; margin: 6px 0 12px; }
.actions-row .btn.primary { flex: 1; }

.day { background: var(--card); border-radius: var(--r); padding: 12px 14px 8px; margin-bottom: 10px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.day.today { border-color: var(--accent); }
.day.inactive { background: transparent; box-shadow: none; padding-bottom: 6px; }
.day.is-off { background: var(--soft); }
.day-h { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-h b { color: var(--ink); }
.day.today .day-h b { color: var(--accent); }
.dish-name { display: block; text-align: left; font-size: 1.12rem; font-weight: 650; margin: 4px 0 6px; line-height: 1.25; }
.empty { width: 100%; text-align: left; padding: 12px; margin: 6px 0; border: 1.5px dashed var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; }
.offtxt { margin: 6px 0; color: var(--muted); font-weight: 600; }
.chips, .kids { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.chip { font-size: .74rem; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.chip.p-vegi { color: var(--ok); } .chip.p-fisch { color: var(--accent); } .chip.p-fleisch { color: var(--no); }
.chip.fav { color: var(--var); }
.chip.left { color: var(--ok); background: var(--ok-bg); }
.leftcard .lbl { font-size: .84rem; font-weight: 650; margin: 0 0 4px; }
.leftcard .addrow { margin: 6px 0 0; }
.leftcard .addrow textarea { resize: vertical; min-height: 42px; }
.leftcard .tag small { color: var(--muted); font-size: .76rem; margin-left: 3px; }
.chip.deal { color: var(--accent); background: var(--soft); font-weight: 600; }
.considered { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; width: 100%; text-align: left; padding: 8px 12px; margin: 0 0 12px; border-radius: 11px; background: var(--soft); font-size: .88rem; }
.considered small { margin-left: auto; color: var(--accent); font-weight: 600; }
.considered-add { margin: 0 0 12px; }
.newtop { margin: 4px 0 10px; }
.import { background: var(--soft); border: 0; margin: 6px 0 4px; }
.import .lbl { margin: 0 0 4px; }
.import .addrow { margin: 4px 0 0; }
.import details { margin-top: 8px; }
.import summary { color: var(--muted); cursor: pointer; }
.import textarea { margin: 6px 0; }
.kid { font-size: .74rem; padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.k-ok { background: var(--ok-bg); color: var(--ok); }
.k-variante { background: var(--var-bg); color: var(--var); }
.k-nein { background: var(--no-bg); color: var(--no); }
.kidsnote { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--var-bg); color: var(--var); font-size: .88rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kidsnote.warn { background: var(--no-bg); color: var(--no); }
.aus { background: var(--card); color: var(--ok); font-weight: 650; padding: 2px 10px; border-radius: 99px; border: 1px solid currentColor; font-size: .84rem; }
.day-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 4px; }
.day-actions button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border-radius: 9px; font-size: .84rem; color: var(--muted); }
.day-actions button:hover { background: var(--soft); color: var(--ink); }
.day-actions button:last-child:not(:first-child) { margin-left: auto; }
.day-actions svg { width: 17px; height: 17px; }
.swapbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .92rem; }
.swapbar .btn { background: var(--card); color: var(--ink); min-height: 34px; padding: 4px 12px; }
.day.swap-src { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.day.swap-target { border-style: dashed; border-color: var(--accent); background: var(--card); }
.swapto { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 0 6px; text-align: left; }
.swapto span { font-weight: 600; }
.swapto b { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: .88rem; white-space: nowrap; }
.swapto svg { width: 17px; height: 17px; }

.sec { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 20px 0 8px; display: flex; justify-content: space-between; }
.sec span { font-weight: 500; }
.sec .link.sm { padding: 0; font-size: .8rem; text-transform: none; letter-spacing: 0; }
.sechint { margin: -4px 0 6px; }
.wklist { list-style: none; margin: 8px 0 0; padding: 0; }
.wklist li { display: flex; align-items: center; gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wklist li > span { flex: 1; }
.wklist em { color: var(--muted); font-style: normal; }
.wklist small { display: block; color: var(--muted); font-size: .76rem; }
.shop { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; }
.shop li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.shop li:last-child { border-bottom: 0; }
.chk { flex: 1; display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; }
.chk .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); grid-row: span 2; }
.chk[aria-pressed="true"] .box { background: var(--bring); border-color: var(--bring); box-shadow: inset 0 0 0 3px var(--card); }
.chk small { color: var(--muted); font-size: .76rem; grid-column: 2; }
.unchecked .t { color: var(--muted); text-decoration: line-through; }
.sendbar { position: sticky; bottom: calc(58px + env(safe-area-inset-bottom)); padding: 4px 0 10px; background: linear-gradient(transparent, var(--bg) 30%); }
.sendbar .btn.wide { margin-top: 10px; }

.addrow { display: flex; gap: 6px; margin: 6px 0; }
.addrow input { flex: 1; min-width: 0; }
.addrow select { max-width: 42%; }
input, select, textarea { background: var(--card); border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 11px; min-height: 42px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.addrow .btn { padding: 0 12px; }
.search { margin: 4px 0 8px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.filters.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
.fchip { padding: 6px 12px; border-radius: 99px; border: 1.5px solid var(--line); font-size: .86rem; white-space: nowrap; font-weight: 550; }
.fchip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: stretch; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); overflow: hidden; }
.pill > button:first-child { padding: 7px 4px 7px 12px; display: inline-flex; gap: 5px; align-items: baseline; }
.pill i { font-style: normal; color: var(--muted); font-size: .8rem; }
.pill em { font-style: normal; font-size: .78rem; color: inherit; opacity: .8; }
.pill .pe { padding: 0 9px 0 5px; color: var(--muted); display: grid; place-items: center; }
.pill .pe svg { width: 14px; height: 14px; }
.pill.miss { background: var(--no-bg); border-color: var(--no); color: var(--no); font-weight: 650; }
.pill.miss .pe, .pill.miss i { color: var(--no); }

.dish-row, .pick-row { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; margin-bottom: 8px; box-shadow: var(--shadow); }
.dish-row b, .pick-row b { display: block; margin-bottom: 3px; }
.dish-row small, .pick-row small { color: var(--muted); font-size: .78rem; }
.dish-row.paused { opacity: .55; }
.pick-row .chips { margin-bottom: 2px; }

dialog { border: 0; padding: 0; background: var(--bg); color: var(--ink); width: min(600px, 100vw); max-width: 100vw; max-height: 92dvh; border-radius: 18px 18px 0 0; margin: auto auto 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); }
@media (min-width: 700px) { dialog { margin: auto; border-radius: 18px; } }
dialog::backdrop { background: rgba(25, 15, 40, .45); }
.m-in { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
.m-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; position: sticky; top: -14px; background: var(--bg); padding: 6px 0; z-index: 2; }
.m-h h2 { font-size: 1.2rem; }
.picklist { max-height: 55dvh; overflow: auto; }

.form label { display: block; font-size: .84rem; color: var(--muted); margin: 10px 0 0; }
.form label input, .form label select, .form label textarea { margin-top: 4px; color: var(--ink); }
.form .lbl { font-size: .84rem; font-weight: 650; margin: 16px 0 2px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: .95rem; margin: 12px 0; }
label.check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.row { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 16px; }
.row.wrap { flex-wrap: wrap; justify-content: flex-start; }
.ing { display: grid; grid-template-columns: 74px 78px 1fr; gap: 5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ing input, .ing select { min-height: 38px; padding: 6px 8px; }
.itog { grid-column: 1 / -1; display: flex; gap: 5px; align-items: center; }
.itog button:not(.ic) { font-size: .78rem; padding: 4px 10px; border-radius: 99px; border: 1.5px solid var(--line); color: var(--muted); }
.itog button.on[data-k="sep"] { background: var(--var-bg); color: var(--var); border-color: var(--var); }
.itog button.on[data-k="pantry"] { background: var(--soft); color: var(--ink); border-color: var(--ink); }
.itog .ic { margin-left: auto; color: var(--muted); }
.kidrate { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.kidrate > span { min-width: 60px; font-weight: 600; }
.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 9px; border-radius: 8px; font-size: .82rem; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; }
.card .row { margin-top: 0; }
.kidname { font-weight: 650; border-color: transparent; padding-left: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--soft); font-size: .88rem; }
.tag button { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); }
.tag svg { width: 13px; height: 13px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper .ic { background: var(--card); border: 1.5px solid var(--line); font-size: 1.2rem; }
.stepper b { font-size: 1.2rem; min-width: 20px; text-align: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .92rem; z-index: 50; max-width: calc(100vw - 32px); }
.muted { color: var(--muted); } .small { font-size: .84rem; } .center { text-align: center; } .pad { padding: 16px 0; }
.err { color: var(--no); }
details { margin-top: 14px; } details p { margin: 8px 0; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; text-align: center; }
.login-card img { border-radius: 16px; }
.login-card h1 { margin: 10px 0 4px; }
.login-card p { color: var(--muted); margin: 0 0 18px; }
.login-card .btn { width: 100%; margin-top: 10px; }

/* Hinweis zum Installieren */
.install { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40; width: calc(100vw - 32px); max-width: 520px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 6px 24px rgba(50, 30, 80, .18); }
.install.above-tabs { bottom: calc(68px + env(safe-area-inset-bottom)); }
.install img { border-radius: 10px; flex: none; }
.install-txt { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }
.install-txt span { color: var(--muted); }
.install-txt svg { width: 17px; height: 17px; vertical-align: -3px; color: var(--accent); }
.install-btns { display: flex; gap: 8px; margin-left: auto; }
.install-btns .btn { min-height: 38px; }

/* Ladebildschirm beim Start */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 0; background: linear-gradient(135deg, #ae63f2, #6366f2); color: #fff; transition: opacity .35s; }
.splash img { width: min(200px, 50vw); height: auto; }
.splash span { font-family: "Inktera", "Inter", system-ui, sans-serif; font-size: 2.2rem; }
.splash.out { opacity: 0; pointer-events: none; }
