@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #F2F6F1;
  --surface: #FFFFFF;
  --surface-2: #E7EEE7;
  --ink: #1C2A23;
  --ink-2: #56685E;
  --ink-3: #8A9A90;
  --line: #D8E2DA;
  --herb: #2E7D57;
  --herb-soft: #D7EEDD;
  --saffron: #FFC93C;
  --saffron-ink: #3A2C00;
  --danger: #C8412B;

  /* Wochentage als Teller */
  --d1: #7CC47F; /* Mo Spinat */
  --d2: #FFC93C; /* Di Safran */
  --d3: #F27A9B; /* Mi Radieschen */
  --d4: #9C88D1; /* Do Melanzani */
  --d5: #F2683C; /* Fr Paradeiser */
  --d6: #F5A04A; /* Sa Karotte */
  --d7: #5B9BD5; /* So Heidelbeere */

  --tk-w: color-mix(in srgb, var(--d7) 48%, #fff);
  --tk-k: color-mix(in srgb, var(--d4) 48%, #fff);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 1px 0 rgba(28, 42, 35, .06), 0 8px 24px -12px rgba(28, 42, 35, .25);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 64px;
  --font: "Bricolage", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121A16;
    --surface: #1B2520;
    --surface-2: #24302A;
    --ink: #E8F0EA;
    --ink-2: #A5B5AB;
    --ink-3: #6F8177;
    --line: #2C3932;
    --herb: #5CC08A;
    --herb-soft: #1F3B2C;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 420;
  font-variation-settings: "opsz" 14;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--herb); outline-offset: 2px; border-radius: 6px; }

.app { min-height: 100%; }
.view {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 18px) 18px calc(var(--tabbar-h) + var(--safe-b) + 28px);
  outline: none;
}

/* ---------- Typo ---------- */
.title {
  font-size: 40px;
  line-height: 1;
  font-weight: 760;
  letter-spacing: -.035em;
  font-variation-settings: "opsz" 96;
  margin: 0;
}
.subtitle { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 28px 0 10px;
  font-variation-settings: "opsz" 48;
}
.h3 { font-size: 15px; font-weight: 650; color: var(--ink-2); margin: 18px 0 6px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; }

