/* Familienplan: Grundlagen (früher von der Umgebung geliefert) */
:root {
  --fs: 1; color-scheme: light; }
html, body { min-height: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: one narrow column, big touch targets, four areas (Einkauf, Essen, Aufgaben, Einstellungen) switched by a bottom tab bar. Lists sit in one bordered surface, rows divided by hairlines. */
:root {
  --bg: #EEF2EF;
  --surface: #FFFFFF;
  --surface-2: #E1E9E4;
  --ink: #17211D;
  --muted: #55635D;
  --line: #D0DAD4;
  --accent: #1F6B57;
  --accent-ink: #FFFFFF;
  --accent-soft: #D5EADF;
  --danger: #B3402F;
  --danger-ink: #FFFFFF;
  --warn: #6B4A00;
  --warn-soft: #FBEBC8;
  --toast-bg: #17211D;
  --toast-ink: #EEF2EF;
  --on-member: #14201B;
  --m1: #F08A6C;
  --m2: #F2B84B;
  --m3: #6CC3A0;
  --m4: #7DB4E6;
  --m5: #B996DB;
  --m6: #EE8BB5;
  --font-display: 'Avenir Next', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111915;
    --surface: #1A2520;
    --surface-2: #24322C;
    --ink: #E8EFEB;
    --muted: #9AAAA3;
    --line: #2B3A34;
    --accent: #5FBF9F;
    --accent-ink: #0C1A15;
    --accent-soft: #1F3A31;
    --danger: #E58472;
    --danger-ink: #1A0B07;
    --warn: #F2C46B;
    --warn-soft: #3A2E12;
    --toast-bg: #E8EFEB;
    --toast-ink: #111915;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111915;
  --surface: #1A2520;
  --surface-2: #24322C;
  --ink: #E8EFEB;
  --muted: #9AAAA3;
  --line: #2B3A34;
  --accent: #5FBF9F;
  --accent-ink: #0C1A15;
  --accent-soft: #1F3A31;
  --danger: #E58472;
  --danger-ink: #1A0B07;
    --warn: #F2C46B;
    --warn-soft: #3A2E12;
  --toast-bg: #E8EFEB;
  --toast-ink: #111915;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: calc(16px * var(--fs, 1));
  line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0; }

.app { max-width: 640px; margin: 0 auto; padding-block: 0 112px; }

.top { padding-block: 22px 14px; }
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(clamp(30px, 8vw, 38px) * var(--fs, 1));
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.weeknav { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.weeknav[hidden] { display: none; }
.weeklabel { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.weeklabel strong { font-family: var(--font-display); font-size: calc(19px * var(--fs, 1)); font-weight: 700; }
.weeklabel .range { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.weeklabel .sub { display: block; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
.weeknav .btn { width: 46px; padding: 0; font-size: calc(22px * var(--fs, 1)); }

.btn {
  min-height: 46px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .15s;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.sm { min-height: 34px; padding: 4px 12px; font-size: calc(14px * var(--fs, 1)); }
.btn:disabled, .field:disabled { opacity: .55; cursor: not-allowed; }
.linkbtn {
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: calc(14px * var(--fs, 1));
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
select.field { padding-right: 8px; }
.field::placeholder { color: var(--muted); opacity: .85; }
.field:focus { border-color: var(--accent); }
.addrow { display: flex; gap: 8px; }
.addgrid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.addgrid .sel { grid-column: 1 / -1; }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.addrow input, .addrow select { min-width: 0; flex: 1 1 auto; }
.h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: calc(13px * var(--fs, 1));
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.rowhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.hint { color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.greet { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.fchip {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  font-weight: 600;
  font-size: calc(15px * var(--fs, 1));
  white-space: nowrap;
}
.fchip small { margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fchip[aria-pressed="true"] small { color: inherit; opacity: .85; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.item { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 4px 6px 4px 8px; }
.item .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.item.done .txt { color: var(--muted); text-decoration: line-through; }
.meta { display: block; font-size: calc(13px * var(--fs, 1)); color: var(--muted); }
.check {
  flex: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
}
.check i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--muted);
  border-radius: 50%;
  color: var(--accent-ink);
  transition: background-color .15s, border-color .15s;
}
.check svg { opacity: 0; }
.check[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); }
.check[aria-pressed="true"] svg { opacity: 1; }
.x {
  flex: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: calc(24px * var(--fs, 1));
  line-height: 1;
}
.x:hover { color: var(--danger); }
.ask { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.txtbtn { display: block; width: 100%; min-height: 40px; padding: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; overflow-wrap: anywhere; }
.txtbtn:disabled { cursor: default; }
.mv { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mv .fchip { min-height: 34px; padding: 0 12px; font-size: calc(14px * var(--fs, 1)); }
.editrow { display: grid; gap: 10px; padding: 12px 12px 12px 14px; background: var(--accent-soft); }
.editbtns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.editbtns .linkbtn { margin-left: auto; color: var(--danger); }
.rolesel { max-width: 100%; }
.selrow { display: flex; flex-wrap: wrap; gap: 8px; }
.selrow .field { min-width: 150px; }
.attn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.attn[hidden] { display: none; }
.attn span { flex: 1; min-width: 180px; }
.attn .btn { background: var(--surface); color: var(--ink); }
.newtag { display: inline-block; padding: 0 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: calc(11px * var(--fs, 1)); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.dueover { color: var(--danger); font-weight: 700; }
.duetoday { color: var(--warn); font-weight: 700; }
.grip { flex: none; width: 30px; height: 42px; display: grid; place-items: center; color: var(--muted); touch-action: none; cursor: grab; }
.grp { border-radius: 12px; }
.dropempty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.ghost { position: fixed; left: 0; top: 0; z-index: 40; max-width: 70vw; padding: 10px 14px; overflow: hidden; border: 1px solid var(--accent); border-radius: 12px; background: var(--surface); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.dragging { opacity: .4; }
.droptarget { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 12px; }
.fchip.droptarget { background: var(--accent-soft); }
body.dragmode { -webkit-user-select: none; user-select: none; }

.empty { padding: 32px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 12px; justify-items: center; }
.empty strong { display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: calc(20px * var(--fs, 1)); color: var(--ink); }

/* Essensplan */
.meals > li { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
.meals > li.today { background: var(--accent-soft); }
.daylabel { display: grid; justify-items: start; align-content: start; gap: 2px; }
.dn { font-family: var(--font-display); font-size: calc(21px * var(--fs, 1)); font-weight: 700; line-height: 1.1; }
.dd { font-size: calc(13px * var(--fs, 1)); color: var(--muted); font-variant-numeric: tabular-nums; }
.tag {
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: calc(11px * var(--fs, 1));
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.slots { display: grid; gap: 4px; min-width: 0; align-content: center; }
.slot { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; }
.slots.one .slot { grid-template-columns: minmax(0, 1fr); }
.slots.one .slot span { display: none; }
.slot span { font-size: calc(11px * var(--fs, 1)); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.slot input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.slot input:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.slot input::placeholder { color: var(--muted); opacity: .7; }

/* Aufgaben */
.person { display: grid; gap: 10px; }
.phead { display: flex; align-items: center; gap: 10px; }
.av {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--on-member);
  font-family: var(--font-display);
  font-size: calc(17px * var(--fs, 1));
  font-weight: 700;
}
.av.sm { width: 28px; height: 28px; font-size: calc(14px * var(--fs, 1)); }
.pname { flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.pname strong { font-family: var(--font-display); font-size: calc(20px * var(--fs, 1)); font-weight: 700; overflow-wrap: anywhere; }
.me { padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.pcount { flex: none; font-size: calc(14px * var(--fs, 1)); color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--surface-2); }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .25s; }
.toolrow { display: flex; }
.toolrow .btn { flex: 1; }

/* Einstellungen */
.panel { display: grid; gap: 12px; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel p { color: var(--muted); font-size: calc(15px * var(--fs, 1)); }
.panel p strong { color: var(--ink); }
.panel .list { border-radius: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.chip b { padding-left: 4px; font-weight: 600; overflow-wrap: anywhere; }
.chip .x { width: 32px; height: 32px; font-size: calc(20px * var(--fs, 1)); }
.chip:not(:has(.av)) b { padding-left: 10px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.suggest .fchip { min-height: 34px; padding: 0 12px; font-size: calc(14px * var(--fs, 1)); font-weight: 500; border-style: dashed; }
.urow { display: grid; gap: 8px; padding: 12px 8px 12px 14px; }
.urow-top { display: flex; align-items: center; gap: 8px; }
.urow-top .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.urow.pending { background: var(--accent-soft); }
.urow-sel { display: flex; gap: 8px; flex-wrap: wrap; padding-right: 6px; }
.rec-who { color: var(--muted); }

.welcome { display: grid; gap: 16px; }
.welcome > p { color: var(--muted); }
.picks { display: grid; gap: 8px; }
.pick {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  font-weight: 600;
  font-size: calc(17px * var(--fs, 1));
}
.pick:hover { border-color: var(--accent); }

.status { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: calc(15px * var(--fs, 1)); }

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 6px max(16px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--surface);
  border-top: 1px solid var(--line);
}
body.gate .tabs { display: none; }
.tabs-in { display: flex; gap: 6px; max-width: 640px; margin: 0 auto; }
.tabs a {
  position: relative;
  flex: 1;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 12px;
  color: var(--muted);
  font-size: calc(12px * min(var(--fs, 1), 1.1));
  font-weight: 600;
  text-decoration: none;
}
.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: var(--danger);
  color: var(--danger-ink);
  font-size: calc(11px * var(--fs, 1));
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.badge[hidden] { display: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: calc(15px * min(var(--fs, 1), 1.1));
  text-align: center;
}
.toast[hidden] { display: none; }
body.gate .toast { bottom: 24px; }

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

/* ---- Anmeldung ---- */
.auth { display: grid; gap: 16px; max-width: 420px; margin: 8px auto 0; }
.auth .panel { gap: 14px; }
.auth h2 { margin: 0; font-family: var(--font-display); font-size: calc(24px * var(--fs, 1)); font-weight: 700; }
.auth label { display: grid; gap: 6px; font-weight: 600; font-size: calc(15px * var(--fs, 1)); }
.auth .field { width: 100%; }
.auth .btn.primary { width: 100%; }
.auth .links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.formerr { padding: 10px 12px; border-radius: 10px; background: var(--danger); color: var(--danger-ink); font-size: calc(15px * var(--fs, 1)); }
.formok { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: calc(15px * var(--fs, 1)); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: calc(20px * var(--fs, 1)); }
.brand i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }

/* ---- Verwaltung ---- */
.formgrid { display: grid; gap: 10px; }
.formgrid .field { width: 100%; }
.formgrid label { display: grid; gap: 4px; font-size: calc(14px * var(--fs, 1)); font-weight: 600; color: var(--muted); }
.copyrow { display: flex; gap: 8px; }
.copyrow .field { font-size: calc(13px * var(--fs, 1)); }
.btn.danger { background: var(--danger); color: var(--danger-ink); }
details.fold { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; }
details.fold summary { cursor: pointer; font-weight: 600; min-height: 30px; display: flex; align-items: center; }
details.fold[open] summary { margin-bottom: 10px; }
.state-off { opacity: .7; }
.urow .meta .off { color: var(--danger); font-weight: 700; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.noscript { padding: 24px 16px; text-align: center; }

:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }

/* Einfügemarke beim Sortieren: eigene Linie über den Artikeln (Schatten würden vom Nachbarartikel verdeckt). */
.list > li.ins-before, .list > li.ins-after { position: relative; }
.list > li.ins-before::after, .list > li.ins-after::after { content: ''; position: absolute; left: 6px; right: 6px; height: 4px; border-radius: 2px; background: var(--accent); z-index: 5; pointer-events: none; box-shadow: 0 0 0 2px var(--surface); }
.list > li.ins-before::after { top: -2px; }
.list > li.ins-after::after { bottom: -2px; }

.plus { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface, transparent); color: var(--accent, currentColor); font-size: calc(22px * var(--fs, 1)); line-height: 1; display: grid; place-items: center; cursor: pointer; padding: 0 0 2px; transition: transform .15s; }
.plus.open { transform: rotate(45deg); }
.addrow.inl { margin-bottom: 8px; }

.addrow.stacked { flex-direction: column; align-items: stretch; }
.addrow.stacked input, .addrow.stacked .btn { width: 100%; max-width: 100%; box-sizing: border-box; }
.fchips .fchip { white-space: normal; text-align: left; max-width: 100%; height: auto; min-height: 40px; }

/* Mengen, Vorschläge, Sprache */
.qty { flex: none; max-width: 40%; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }
.item.done .qty { opacity: .7; }
.qtyrow { display: flex; gap: 8px; align-items: center; }
.qtyrow .qtyin { flex: 1 1 auto; min-width: 0; }
.qtyrow .step { flex: none; width: 44px; min-height: 44px; padding: 0; font-size: calc(20px * var(--fs, 1)); }
.quick { display: flex; gap: 8px; }
.quick .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.typeahead[hidden] { display: none; }
.voicebar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); overflow-wrap: anywhere; }
.voicebar .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .voicebar .dot { animation: none; } }
.sugpanel { display: grid; gap: 10px; }
.item.sug .txtbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.plusmark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; line-height: 1; }
.pill { flex: none; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: calc(13px * var(--fs, 1)); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill.on { background: var(--accent); color: var(--accent-ink); }
.editrow { grid-template-columns: minmax(0, 1fr); }
.editrow .mv { display: flex; flex-wrap: wrap; gap: 8px; }
.editrow .field { min-width: 0; width: 100%; box-sizing: border-box; }
.editrow .editbtns { flex-wrap: wrap; }
.version { text-align: center; color: var(--muted); font-size: calc(13px * var(--fs, 1)); padding: 4px 0 8px; }

/* Farbdesigns: pro Konto wählbar (data-color am <html>). Ohne Angabe gilt Grün. */
:root[data-color="blue"] { --bg: #EEF2F6; --surface-2: #DFE7EF; --line: #CDD7E2; --ink: #161E27; --muted: #556270; --accent: #1D5FA8; --accent-soft: #D6E5F6; --toast-bg: #161E27; --toast-ink: #EEF2F6; }
:root[data-color="violet"] { --bg: #F2EFF6; --surface-2: #E6E0EE; --line: #D6CEE0; --ink: #1D1826; --muted: #5E566B; --accent: #6B3FA0; --accent-soft: #E5D9F5; --toast-bg: #1D1826; --toast-ink: #F2EFF6; }
:root[data-color="rose"] { --bg: #F6EFF2; --surface-2: #EEE0E6; --line: #E1D0D8; --ink: #251820; --muted: #6B5560; --accent: #A93463; --accent-soft: #F7DAE5; --toast-bg: #251820; --toast-ink: #F6EFF2; }
:root[data-color="amber"] { --bg: #F5F2EA; --surface-2: #EBE5D6; --line: #DDD5C2; --ink: #221D12; --muted: #655C48; --accent: #8A5A00; --accent-soft: #F5E4BF; --toast-bg: #221D12; --toast-ink: #F5F2EA; }
@media (prefers-color-scheme: dark) {
  :root[data-color="blue"]:not([data-theme="light"]) { --bg: #10161D; --surface: #18212B; --surface-2: #222E3A; --line: #2A3744; --ink: #E7EDF3; --muted: #98A6B4; --accent: #6FAEEB; --accent-ink: #0A1622; --accent-soft: #1D3348; --toast-bg: #E7EDF3; --toast-ink: #10161D; }
  :root[data-color="violet"]:not([data-theme="light"]) { --bg: #15121B; --surface: #1F1A28; --surface-2: #2B2437; --line: #352D43; --ink: #ECE8F2; --muted: #A59DB3; --accent: #B493E6; --accent-ink: #150D22; --accent-soft: #33264B; --toast-bg: #ECE8F2; --toast-ink: #15121B; }
  :root[data-color="rose"]:not([data-theme="light"]) { --bg: #1A1216; --surface: #251A20; --surface-2: #32242B; --line: #3E2D36; --ink: #F2E8EC; --muted: #B39DA7; --accent: #EE8FB3; --accent-ink: #240C16; --accent-soft: #482636; --toast-bg: #F2E8EC; --toast-ink: #1A1216; }
  :root[data-color="amber"]:not([data-theme="light"]) { --bg: #17140D; --surface: #221E14; --surface-2: #2F291C; --line: #3B3424; --ink: #F1ECE0; --muted: #ADA48F; --accent: #E9B84E; --accent-ink: #201600; --accent-soft: #3F3214; --toast-bg: #F1ECE0; --toast-ink: #17140D; }
}
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: calc(13px * var(--fs, 1)); cursor: pointer; min-width: 52px; }
.swatch .dot { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--line); display: grid; place-items: center; color: #fff; }
.swatch .dot svg { opacity: 0; }
.swatch[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.swatch[aria-pressed="true"] .dot { box-shadow: 0 0 0 3px var(--ink); }
.swatch[aria-pressed="true"] .dot svg { opacity: 1; }
.swatch:focus-visible .dot { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Aufgaben: Formular klappt über das Plus neben dem Namen auf */
.phead .plus { margin-left: 2px; }
.taskadd { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.taskadd .selrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.taskadd .field, .taskadd .btn { width: 100%; min-width: 0; }

/* Was ist neu */
.version { text-align: center; padding: 4px 0 8px; }
.version .linkbtn { font-size: calc(13px * var(--fs, 1)); color: var(--muted); line-height: 1.5; text-align: center; }
.version .linkbtn:hover { color: var(--accent); }
body.noscroll { overflow: hidden; }
.sheetwrap { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; background: rgba(0, 0, 0, .45); padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); animation: fadein .18s ease-out; }
.sheet { width: 100%; max-width: 520px; max-height: min(78vh, 640px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: 18px; border-radius: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); animation: slideup .22s ease-out; outline: none; }
.sheethead { display: flex; align-items: center; gap: 10px; }
.sheethead h2 { flex: 1; margin: 0; font-family: var(--font-display); font-size: calc(21px * var(--fs, 1)); }
.sheetbody { overflow-y: auto; -webkit-overflow-scrolling: touch; display: grid; gap: 8px; align-content: start; }
.sheet > .btn { width: 100%; }
details.news { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: var(--surface-2); }
details.news summary { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 12px 0; cursor: pointer; list-style: none; }
details.news summary::-webkit-details-marker { display: none; }
details.news summary span { color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-variant-numeric: tabular-nums; }
details.news summary::after { content: '›'; color: var(--muted); transition: transform .15s; }
details.news[open] summary::after { transform: rotate(90deg); }
details.news ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
@keyframes fadein { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheetwrap, .sheet { animation: none; } }
@media (min-width: 640px) { .sheetwrap { align-items: center; } }
.sheetwrap.locked { z-index: 80; background: rgba(0, 0, 0, .6); align-items: center; }
.sheetwrap.locked .sheet { max-width: 420px; }

/* Einkauf: wer angelegt bzw. abgehakt hat */
.av.xs { width: 24px; height: 24px; font-size: calc(12px * var(--fs, 1)); margin-left: 6px; }
.av.xs.done { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }

/* Leiste unten: bei fünf Bereichen etwas kompakter */
.tabs a[hidden] { display: none; }
.tabs[data-n="5"] .tabs-in { gap: 2px; }
.tabs[data-n="5"] a { font-size: calc(11px * min(var(--fs, 1), 1.1)); letter-spacing: -.1px; padding-left: 0; padding-right: 0; }

/* Kalender */
.calhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.calmonth { display: grid; justify-items: center; gap: 0; text-align: center; }
.calmonth strong { font-family: var(--font-display); font-size: calc(20px * var(--fs, 1)); }
.calmonth .linkbtn { font-size: calc(13px * var(--fs, 1)); }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.calwd { text-align: center; font-size: calc(12px * min(var(--fs, 1), 1.2)); font-weight: 700; color: var(--muted); padding: 2px 0 6px; }
.calday { position: relative; display: grid; grid-template-rows: auto 10px; justify-items: center; align-content: center; gap: 3px; min-height: 48px; padding: 4px 0; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.calday .num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: calc(15px * min(var(--fs, 1), 1.2)); font-variant-numeric: tabular-nums; }
.calday.we .num { color: var(--muted); }
.calday.other { opacity: .38; }
.calday.today .num { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); font-weight: 700; }
.calday.sel .num { background: var(--accent); color: var(--accent-ink); box-shadow: none; font-weight: 700; }
.calday:hover { background: var(--surface-2); }
.calday:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.calday .dots { display: flex; gap: 3px; align-items: center; height: 10px; }
.calday .dots i { width: 6px; height: 6px; border-radius: 50%; }
.calday .dots em { font-style: normal; font-size: calc(9px * min(var(--fs, 1), 1.2)); color: var(--muted); line-height: 1; }
.evlist .ev { position: relative; }
.evlist .ev::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--evbar, var(--evc)); border-radius: 0; }
.evbtn { width: 100%; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px 12px 10px; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.evbtn { cursor: pointer; }
button.evbtn:hover { background: var(--surface-2); }
.evtime { font-size: calc(14px * var(--fs, 1)); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; overflow-wrap: anywhere; }
.evtxt { display: grid; gap: 2px; min-width: 0; }
.evtxt b { font-weight: 600; overflow-wrap: anywhere; }
.evnote { color: var(--muted); font-size: calc(14px * var(--fs, 1)); overflow-wrap: anywhere; }
.calform .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calform input[type="date"], .calform input[type="time"] { min-width: 0; width: 100%; box-sizing: border-box; -webkit-appearance: none; appearance: none; min-height: 44px; }
.calbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calform .ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.linkbtn.danger { color: var(--danger); justify-self: start; }
.evbtn { grid-template-columns: 92px minmax(0, 1fr); }
.evtime { white-space: nowrap; }
.status.off { background: var(--warn-soft, #fde9c4); color: var(--ink); border: 1px solid var(--line); }

/* Nach rechts wischen zum Bearbeiten */
#view-einkauf li[data-swipe] .item { touch-action: pan-y; background: var(--surface); position: relative; }
#view-einkauf li[data-swipe] { position: relative; }
li.swipe { background: var(--accent-soft); --swc: var(--accent); }
li.swipe::before { content: 'Ändern'; position: absolute; left: 46px; top: 50%; transform: translateY(-50%); color: var(--swc); font-weight: 700; font-size: calc(15px * var(--fs, 1)); }
li.swipe::after { content: ''; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); background: var(--swc); -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020h4L19%209a2.8%202.8%200%200%200-4-4L4%2016v4z%22/%3E%3Cpath%20d%3D%22M13.5%206.5l4%204%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020h4L19%209a2.8%202.8%200%200%200-4-4L4%2016v4z%22/%3E%3Cpath%20d%3D%22M13.5%206.5l4%204%22/%3E%3C/svg%3E") center / contain no-repeat; }
li.swipe.ready { background: var(--accent); --swc: var(--accent-ink); }
li.swipe.left { background: var(--surface-2); --swc: var(--danger); }
li.swipe.left::before { content: 'Löschen'; left: auto; right: 46px; }
li.swipe.left::after { left: auto; right: 16px; -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M10%203.5h4M6%207l1%2013h10l1-13M10%2011v6M14%2011v6%22/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M10%203.5h4M6%207l1%2013h10l1-13M10%2011v6M14%2011v6%22/%3E%3C/svg%3E"); }
li.swipe.left.ready { background: var(--danger); --swc: var(--danger-ink); }
.toast.withbtn { display: flex; align-items: center; gap: 14px; text-align: left; padding: 8px 8px 8px 16px; }
.toast.withbtn[hidden] { display: none; }
.toastbtn { flex: none; border: 0; border-radius: 9px; padding: 8px 12px; background: transparent; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Schriftgröße pro Konto */
.fsizes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fsize { display: grid; justify-items: center; align-content: end; gap: 4px; min-height: 76px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.fsize b { font-family: var(--font-display); line-height: 1; }
.fsize span { font-size: 13px; color: var(--muted); }
.fsize[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.fsize[aria-pressed="true"] span { color: var(--accent); font-weight: 700; }
.fsize:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.fchips .fchip { border-radius: 14px; }
/* Symbol und Text beim Wischen liegen unter dem Artikel und kommen erst beim Wegschieben zum Vorschein. */
#view-einkauf li[data-swipe] .item { z-index: 1; }
li.swipe::before, li.swipe::after { z-index: 0; }

/* Mehrfachauswahl Personen */
.fieldset { display: grid; gap: 6px; }
.fieldset .lbl { font-weight: 600; font-size: calc(15px * var(--fs, 1)); }
.fieldset .lbl small { font-weight: 400; color: var(--muted); }
.whopick .fchip { display: inline-flex; align-items: center; gap: 6px; }
.whopick .fchip .av.xs { margin-left: -4px; width: 22px; height: 22px; font-size: 11px; }
.fchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Einstellungen: Gruppen */
.sect { display: flex; align-items: center; gap: 10px; margin: 18px 2px -6px; font-family: var(--font-display); font-size: calc(22px * var(--fs, 1)); color: var(--ink); }
.stack > .sect:first-child { margin-top: 0; }
.secticon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.h3 { margin: 6px 0 0; font-size: calc(13px * var(--fs, 1)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel > .h3:first-child { margin-top: 0; }
.h4 { margin: 10px 0 0; font-size: calc(15px * var(--fs, 1)); font-weight: 700; color: var(--ink); }
label.lbl { font-weight: 600; font-size: calc(15px * var(--fs, 1)); }
.impways { display: grid; gap: 12px; }
.impway { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.impway h4 { margin: 0; font-size: calc(15px * var(--fs, 1)); }
.impway input[type="file"] { padding: 10px; min-height: 44px; font-size: calc(15px * var(--fs, 1)); }
.feedlist .item { flex-wrap: wrap; gap: 8px; }
.feederr { display: block; color: var(--danger); font-size: calc(13px * var(--fs, 1)); margin-top: 2px; }
.steps { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; }
.evlist .evbtn { padding-left: 16px; }
@media (min-width: 640px) { .impways { grid-template-columns: 1fr 1fr; } }

/* Vorschläge beim Tippen */
.ta { display: grid; margin-top: -4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.ta[hidden] { display: none; }
.ta-head { padding: 8px 14px 4px; font-size: calc(12px * var(--fs, 1)); font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.ta-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ta-head + .ta-row { border-top: 0; }
.ta-row:hover, .ta-row:focus-visible { background: var(--surface-2); outline: none; }
.ta-row:active { background: var(--accent-soft); }
.ta-txt { flex: 1; min-width: 0; display: grid; }
.ta-txt b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-txt small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.urow-btns { flex-wrap: wrap; }

/* Familie: Name antippen zum Umbenennen */
.chipname { display: inline-flex; align-items: center; gap: 8px; padding: 0 2px 0 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.chipname b { padding-left: 4px; font-weight: 600; overflow-wrap: anywhere; }
.chipname .noacc { color: var(--muted); font-size: calc(12px * var(--fs, 1)); }
.chipname:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 99px; }
.chip.editing { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ===================== Rezepte & Vorrat ===================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.segtabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.segtabs a, .segtabs button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: calc(15px * var(--fs, 1)); text-decoration: none; cursor: pointer; }
.segtabs [aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segtabs small { font-size: calc(12px * var(--fs, 1)); color: var(--accent); }
.segtabs.small { margin-bottom: 4px; }
.hint.small { font-size: calc(13px * var(--fs, 1)); }

.recbar { display: grid; gap: 10px; }
.recbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .recgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reccard { width: 100%; display: grid; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.reccard:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.recimg { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--accent-soft); }
.recimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.recph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 44px; }
.recph.big { width: 96px; height: 96px; border-radius: 14px; background: var(--surface-2); font-size: 40px; }
.recfav { position: absolute; top: 6px; right: 8px; color: #f5b301; font-size: 20px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.rectxt { display: grid; gap: 2px; padding: 10px 12px 12px; }
.rectxt b { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.rectxt small { color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.emptyicon { font-size: 44px; text-align: center; }

.recdetail, .recedit { display: grid; gap: 14px; }
.linkbtn.back { justify-self: start; font-weight: 600; }
.rechero { margin: 0 -16px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
@media (min-width: 640px) { .rechero { margin: 0; border-radius: 16px; } }
.rechero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rechead { display: flex; align-items: flex-start; gap: 10px; }
.rectitle { flex: 1; margin: 0; font-family: var(--font-display); font-size: calc(26px * var(--fs, 1)); line-height: 1.15; overflow-wrap: anywhere; }
.iconbtn { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; }
.iconbtn.on { color: #f5b301; border-color: #f5b301; }
.iconbtn.on svg { fill: currentColor; }
.recdescr { margin: 0; color: var(--ink); }
.recdetail .meta a { color: var(--accent); }
.rtag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: calc(13px * var(--fs, 1)); }
.recactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recactions .btn:only-child { grid-column: 1 / -1; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper .step { width: 40px; min-height: 40px; padding: 0; font-size: 20px; }
.inglist { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; }
.inglist li + li { border-top: 1px solid var(--line); }
.ing { display: grid; grid-template-columns: auto auto minmax(70px, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 46px; padding: 4px 0; cursor: pointer; }
.ing input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.ingicon { font-size: 22px; width: 28px; text-align: center; }
.ingqty { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ingname { overflow-wrap: anywhere; }
.idea .ing { grid-template-columns: auto minmax(60px, auto) minmax(0, 1fr); cursor: default; }
.btn.wide { width: 100%; }
.steps.big { list-style: none; padding: 0; gap: 8px; }
.stepbtn { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; line-height: 1.5; cursor: pointer; }
.stepn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.stepbtn.done { opacity: .5; }
.stepbtn.done .stepn { background: var(--accent); color: var(--accent-ink); }
.stepbtn.done span:last-child { text-decoration: line-through; }
.recnotes { margin: 0; }
.recpic { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.recpic img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; }
.recpicbtns { display: grid; gap: 8px; }
.recpicbtns label.btn { cursor: pointer; }
.pair.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recedit textarea { min-height: 120px; line-height: 1.5; resize: vertical; font: inherit; }
.calbtns.sticky { position: sticky; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 4; padding: 8px; margin: 0 -8px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.recdel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mealrec { flex: none; width: 40px; height: 40px; display: grid; place-items: center; margin-left: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--accent); cursor: pointer; }
.slot:has(.mealrec) { grid-template-columns: 96px minmax(0, 1fr) auto; }
.slots.one .slot:has(.mealrec) { grid-template-columns: minmax(0, 1fr) auto; }
.pantry .item { gap: 10px; }
.cookrow { width: 100%; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; gap: 10px; }
.cookrow .txt { flex: 1; min-width: 0; }
details.idea { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: var(--surface-2); margin-top: 8px; }
details.idea summary { display: grid; gap: 2px; padding: 12px 0; cursor: pointer; }
details.idea summary small { color: var(--muted); }
details.idea[open] { padding-bottom: 12px; }
.recedit .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.recedit .pair.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.recedit .pair label { min-width: 0; }
.recpicbtns .btn { font: inherit; font-weight: 600; font-size: calc(15px * var(--fs, 1)); text-align: center; }
details.idea .btn:not(.primary) { background: var(--surface); border: 1px solid var(--line); }