/* ---------- Header ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.head__actions { display: flex; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-weight: 620; font-size: 16px; text-decoration: none;
  transition: transform .12s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--saffron); color: var(--saffron-ink); }
.btn--herb { background: var(--herb); color: #fff; }
.btn--ghost { background: transparent; }
.btn--danger { background: transparent; color: var(--danger); }
.btn--block { width: 100%; }
.btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn svg { width: 20px; height: 20px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn--flat { box-shadow: none; background: transparent; }

svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; gap: 6px;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative;
  flex: 1; max-width: 140px; height: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--ink-3); font-size: 12px; font-weight: 600;
  border-radius: 14px;
}
.tab__icon { width: 24px; height: 24px; }
.tab.is-active { color: var(--ink); }
.tab.is-active .tab__icon { stroke-width: 2.3; }
.tab.is-active::before {
  content: ""; position: absolute; top: -9px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ink);
}
.tab__badge {
  position: absolute; top: 2px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--d5); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}

/* ---------- Woche ---------- */
.weeknav { display: flex; align-items: center; gap: 8px; }
.weeknav__label { font-weight: 650; min-width: 0; }
.days { display: flex; flex-direction: column; gap: 10px; }
.day {
  display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start;
  padding: 12px 14px 12px 12px;
  background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--shadow);
}
.day.is-past { opacity: .55; }
.plate {
  --c: var(--d1);
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--c); color: #16211b;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .35), inset 0 0 0 7px rgba(0, 0, 0, .04);
  line-height: 1;
}
.plate__dow { font-weight: 780; font-size: 19px; letter-spacing: -.02em; font-variation-settings: "opsz" 48; }
.plate__date { font-size: 12px; font-weight: 600; margin-top: 3px; opacity: .8; }
.day.is-today .plate { box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .5), 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }
.day__today { font-size: 12px; font-weight: 700; color: var(--herb); margin: 0 0 2px; }
.slots { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.slot {
  display: flex; align-items: center; gap: 10px; min-height: 44px; width: 100%;
  padding: 6px 10px; margin: 0 -10px; border: 0; border-radius: 12px; background: transparent; text-align: left;
}
.slot:active { background: var(--surface-2); }
.slot__meal { flex: 0 0 52px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.slot__body { flex: 1; min-width: 0; }
.slot__name { font-weight: 640; font-size: 16px; line-height: 1.25; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot__meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; column-gap: 10px; }
.slot__meta span { white-space: nowrap; }
.slot__empty { color: var(--ink-3); font-weight: 500; }
.slot.is-done .slot__name { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--ink-2); }
.slot__thumb { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px; object-fit: cover; }

.week-actions { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- Thumbnails / Emoji-Kacheln ---------- */
.tile {
  display: grid; place-items: center; font-size: 26px;
  background: var(--tile, var(--surface-2));
  border-radius: 14px; overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Rezepte ---------- */
.search {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -18px 4px; padding: calc(var(--safe-t) + 8px) 18px 10px;
  background: var(--bg);
}
.search__field {
  display: flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow);
}
.search__field svg { width: 20px; height: 20px; color: var(--ink-3); flex: 0 0 auto; }
.search__field input { flex: 1; border: 0; background: transparent; outline: none; font-size: 17px; min-width: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px 4px; margin: 0 -18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; overflow: visible; padding: 4px 0; margin: 0; }
.chip {
  flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip--add { border-style: dashed; color: var(--ink-2); }

.rlist { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.rcard {
  display: grid; grid-template-columns: 68px 1fr auto; gap: 14px; align-items: center;
  padding: 10px 6px; border-radius: var(--r-m); text-decoration: none;
}
.rcard:active { background: var(--surface-2); }
.rcard .tile { width: 68px; height: 68px; }
.rcard__name { font-weight: 660; font-size: 17px; line-height: 1.2; }
.rcard__meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.rcard__fav { color: var(--d5); }
.tagdots { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.tagdot { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }

.fab {
  position: fixed; right: max(18px, calc(50% - 302px)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 15;
  height: 56px; padding: 0 22px 0 18px; border-radius: 999px; border: 0;
  background: var(--saffron); color: var(--saffron-ink); font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 10px 24px -8px rgba(160, 110, 0, .55);
}
.fab svg { width: 22px; height: 22px; stroke-width: 2.4; }
.fab:active { transform: scale(.96); }

/* ---------- Rezept-Detail ---------- */
.detail-hero {
  position: relative; margin: calc(-18px - var(--safe-t)) -18px 0;
  height: 260px; background: var(--tile, var(--surface-2));
  display: grid; place-items: center; font-size: 84px; overflow: hidden;
}
.detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-hero__bar {
  position: absolute; top: calc(var(--safe-t) + 12px); left: 14px; right: 14px;
  display: flex; justify-content: space-between; z-index: 2;
}
.detail-card {
  position: relative; margin: -28px -18px 0; padding: 24px 18px 8px;
  background: var(--bg); border-radius: 28px 28px 0 0;
}
.detail-title { font-size: 32px; line-height: 1.05; font-weight: 760; letter-spacing: -.03em; font-variation-settings: "opsz" 72; margin: 0; }
.facts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; color: var(--ink-2); font-size: 14px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.facts svg { width: 17px; height: 17px; }

.servings {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 22px 0 6px; padding: 8px 8px 8px 20px;
  background: var(--surface); border-radius: 999px; box-shadow: var(--shadow);
}
.servings__label { font-weight: 650; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--surface-2); font-size: 22px; font-weight: 600; line-height: 1;
}
.stepper output { min-width: 34px; text-align: center; font-size: 22px; font-weight: 760; font-variant-numeric: tabular-nums; }
.quickserv { display: flex; gap: 8px; margin: 8px 0 0; }
.quickserv .chip { height: 32px; font-size: 13px; }

.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients li {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.ingredients li:last-child { border-bottom: 0; }
.ing__amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ing__name { min-width: 0; }
.comp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 2px; }
.comp-head a { font-size: 13px; color: var(--herb); font-weight: 650; text-decoration: none; }
.comp-tag { font-size: 12px; font-weight: 650; color: var(--herb); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; }
.step {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; width: 100%;
  padding: 12px 0; border: 0; background: none; text-align: left; font-size: 17px; line-height: 1.5;
}
.step::before {
  content: counter(s); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 760;
  background: var(--surface-2); color: var(--ink-2);
}
.step.is-done { color: var(--ink-3); text-decoration: line-through; }
.step.is-done::before { content: "✓"; background: var(--herb); color: #fff; }
.steps .step-sub { list-style: none; font-weight: 700; margin: 14px 0 0; counter-increment: none; }
.notes p { margin: 0 0 10px; }

.actionrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 0; }
.linkrow { display: flex; flex-direction: column; gap: 4px; margin: 26px 0 0; }
.linkrow a, .linkrow button {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 4px;
  text-decoration: none; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--line);
  font-weight: 560; text-align: left; width: 100%;
}
.linkrow svg { width: 20px; height: 20px; color: var(--ink-2); }

/* ---------- Einkauf ---------- */
.adder {
  position: sticky; top: 0; z-index: 5;
  margin: 0 -18px 0; padding: calc(var(--safe-t) + 8px) 18px 10px; background: var(--bg);
}
.adder form { display: flex; gap: 8px; }
.adder input {
  flex: 1; min-width: 0; height: 54px; padding: 0 20px; border-radius: 999px;
  border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 17px; outline: none;
}
.adder button { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--saffron); color: var(--saffron-ink); display: grid; place-items: center; flex: 0 0 auto; }
.adder button svg { width: 24px; height: 24px; stroke-width: 2.6; }
.suggest { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px 0; margin: 0 -18px; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }

.cat { margin-top: 18px; }
.cat__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 4px; }
.cat__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.items { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item__main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 8px 4px 8px 14px; border: 0; background: none; text-align: left;
}
.check {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  border: 2.2px solid var(--ink-3); display: grid; place-items: center; transition: all .18s;
}
.check svg { width: 16px; height: 16px; stroke-width: 3; color: #fff; opacity: 0; }
.item.is-checking .check { background: var(--herb); border-color: var(--herb); }
.item.is-checking .check svg { opacity: 1; }
.item.is-checking .item__name { text-decoration: line-through; color: var(--ink-3); }
.item__txt { min-width: 0; }
.item__name { font-weight: 640; font-size: 17px; line-height: 1.25; }
.item__amt { color: var(--ink-2); font-weight: 500; margin-left: 6px; }
.item__by { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.item__more { width: 48px; height: 58px; border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; }
.item__more svg { width: 20px; height: 20px; }
.item.is-pending .item__name::after { content: " ⋯"; color: var(--ink-3); }

.recent { margin-top: 30px; }
.empty {
  text-align: center; padding: 48px 20px; color: var(--ink-2);
}
.empty__art { font-size: 54px; line-height: 1; margin-bottom: 12px; }
.empty__title { font-weight: 700; color: var(--ink); font-size: 18px; margin: 0 0 4px; }

/* ---------- Einkauf als Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tiles--small { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 520px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tiles--small { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stile {
  position: relative; aspect-ratio: 1; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 10px 6px 8px; border: 0; border-radius: 18px;
  background: var(--c); color: #16211B; text-align: center;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
  transition: transform .12s ease;
}
.stile:active { transform: scale(.95); }
.stile__icon { width: 42%; height: auto; aspect-ratio: 1; flex: 0 0 auto; stroke-width: 1.7; }
.stile__letter { font-size: 34px; line-height: 1.15; font-weight: 780; font-variation-settings: "opsz" 48; }
.stile__name {
  max-width: 100%; font-size: 13.5px; line-height: 1.15; font-weight: 660;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; hyphens: auto;
}
.stile__amt { max-width: 100%; font-size: 11.5px; font-weight: 600; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stile__by {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 750; background: rgba(255, 255, 255, .7);
}
.stile.is-checking::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--herb); color: #fff; font-size: 44px; font-weight: 800; animation: fade .15s ease;
}
.stile.is-pending { opacity: .7; }
.stile--recent { background: var(--surface-2); color: var(--ink-2); }
.tiles--small .stile { border-radius: 14px; padding: 6px 4px; gap: 2px; }
.tiles--small .stile__name { font-size: 11.5px; font-weight: 600; }
.tiles--small .stile__letter { font-size: 24px; }

/* ---------- Tiefkühl ---------- */
.tk-ort { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.tk-ort .seg { flex: 1; max-width: 260px; }
.tk-ort .seg button { height: 36px; font-size: 14px; }
.tk-title { justify-content: flex-start; }
.tk-sum { margin-left: auto; font-weight: 600; color: var(--ink-3); font-size: 13px; }
.stile__count {
  position: absolute; top: 7px; right: 7px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  display: grid; place-items: center; background: #16211B; color: #fff; font-size: 13px; font-weight: 760;
}
.stile__amt.is-old { color: #A3281A; opacity: 1; }
.stile__amt.is-old::before { content: "● "; font-size: 8px; vertical-align: 2px; }
.stile__plan { opacity: 1; font-weight: 700; }
.stile.is-minus::after { content: "−1"; background: var(--d7); color: #fff; font-size: 34px; }

/* ---------- Vergangene Tage ---------- */
.past { margin-bottom: 0; }
.past__head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 8px 14px 8px 10px; border: 0; border-radius: var(--r-l);
  background: transparent; color: var(--ink-2); text-align: left; font-weight: 600;
}
.past__head:active { background: var(--surface-2); }
.past__stack { display: flex; padding-left: 6px; }
.past__stack i {
  width: 30px; height: 30px; margin-left: -6px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 780; color: #16211b;
  background: var(--c); box-shadow: 0 0 0 2.5px var(--bg); opacity: .75;
  transition: margin .45s cubic-bezier(.3, .8, .3, 1), transform .45s cubic-bezier(.3, .8, .3, 1);
  transition-delay: calc(var(--i) * 30ms);
}
.past.is-collapsed .past__stack i { margin-left: -16px; transform: rotate(calc(var(--i) * -8deg)); }
.past.is-collapsed .past__stack i:first-child { margin-left: 0; }
.past.is-collapsed .past__stack i:not(:last-child) { color: transparent; }
.past__stack i:first-child { margin-left: 0; }
.past__label { flex: 1; font-size: 14px; }
.past__hint { font-size: 13px; color: var(--herb); font-weight: 700; }
.past__body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s cubic-bezier(.3, .8, .3, 1); }
.past.is-collapsed .past__body { grid-template-rows: 0fr; }
.past__inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 0 2px 10px; margin: 0 -2px; }
.past__inner .day { transition: transform .5s cubic-bezier(.3, .8, .3, 1), opacity .35s ease; transform-origin: top center; }
.past.is-collapsed .past__inner .day { transform: translateY(-24px) scale(.94); opacity: 0; }
.past.no-anim .past__body, .past.no-anim .past__inner .day, .past.no-anim .past__stack i { transition: none !important; }

/* ---------- Sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(12, 20, 16, .42); animation: fade .2s ease; }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - var(--safe-t) - 28px);
  display: flex; flex-direction: column;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b));
  animation: up .28s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .3);
}
.sheet.is-closing { animation: down .2s ease forwards; }
.sheet-wrap.is-closing .sheet-backdrop { animation: fade .2s ease reverse forwards; }
.sheet__grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; flex: 0 0 auto; }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.sheet__title { font-size: 24px; font-weight: 740; letter-spacing: -.025em; line-height: 1.1; margin: 4px 0 4px; font-variation-settings: "opsz" 48; }
.sheet__body { overflow-y: auto; margin: 0 -18px; padding: 6px 18px 4px; -webkit-overflow-scrolling: touch; flex: 1 1 auto; }
.sheet__foot { padding-top: 12px; flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.picklist { display: flex; flex-direction: column; }
.pick {
  display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center;
  padding: 8px 4px; border: 0; background: none; text-align: left; border-radius: 12px;
}
.pick:active { background: var(--surface-2); }
.pick .tile { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
.pick__name { font-weight: 630; }
.pick__meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; column-gap: 10px; }

.dice {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 8px 0 6px;
  border: 0; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); text-align: left;
}
.dice__die { font-size: 30px; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.dice.is-rolling .dice__die { transform: rotate(540deg) scale(1.15); }
.dice__txt b { display: block; }
.dice__txt span { font-size: 13px; color: var(--ink-2); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist label {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 6px 2px; border-bottom: 1px solid var(--line);
}
.checklist input { width: 24px; height: 24px; accent-color: var(--herb); flex: 0 0 auto; }
.checklist .cl__amt { color: var(--ink-2); font-weight: 600; margin-left: auto; padding-left: 10px; white-space: nowrap; font-size: 14px; }
.checklist .cl__hint { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.field > span { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12.5px; }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); outline: none; font-size: 16px;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--herb); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; height: 40px; border: 0; border-radius: 999px; background: transparent; font-weight: 640; }
.seg button.is-on { background: var(--surface); box-shadow: var(--shadow); }

.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypick button {
  aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--surface-2); font-weight: 720; font-size: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.daypick button small { font-size: 10px; font-weight: 600; opacity: .7; margin-top: 2px; }
.daypick button.is-on { background: var(--c); color: #16211b; }

/* ---------- Login ---------- */
.login { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.login__plates { display: flex; justify-content: center; gap: 6px; margin-bottom: 26px; }
.login__plates i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); display: block; }
.who { display: flex; justify-content: center; gap: 18px; margin: 30px 0; }
.who button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 680; font-size: 17px; }
.who .avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; font-weight: 760; color: #16211b; background: var(--c); }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 26px 0; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pin-dots i.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.is-wrong { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; }
.pad button { height: 76px; border-radius: 50%; border: 0; background: var(--surface); font-size: 28px; font-weight: 620; box-shadow: var(--shadow); }
.pad button:active { background: var(--surface-2); }
.pad .pad__ghost { background: none; box-shadow: none; font-size: 15px; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 36px);
  padding: 12px 12px 12px 18px; border-radius: 24px;
  background: var(--ink); color: var(--bg); font-weight: 560; font-size: 15px; line-height: 1.3;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  animation: toast .25s cubic-bezier(.2, .9, .3, 1.2);
}
.toast span { min-width: 0; }
.toast button { white-space: nowrap; flex: 0 0 auto; border: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); font-weight: 700; padding: 8px 14px; border-radius: 999px; }
@keyframes toast { from { transform: translate(-50%, 20px); opacity: 0; } }

.banner { font-size: 13px; color: var(--ink-2); background: var(--surface-2); padding: 8px 14px; border-radius: 12px; margin: 0 0 14px; }
.loading { padding: 40px 0; text-align: center; color: var(--ink-3); }
.spin { display: inline-block; width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--herb); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.settings-list { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); padding: 4px 16px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (min-width: 700px) {
  .view { padding-top: 32px; }
  .title { font-size: 48px; }
}
