:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --text: #1f2421;
  --muted: #7a807c;
  --line: #e6e4de;
  --accent: #2f7d5b;
  --accent-soft: #e3f0e9;
  --danger: #c2453d;
  --radius: 14px;
  --tap: 56px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151816;
    --card: #1f2321;
    --text: #eef1ef;
    --muted: #8d948f;
    --line: #2d322f;
    --accent: #4fae84;
    --accent-soft: #1f3a2d;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(env(safe-area-inset-bottom) + 24px) env(safe-area-inset-left);
  -webkit-text-size-adjust: 100%;
}
main { max-width: 560px; margin: 0 auto; padding: 0 16px; }

.top {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
}
h1 { font-size: 28px; margin: 0; letter-spacing: -0.02em; }
.sync { font-size: 12px; color: var(--accent); transition: color .3s; }
.sync.offline { color: var(--danger); }

/* Eingabe */
.add { display: flex; gap: 8px; margin-bottom: 10px; }
.add input {
  flex: 1; min-width: 0; height: var(--tap);
  font-size: 18px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text);
  outline: none;
}
.add input:focus { border-color: var(--accent); }
.btn-add {
  width: var(--tap); height: var(--tap); flex: none;
  border: 0; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-size: 30px; line-height: 1;
}

.btn-photo {
  display: flex; align-items: center; justify-content: center;
  height: var(--tap); margin-bottom: 22px;
  border: 1.5px dashed var(--accent); border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; cursor: pointer; user-select: none;
}
.btn-photo:active { opacity: .7; }
.btn-photo.busy { opacity: .6; pointer-events: none; }

.section-title {
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 0 4px 8px;
}
.count { font-weight: 500; }
.hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 13px; margin-left: 6px; }

/* Liste */
.list { list-style: none; margin: 0 0 26px; padding: 0; }
.item {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 8px;
}
/* Rot nur beim Wischen zeigen, sonst blitzt es an den runden Ecken durch */
.item.dragging, .item.removing { background: var(--danger); }
.item .del-label { opacity: 0; }
.item.dragging .del-label, .item.removing .del-label { opacity: 1; }
.item-inner {
  display: flex; align-items: center; gap: 4px;
  min-height: 60px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .2s ease;
  touch-action: pan-y;
}
.item.dragging .item-inner { transition: none; }
.item .del-label {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: #fff; font-weight: 600; font-size: 15px;
}

.check {
  flex: none; width: 60px; height: 60px;
  display: grid; place-items: center;
  border: 0; background: none; padding: 0; cursor: pointer;
}
.check::before {
  content: ""; width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid var(--muted);
  display: block;
}
.bought .check::before {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/20px no-repeat;
}
.name { flex: 1; padding: 14px 0; word-break: break-word; }
.bought .name { color: var(--muted); text-decoration: line-through; }
.time { color: var(--muted); font-size: 13px; padding-left: 8px; white-space: nowrap; }
.x {
  flex: none; width: 52px; height: 60px; margin-right: 4px;
  display: grid; place-items: center;
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--muted);
}
.x svg {
  width: 34px; height: 34px; padding: 8px; border-radius: 50%;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  opacity: .55; transition: background .15s, opacity .15s, color .15s;
}
.x:active svg, .x:hover svg { opacity: 1; background: var(--bg); color: var(--danger); }
.empty { text-align: center; color: var(--muted); margin: 8px 0 26px; }

/* Vorschau-Dialog */
dialog {
  border: 0; padding: 0; width: min(560px, 100vw); max-width: 100vw;
  margin: auto auto 0; border-radius: 20px 20px 0 0;
  background: var(--card); color: var(--text);
  max-height: 88vh;
}
dialog::backdrop { background: rgba(0,0,0,.35); }
.sheet { padding: 20px 16px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; max-height: 88vh; }
.sheet h2 { margin: 0 0 4px; font-size: 22px; }
.muted { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.preview-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.preview-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.preview-list input[type=checkbox] { width: 26px; height: 26px; flex: none; accent-color: var(--accent); }
.preview-list input[type=text] {
  flex: 1; min-width: 0; height: 48px; font-size: 17px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text);
}
.preview-list li.off input[type=text] { opacity: .45; text-decoration: line-through; }
.preview-list .dup { font-size: 12px; color: var(--muted); flex: none; }
.btn-link { background: none; border: 0; color: var(--accent); font-size: 16px; padding: 10px 0; text-align: left; }
.sheet-actions { display: flex; gap: 10px; margin-top: 10px; }
.sheet-actions button { flex: 1; height: var(--tap); border-radius: var(--radius); font-size: 17px; font-weight: 600; border: 0; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:disabled { opacity: .5; }
.btn-secondary { background: var(--bg); color: var(--text); }

/* ---------- Tab-Leiste ---------- */
:root { --tabbar-h: 58px; }
body { padding-bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 24px); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 8px;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; flex: 0 1 120px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500;
}
.tab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: var(--accent); }
.badge {
  position: absolute; top: 6px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- Startseite ---------- */
.hero { max-width: 560px; margin: 0 auto; padding: 26px 20px 18px; }
.hero-date { margin: 0 0 2px; color: var(--muted); font-size: 15px; font-weight: 500; }
.hero h1 { font-size: 34px; letter-spacing: -0.025em; padding-right: 52px; line-height: 1.15; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; margin-bottom: 26px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px -12px rgba(0,0,0,.08);
}
.card-head { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.card-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card-icon svg, .tile-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card-title { flex: 1; font-weight: 600; font-size: 17px; }
.card-chevron { color: var(--muted); font-size: 26px; line-height: 1; padding-right: 2px; }

.shop-summary { display: flex; align-items: baseline; gap: 8px; margin: 14px 2px 10px; color: inherit; text-decoration: none; }
.big-number { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.big-label { color: var(--muted); font-size: 16px; }
.card-shop.is-empty .big-number { display: none; }
.card-shop.is-empty .big-label { color: var(--text); font-size: 18px; font-weight: 500; }

.chips { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chips li {
  padding: 6px 12px; border-radius: 999px; font-size: 15px;
  background: var(--bg); border: 1px solid var(--line);
}
.chips li.more { color: var(--muted); background: none; border-style: dashed; }

.quick-add { display: flex; gap: 8px; }
.quick-add input {
  flex: 1; min-width: 0; height: 50px; font-size: 17px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); outline: none;
}
.quick-add input:focus { border-color: var(--accent); }
.quick-add button {
  width: 50px; height: 50px; flex: none; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font-size: 26px; line-height: 1;
}
.link-photo {
  display: block; text-align: center; margin-top: 12px; padding: 6px;
  color: var(--accent); font-weight: 600; font-size: 15px; text-decoration: none;
}

.home-section { margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 132px; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
}
.tile strong { font-size: 16px; margin-top: 8px; }
.tile span:last-child { color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.tile.soon { position: relative; }
.tile.soon::after {
  content: "bald"; position: absolute; top: 14px; right: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); background: var(--bg); padding: 3px 8px; border-radius: 999px;
}
.tile-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.tone-orange { background: #fbeadb; color: #c4651c; }
.tone-blue   { background: #e1ecfa; color: #2f6bbf; }
.tone-green  { background: var(--accent-soft); color: var(--accent); }
.tone-purple { background: #ece6f7; color: #6c4fb0; }
@media (prefers-color-scheme: dark) {
  .tone-orange { background: #3d2a1a; color: #f0a061; }
  .tone-blue   { background: #1c2c42; color: #7eaee8; }
  .tone-purple { background: #2c2442; color: #b39cec; }
}

/* ---------- Familie: Avatare & „Wer bist du?“ ---------- */
.avatar {
  --c: var(--accent);
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--c) 16%, var(--card)); color: var(--c);
  font-size: 12px; font-weight: 700; line-height: 1;
}
.avatar-lg { width: 52px; height: 52px; font-size: 22px; }
.me-switch {
  border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%;
}
.me-switch .avatar { width: 38px; height: 38px; font-size: 17px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent); }
.hero { position: relative; }
.hero .me-slot { position: absolute; right: 20px; top: 28px; }
.top-right { display: flex; align-items: center; gap: 12px; }
.item .avatar { margin-right: 4px; }

.who {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: end center;
  background: rgba(0,0,0,.4);
  animation: fade .2s ease;
}
.who-card {
  width: min(560px, 100%);
  background: var(--card); color: var(--text);
  border-radius: 24px 24px 0 0;
  padding: 26px 20px calc(env(safe-area-inset-bottom) + 20px);
  animation: rise .25s ease;
}
.who-card h2 { margin: 0 0 16px; font-size: 26px; letter-spacing: -0.02em; }
.who-card p { margin: 4px 0 18px; color: var(--muted); }
.who-list { display: grid; gap: 10px; }
.who-person {
  display: flex; align-items: center; gap: 14px;
  min-height: 72px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--bg); color: var(--text);
  font-size: 19px; font-weight: 600; text-align: left; cursor: pointer;
}
.who-person.is-current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.who-person:active { transform: scale(.99); }
.who-cancel {
  width: 100%; margin-top: 12px; height: 50px; border: 0; border-radius: 14px;
  background: none; color: var(--muted); font-size: 17px;
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: .6; } }

/* ---------- Kühlschrank ---------- */
.btn-block { display: block; width: 100%; height: var(--tap); border: 0; border-radius: var(--radius); font-size: 17px; font-weight: 600; }
.status-kicker { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.status-title { margin: 2px 0 2px; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.fridge-status .muted { margin-bottom: 16px; }

.capture h2 { margin: 0; font-size: 20px; }
.capture-head { display: flex; align-items: center; justify-content: space-between; }
.capture-head .btn-link { padding: 4px 0; }
.capture .muted { margin: 4px 0 14px; }
.staged { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.staged:empty { display: none; }
.staged li { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg); }
.staged img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staged-num {
  position: absolute; left: 6px; top: 6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
}
.staged-rm {
  position: absolute; right: 4px; top: 4px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.staged-rm svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.capture-actions { margin-bottom: 14px; }
.capture-actions.busy { opacity: .5; pointer-events: none; }
.capture-add { margin-bottom: 6px; }
.from-library { display: block; text-align: center; font-size: 15px; cursor: pointer; }
.evaluating { text-align: center; color: var(--muted); margin: 12px 0 0; }

.photo-strip {
  list-style: none; margin: 0 -16px 22px; padding: 0 16px 4px;
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 16px; scrollbar-width: none;
}
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip li { flex: none; scroll-snap-align: start; }
.strip-photo { border: 0; padding: 0; background: none; color: inherit; text-align: left; cursor: pointer; width: 118px; }
.strip-photo img { width: 118px; height: 150px; object-fit: cover; border-radius: 14px; display: block; background: var(--line); }
.strip-label { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.result-head .section-title { margin-bottom: 0; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--line); }
.segmented button {
  border: 0; background: none; color: var(--text); font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.segmented button[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }

.card-flat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.shelf { margin-bottom: 10px; overflow: hidden; }
.shelf-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px 10px 10px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.shelf-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--line); }
.shelf-label { flex: 1; font-weight: 600; }
.shelf-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; line-height: 26px; text-align: center;
}
.shelf-error { margin: 0; padding: 12px 14px; color: var(--muted); font-size: 15px; }

.fridge-items { list-style: none; margin: 0; padding: 0; }
.fridge-items li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.fridge-items li:last-child { border-bottom: 0; }
.fi-name { flex: 1; }
.fi-amount { color: var(--muted); font-size: 15px; white-space: nowrap; }
.fi-where {
  font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.hint-approx { font-size: 13px; text-align: center; margin: 14px 8px 0; }

.viewer {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0;
  background: #000; color: #fff; padding: 0; overflow-y: auto;
}
/* Foto mit Markierungen: Container hat exakt das Seitenverhältnis des Fotos → Prozent-Rechtecke passen */
.vi-stage { background: #000; padding-top: env(safe-area-inset-top); }
.vi-wrap {
  --ar: .75;
  position: relative; margin: 0 auto;
  aspect-ratio: var(--ar);
  width: min(100%, calc(64dvh * var(--ar)));
}
.vi-wrap img { display: block; width: 100%; height: 100%; }
.vi-boxes { position: absolute; inset: 0; pointer-events: none; transition: background .2s; overflow: visible; }
.vi-boxes.dim { background: rgba(0,0,0,.35); }
.vi-box {
  position: absolute; border: 3px solid #ffd60a; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 18px rgba(255,214,10,.6);
  background: rgba(255,214,10,.12);
  animation: box-in .25s ease;
}
.vi-box-label {
  position: absolute; left: -3px; bottom: 100%; margin-bottom: 4px; max-width: 70vw;
  background: #ffd60a; color: #111; font-size: 13px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vi-box-label.below { bottom: auto; top: 100%; margin: 4px 0 0; }
.vi-box-label.right { left: auto; right: -3px; }
.vi-wrap { cursor: pointer; -webkit-user-select: none; user-select: none; }
.vi-miss {
  position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9); background: rgba(255,255,255,.15);
  animation: miss .9s ease forwards;
}
@keyframes miss { to { transform: scale(1.8); opacity: 0; } }
@keyframes box-in { from { transform: scale(1.15); opacity: 0; } }

.vi-hint { font-size: 13.5px; margin: 0 14px 8px; }
.vi-items li.vi-row { padding: 0; align-items: stretch; }
.vi-main {
  flex: 1; display: flex; align-items: baseline; gap: 10px; min-height: 48px;
  padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.vi-row.selected { background: color-mix(in srgb, #ffd60a 22%, var(--card)); }
.vi-edit-btn {
  flex: none; width: 52px; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer;
}
.vi-row.editing { display: block; background: var(--bg); }
.vi-edit { padding: 12px 14px; }
.vi-edit-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.vi-edit-row { display: flex; gap: 8px; }
.vi-edit input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); outline: none;
}
.vi-edit input:focus { border-color: var(--accent); }
.vi-edit input.vi-amount { flex: 0 0 34%; }
.vi-look { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.vi-edit-actions { display: flex; gap: 8px; margin-top: 10px; }
.vi-edit-actions button { height: 42px; padding: 0 14px; border-radius: 10px; border: 0; font-size: 15px; font-weight: 600; }
.vi-save { margin-left: auto; background: var(--accent); color: #fff; }
.vi-cancel { background: none; color: var(--muted); }
.vi-remove { background: none; color: var(--danger); padding-left: 0 !important; }
.vi-add { margin: 6px 14px 0; }
.fi-edited { color: var(--accent); font-size: 13px; font-weight: 700; }
.fridge-items li.tappable { cursor: pointer; }
.fridge-items li.tappable:active { background: var(--bg); }
.reanalyze { display: block; width: 100%; text-align: center; margin-top: 8px; font-size: 15px; }
.learned { margin-top: 26px; }
.learned-row { align-items: center !important; padding-right: 0 !important; }
.learned-row .fi-name { display: flex; flex-direction: column; }
.learned-detail { font-size: 13px; color: var(--muted); margin-top: 2px; }
.learned-row .x { height: 44px; }
.viewer-close {
  position: fixed; right: 14px; top: calc(env(safe-area-inset-top) + 10px); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 26px; line-height: 1;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.viewer-info { background: var(--card); color: var(--text); border-radius: 20px 20px 0 0; padding: 18px 4px calc(env(safe-area-inset-bottom) + 20px); min-height: 30dvh; }
.viewer-info h3 { margin: 0 14px 6px; font-size: 20px; }

/* Kühlschrank-Suche */
.fsearch { position: relative; margin-bottom: 14px; }
.fsearch svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.fsearch input {
  width: 100%; height: 50px; padding: 0 14px 0 44px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  outline: none; -webkit-appearance: none; appearance: none;
}
.fsearch input:focus { border-color: var(--accent); }
.search-results { margin-bottom: 26px; }
.search-found { margin: 0 4px 8px; font-weight: 600; color: var(--accent); }
.search-none {
  display: flex; flex-direction: column; gap: 2px; text-align: center;
  padding: 22px 16px; margin-bottom: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.search-none strong { font-size: 18px; }
.search-none .muted { font-size: 14px; }
.search-add { display: block; width: 100%; text-align: center; margin-top: 10px; padding: 10px; font-size: 15px; }
.search-onlist { text-align: center; color: var(--accent); font-weight: 600; margin: 12px 0 0; }

/* ---------- Gemeinsam: runde Knöpfe, Hinweise ---------- */
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; padding: 0 0 2px;
}
.plan-warning {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 14px;
  background: #fff4e0; color: #7a4b00;
}
@media (prefers-color-scheme: dark) { .plan-warning { background: #3a2a12; color: #f3c47b; } }
.btn-secondary.btn-block { background: var(--card); border: 1px solid var(--line); color: var(--text); }

/* ---------- Kochplan ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.week-label { font-weight: 600; font-size: 17px; }
.plan-day { margin-bottom: 10px; padding: 12px 12px 6px; }
.plan-day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-day.is-past { opacity: .55; }
.plan-day-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.plan-day-head strong { font-size: 17px; }
.plan-day-head .muted { font-size: 14px; }
.plan-items { display: flex; flex-direction: column; gap: 8px; }
.plan-empty { margin: 0 2px 4px; color: var(--muted); font-size: 15px; }
.plan-recipe {
  display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 14px;
  background: var(--bg); color: inherit; text-decoration: none;
}
.plan-recipe:active { opacity: .8; }
.plan-recipe img, .plan-recipe-noimg {
  width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none;
  background: var(--line); display: grid; place-items: center; font-size: 26px;
}
.plan-recipe-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-recipe-text strong { font-size: 16px; line-height: 1.25; }
.plan-recipe-sub { color: var(--accent); font-size: 14px; font-weight: 500; }
.plan-recipe .x { height: 44px; width: 40px; }
.plan-own { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 14px; background: var(--bg); }
.plan-own-icon { font-size: 20px; }
.plan-own-title { flex: 1; font-size: 16px; font-weight: 500; }
.plan-own .x { height: 40px; width: 40px; }
.plan-add { margin-top: 4px; }
.plan-add-btn { border: 0; background: none; color: var(--accent); font-size: 15px; font-weight: 600; padding: 10px 2px; cursor: pointer; }
.plan-add-form { display: flex; gap: 8px; margin: 6px 0; }
.plan-add-form input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); outline: none;
}
.plan-add-form input:focus { border-color: var(--accent); }
.plan-add-form .btn-primary { border: 0; border-radius: 12px; padding: 0 16px; font-size: 16px; font-weight: 600; }
.plan-add-links { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 6px; }
.plan-add-links .btn-link { font-size: 15px; text-decoration: none; padding: 8px 0; }
.plan-foot { font-size: 13px; text-align: center; margin-top: 16px; }

/* ---------- Rezepte ---------- */
.pick-banner {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.collection-grid, .recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.collection-tile, .recipe-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; border: 0; background: none;
  color: inherit; text-align: left; text-decoration: none; cursor: pointer; font: inherit; min-width: 0;
  -webkit-tap-highlight-color: transparent;
}
.collection-tile:active, .recipe-tile:active { transform: scale(.98); }
.collection-img, .recipe-tile-img {
  position: relative; display: block; aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  background: var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 20px -14px rgba(0,0,0,.35);
}
.collection-img { aspect-ratio: 4 / 5; }
.collection-img img, .recipe-tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; }
.collection-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 12px 12px;
  display: flex; flex-direction: column; gap: 2px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}
.collection-cap strong { font-size: 16px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.collection-cap span { font-size: 12.5px; opacity: .9; font-weight: 500; }
.time-badge {
  position: absolute; left: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tile-title {
  font-size: 15px; line-height: 1.25; font-weight: 600; padding: 0 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.list-head { display: flex; justify-content: space-between; align-items: center; }
.list-head .btn-link { text-decoration: none; padding: 6px 0; font-size: 16px; }
.list-title { margin: 4px 0 14px; font-size: 24px; letter-spacing: -0.02em; }

/* ---------- Rezept ---------- */
.recipe-page { padding-top: 0; }
.recipe-hero {
  position: relative; max-width: 560px; margin: 0 auto; overflow: hidden;
  aspect-ratio: 4 / 3.6; max-height: 62vh; background: var(--line);
}
.recipe-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%);
}
.hero-text { position: absolute; left: 0; right: 0; bottom: 34px; padding: 0 20px; color: #fff; }
.recipe-title {
  margin: 0 0 10px; font-size: 28px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,.35); text-wrap: balance;
}
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.2); color: #fff; font-size: 13.5px; font-weight: 600;
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255,255,255,.25);
}
.meta-icon { font-size: 13px; }
.back-btn {
  position: absolute; left: 14px; top: calc(env(safe-area-inset-top) + 12px); z-index: 2;
  background: rgba(0,0,0,.4); color: #fff; border: 1px solid rgba(255,255,255,.2); font-size: 30px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
/* ohne Bild: Titel normal auf hellem Grund */
.no-hero .recipe-hero { aspect-ratio: auto; height: auto; background: none; padding-top: calc(env(safe-area-inset-top) + 64px); }
.no-hero .recipe-hero img, .no-hero .hero-shade { display: none; }
.no-hero .hero-text { position: static; color: var(--text); padding-bottom: 8px; }
.no-hero .recipe-title { text-shadow: none; }
.no-hero .meta-chip { background: var(--card); color: var(--text); border-color: var(--line); }
.no-hero .back-btn { background: var(--card); color: var(--text); border-color: var(--line); }

/* Inhalt schiebt sich als Blatt über das Bild */
.recipe-sheet {
  position: relative; z-index: 1; margin-top: -22px !important;
  background: var(--bg); border-radius: 24px 24px 0 0; padding-top: 20px !important;
  padding-bottom: 96px !important;
}
.no-hero .recipe-sheet { margin-top: 0 !important; }

.recipe-plan { margin-bottom: 14px; }
.recipe-plan:empty { display: none; }
.plan-note {
  margin: 0; padding: 11px 14px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--accent-soft); color: var(--accent);
}

/* Zutaten-Check */
.check-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 16px 14px;
  margin-bottom: 26px; box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 28px -16px rgba(0,0,0,.12);
}
.check-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.check-kicker { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.check-score { margin: 2px 0 0; font-size: 22px; color: var(--muted); }
.check-score strong { color: var(--text); font-size: 28px; letter-spacing: -0.02em; }
.check-date { font-size: 12.5px; color: var(--muted); background: var(--bg); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.check-bar { display: flex; gap: 3px; height: 10px; margin: 14px 0 12px; border-radius: 999px; overflow: hidden; background: var(--line); }
.check-bar .seg { flex: 1 1 0; min-width: 6px; }
.check-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.seg-fridge { background: var(--accent); }
.seg-pantry { background: #a3b8ad; }
.seg-manual { background: #7fbf9f; }
.seg-list { background: #4a86d4; }
.seg-missing { background: #e0a03a; }

/* Zutatenliste */
.ing-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 2px; }
.ing-title { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.ing-servings { color: var(--muted); font-size: 14px; }
.ing-explain { font-size: 13px; color: var(--muted); margin: 2px 4px 12px; }
.ing-group {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 14px;
}
.ing-group-title { margin: 0; padding: 14px 16px 6px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing {
  display: flex; align-items: flex-start; gap: 2px; padding: 4px 16px 4px 2px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s;
  -webkit-user-select: none; user-select: none;
}
.ing:last-child { border-bottom: 0; }
.ing:active { background: var(--bg); }
.ing .check { width: 52px; height: 48px; flex: none; }
.ing .check::before { width: 24px; height: 24px; border-radius: 8px; }
.ing.checked .check::before {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.ing.on-list:not(.checked) .check::before { border-color: #4a86d4; border-style: dashed; }
.ing-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 0 11px; }
.ing-line { display: flex; align-items: baseline; gap: 12px; }
.ing-name { flex: 1; font-size: 16.5px; font-weight: 500; line-height: 1.3; }
.ing-amount { font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ing-optional { color: var(--muted); font-weight: 400; font-size: 14px; }
.ing-prep { font-size: 13.5px; color: var(--muted); line-height: 1.3; }
.ing.checked .ing-name, .ing.checked .ing-amount { color: var(--muted); font-weight: 400; }
.ing-status { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; margin-top: 1px; }
.ing-status svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-fridge { color: var(--accent); }
.st-pantry { color: var(--muted); font-weight: 500; }
.st-list { color: #4a86d4; }
.cookidoo-link {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; margin: 18px 0 4px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  color: var(--text); font-weight: 600; text-decoration: none;
}

.recipe-action {
  position: fixed; left: 0; right: 0; z-index: 9;
  bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h));
  padding: 14px 16px 10px; max-width: 560px; margin: 0 auto;
  background: linear-gradient(to top, var(--bg) 62%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.recipe-action .btn-primary { box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.recipe-action .btn-primary:disabled { background: var(--accent-soft); color: var(--accent); opacity: 1; box-shadow: none; }
.sheet-dialog { border: 0; padding: 0; width: min(560px, 100vw); max-width: 100vw; margin: auto auto 0; border-radius: 20px 20px 0 0; background: var(--card); color: var(--text); }
.sheet-dialog::backdrop { background: rgba(0,0,0,.35); }
.day-list { display: grid; gap: 8px; margin: 10px 0; }
.day-btn {
  height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font-size: 16px; font-weight: 500; text-align: left; padding: 0 16px; cursor: pointer;
}

/* Startseite: Kühlschrank-Zeile */
.card-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; }
.card-row:active { transform: scale(.99); }
.card-row-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.card-row-text strong { font-size: 17px; }
.tiles .tile:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }
a.tile { color: inherit; text-decoration: none; }
a.tile:active { transform: scale(.98); }
.tile-meta { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* Hinweis-Puls auf den Foto-Button, wenn man von der Startseite kommt */
.btn-photo.pulse { animation: pulse 1.2s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft); transform: scale(1.02); } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 16px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; font-size: 15px;
  transition: opacity .2s, transform .2s; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  display: inline-block; width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- SVG-Icons (icons.js) ---------- */
.ico {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.ico-sm { width: .95em; height: .95em; vertical-align: -0.12em; }
button .ico, .btn-photo .ico { margin-right: 2px; }
.btn-primary .ico, .btn-block .ico { margin-right: 6px; }
.btn-add .ico, .quick-add button .ico { width: 26px; height: 26px; margin: 0; stroke-width: 2.4; }
.round-btn .ico { width: 22px; height: 22px; margin: 0; stroke-width: 2.4; }
.back-btn .ico { width: 24px; height: 24px; }
.btn-add, .quick-add button, .round-btn { display: grid; place-items: center; padding: 0; }
.card-chevron { display: grid; place-items: center; color: var(--muted); }
.card-chevron .ico { width: 20px; height: 20px; }
.viewer-close { display: grid; place-items: center; padding: 0; }
.viewer-close .ico { width: 22px; height: 22px; margin: 0; stroke-width: 2.4; }
.icon-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.icon-link .ico { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: 2px; }
.back-link .ico { margin: 0 0 0 -4px; width: 20px; height: 20px; }
.plan-add-btn { display: inline-flex; align-items: center; gap: 6px; }
.plan-add-btn .ico { margin: 0; }
.plan-recipe-noimg .ico, .tile-fallback .ico { width: 30px; height: 30px; stroke-width: 1.6; color: var(--muted); }
.tile-fallback .ico { width: 40px; height: 40px; }
.plan-own-icon { display: grid; place-items: center; width: 28px; color: var(--muted); }
.plan-own-icon .ico { width: 20px; height: 20px; }
.plan-recipe-sub { display: inline-flex; align-items: center; gap: 2px; }
.plan-warning { display: flex; gap: 8px; align-items: flex-start; }
.plan-warning .ico { margin-top: 1px; }
.plan-note { display: flex; align-items: center; gap: 8px; }
.fi-edited { width: 15px; height: 15px; color: var(--accent); stroke-width: 2.6; margin-left: 4px; vertical-align: -0.15em; }
.vi-edit-btn { display: grid; place-items: center; }
.vi-edit-btn .ico { width: 19px; height: 19px; margin: 0; }
.search-onlist { display: flex; align-items: center; justify-content: center; gap: 6px; }
.time-badge { display: inline-flex; align-items: center; gap: 4px; }
.time-badge .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.meta-chip .meta-icon { width: 15px; height: 15px; stroke-width: 2.1; }
.all-there { display: inline-flex; align-items: center; gap: 6px; color: var(--accent) !important; }
.all-there .ico { width: 24px; height: 24px; }
.empty .ico { color: var(--accent); }
.cookidoo-link .ico { width: 17px; height: 17px; }
.fsearch .search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px;
  color: var(--muted); pointer-events: none; vertical-align: 0;
}
/* Sync-Punkt als reine Form statt Zeichen */
.sync { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; font-size: 0; }
.sync.offline { background: var(--danger); }
/* hidden muss immer gewinnen – auch gegen display:flex/grid-Regeln */
[hidden] { display: none !important; }
.plan-recipe-sub { display: block; }
.plan-recipe-sub .ico { vertical-align: -0.15em; margin-left: 1px; }

/* Rezept: Kühlschrank-Treffer antippbar + kleines Foto-Popup */
button.ing-status.as-link {
  border: 0; background: none; padding: 4px 8px 4px 0; margin: -2px 0 -4px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent); cursor: pointer; text-align: left; align-self: flex-start; border-radius: 8px;
}
button.ing-status.as-link .ico-sm { width: 13px; height: 13px; margin-left: 1px; }
button.ing-status.as-link:active { background: var(--accent-soft); }

.peek {
  border: 0; padding: 0; width: fit-content; max-width: 92vw; max-height: 86dvh; margin: auto;
  border-radius: 22px; overflow: hidden; background: var(--card); color: var(--text);
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.45);
}
.peek[open] { animation: peek-in .2s ease; }
.peek::backdrop { background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@keyframes peek-in { from { transform: scale(.94); opacity: 0; } }
.peek-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 12px 10px 16px; }
.peek-head h3 { margin: 0; font-size: 18px; }
.peek-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.peek-close {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); color: var(--text);
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.peek-close .ico { width: 18px; height: 18px; margin: 0; stroke-width: 2.4; }
.peek-wrap {
  --ar: .75; position: relative; margin: 0 auto; background: #000;
  aspect-ratio: var(--ar); width: min(88vw, 360px, calc(48dvh * var(--ar)));
}
.peek-wrap img { display: block; width: 100%; height: 100%; }
.peek-nopos { margin: 0; padding: 10px 16px 14px; color: var(--muted); font-size: 14px; }

/* ---------- Grundvorrat ---------- */
.pantry { margin-top: 26px; scroll-margin-top: 16px; }
.pantry-head { display: flex; align-items: baseline; gap: 6px; }
.pantry-head .section-title { margin-bottom: 8px; }
.pantry-head .count { color: var(--muted); font-size: 13px; font-weight: 600; }
.pantry-card { padding: 12px; }
.pantry-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pantry-chips:empty { display: none; }
.pantry-chip {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); font-size: 15px;
}
.pantry-rm {
  width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted);
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.pantry-rm .ico { width: 14px; height: 14px; margin: 0; stroke-width: 2.4; }
.pantry-rm:active { background: var(--line); color: var(--danger); }
.pantry-add { display: flex; gap: 8px; }
.pantry-add input {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); outline: none;
}
.pantry-add input:focus { border-color: var(--accent); }
.pantry-add button {
  width: 46px; height: 46px; flex: none; border: 0; border-radius: 12px; background: var(--accent); color: #fff;
  display: grid; place-items: center; padding: 0;
}
.pantry-add button .ico { width: 22px; height: 22px; margin: 0; stroke-width: 2.4; }
.search-pantry strong { color: var(--accent); }

/* Rezept: „Grundvorrat bearbeiten“ + Snackbar „Immer da?“ */
.check-edit { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.snack {
  position: fixed; left: 50%; z-index: 20; width: min(92vw, 420px);
  bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 86px);
  transform: translate(-50%, 16px); opacity: 0; transition: opacity .2s, transform .2s;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 16px;
  background: var(--text); color: var(--bg); box-shadow: 0 12px 30px -10px rgba(0,0,0,.4);
}
.snack.show { opacity: 1; transform: translate(-50%, 0); }
.snack span { flex: 1; font-size: 15px; font-weight: 500; }
.snack button {
  border: 0; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .snack button { background: var(--accent-soft); color: var(--accent); } }

/* ---------- Kalender ---------- */
.cal-filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
.cal-filters::-webkit-scrollbar { display: none; }
.cal-filter {
  --c: var(--text);
  display: inline-flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer;
}
.cal-filter .avatar { width: 24px; height: 24px; font-size: 11px; margin: 0 0 0 -8px; }
.cal-filter.active { background: var(--c); border-color: var(--c); color: var(--bg); font-weight: 700; }
.cal-filter.active[style] { color: #fff; }
.cal-filter.active .avatar { background: rgba(255,255,255,.25); color: #fff; }

.cal-month {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px 10px 10px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 12px 30px -20px rgba(0,0,0,.18);
}
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px 8px; }
.month-label { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
.month-label strong { font-size: 22px; letter-spacing: -0.02em; text-transform: capitalize; }
.month-label span { font-size: 17px; color: var(--muted); font-weight: 500; }
.month-arrows { display: flex; gap: 6px; }
.month-arrows .round-btn { width: 36px; height: 36px; background: var(--bg); border-color: transparent; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays span { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 2px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.cal-weekdays span:nth-child(n+6) { opacity: .7; }
.cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px; height: 50px; padding: 4px 0 0;
  border: 0; background: none; color: var(--text); font: inherit; cursor: pointer;
}
.cal-num {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px;
  font-size: 15.5px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background .15s;
}
.cal-day.weekend .cal-num { color: var(--muted); }
.cal-day.other .cal-num { opacity: .35; }
.cal-day:active .cal-num { background: var(--bg); }
.cal-day.today .cal-num { background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.cal-day.selected .cal-num { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }

/* Terminliste: Datumsspalte links, Karten rechts */
.ag-day { display: grid; grid-template-columns: 52px 1fr; gap: 10px; margin-bottom: 14px; scroll-margin-top: 12px; }
.ag-day.past { opacity: .5; }
.ag-date { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.ag-wd { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ag-num { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ag-rel { margin-top: 3px; font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.ag-day.is-today .ag-num {
  color: #fff; background: var(--accent); width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-top: 2px;
}
.ag-day.selected:not(.is-today) .ag-num { color: var(--accent); }
.ag-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.evc {
  --c: var(--accent);
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px;
  padding: 10px 12px 10px 14px; border: 0; border-radius: 16px; text-align: left; cursor: pointer; font: inherit; color: var(--text);
  background: color-mix(in srgb, var(--c) 11%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 18%, transparent);
  overflow: hidden;
}
.evc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.evc[style*="--c2"]::before { background: linear-gradient(var(--c) 50%, var(--c2) 50%); }
.evc:active { transform: scale(.985); }
.evc-time { flex: none; width: 46px; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.evc-time strong { font-size: 15px; }
.evc-time span { font-size: 13px; color: var(--muted); }
.evc-allday { font-size: 12px !important; font-weight: 600; line-height: 1.2; }
.evc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.evc-title { font-size: 16px; line-height: 1.25; font-weight: 700; }
.evc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.evc-loc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.evc-icon .ico, .evc-tag .ico { width: 13px; height: 13px; vertical-align: -0.15em; }
.evc-tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: color-mix(in srgb, var(--c) 75%, var(--text)); }
.evc-chip { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: var(--danger); color: #fff; }
.evc-who { display: flex; flex: none; }
.evc-who .avatar { width: 28px; height: 28px; font-size: 12.5px; margin: 0 0 0 -8px; box-shadow: 0 0 0 2px var(--card); }
.evc-who .avatar:first-child { margin-left: 0; }
.evc-family { font-size: 12px; font-weight: 700; color: var(--muted); }
.evc.cancelled { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.evc.cancelled::before { background: repeating-linear-gradient(-45deg, var(--line) 0 4px, transparent 4px 8px); }
.evc.cancelled .evc-title, .evc.cancelled .evc-time { text-decoration: line-through; color: var(--muted); }
.evc.cancelled .evc-who { opacity: .5; }
.ag-add {
  display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 14px; border: 1.5px dashed var(--line); border-radius: 16px;
  background: none; color: var(--accent); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.ag-add .ico { margin: 0; }
.agenda-none { text-align: center; padding: 30px 0 10px; color: var(--muted); }
.agenda-none-ico .ico { width: 34px; height: 34px; stroke-width: 1.5; }
.agenda-none p { margin: 6px 0 0; }

.fab {
  position: fixed; right: max(16px, calc(50vw - 264px)); z-index: 9;
  bottom: calc(env(safe-area-inset-bottom) + var(--tabbar-h) + 16px);
  width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--accent); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--accent) 85%, transparent);
}
.fab .ico { width: 28px; height: 28px; margin: 0; stroke-width: 2.4; }
.cal-page main { padding-bottom: 70px; }

/* Detailansicht */
.detail-dialog { max-height: 90dvh; overflow: hidden; }
.detail { display: flex; flex-direction: column; max-height: 90dvh; }
.detail-band { height: 8px; flex: none; }
.detail-body { padding: 16px 16px calc(env(safe-area-inset-bottom) + 18px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.detail-body .ev-sheet-head h2 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; }
#d-title.struck { text-decoration: line-through; color: var(--muted); }
.d-cancelled { margin: -6px 0 0; display: inline-flex; align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 13px; font-weight: 700; }
.d-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.d-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px; border-radius: 14px;
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; border: 0;
}
.d-btn .ico { margin: 0; width: 19px; height: 19px; }
.d-primary { background: var(--accent); color: #fff; }
.d-secondary { background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.d-danger { background: none; color: var(--danger); }
.d-pause { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--bg); }
.d-pause-title { margin: 0; font-weight: 700; font-size: 16px; }
.d-pause-count { margin: 0; color: var(--accent); font-weight: 600; font-size: 14px; min-height: 1em; }
.d-actions-row { display: flex; gap: 8px; }
.d-actions-row button { flex: 1; height: 48px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; border: 0; }
.d-actions-row .btn-secondary { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.d-pause .ev-field input { background: var(--card); }

/* Termin-Formular */
.ev-dialog { max-height: 92dvh; }
.ev-sheet { gap: 12px; overflow-y: auto; }
.ev-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.ev-sheet-head h2 { margin: 0; font-size: 22px; }
.ev-title {
  width: 100%; height: 52px; padding: 0 14px; font-size: 19px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--text); outline: none;
}
.ev-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ev-field.grow { flex: 1; }
.ev-label { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ev-field input, .ev-field select, .ev-field textarea {
  width: 100%; min-height: 46px; padding: 0 12px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); outline: none;
  -webkit-appearance: none; appearance: none;
}
.ev-field textarea { padding: 10px 12px; resize: vertical; }
.ev-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a807c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 34px;
}
.ev-title:focus, .ev-field input:focus, .ev-field select:focus, .ev-field textarea:focus { border-color: var(--accent); }
.ev-frow { display: flex; gap: 10px; align-items: flex-end; }
.ev-switch { display: inline-flex; align-items: center; gap: 8px; height: 46px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.ev-switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.who-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.who-chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.who-chip .avatar { width: 28px; height: 28px; margin: 0; }
.who-chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); font-weight: 700; box-shadow: inset 0 0 0 1px var(--c); }
.who-hint { font-size: 13px; color: var(--muted); }
.ev-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.ev-save { flex: 1; height: var(--tap); border: 0; border-radius: var(--radius); font-size: 17px; font-weight: 600; }
.ev-delete { display: inline-flex; align-items: center; gap: 6px; height: var(--tap); padding: 0 14px; border: 0; background: none; color: var(--danger); font: inherit; font-weight: 600; cursor: pointer; }
.ev-delete .ico { margin: 0; }
.ev-delete-choice button { flex: 1; height: var(--tap); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.ev-delete-choice .btn-secondary { border: 1px solid var(--line); background: var(--card); color: var(--text); }
.ev-danger { border: 0; background: var(--danger); color: #fff; }
.ev-facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ev-facts li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; }
.ev-facts .ico { width: 20px; height: 20px; color: var(--accent); margin-top: 1px; }

/* Kochen: Umschalter Kochplan | Rezepte */
.seg-switch { display: flex; padding: 3px; border-radius: 12px; background: var(--line); margin-bottom: 14px; }
.seg-switch a {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 9px; font-size: 15px; font-weight: 500;
  color: var(--text); text-decoration: none;
}
.seg-switch a.on { background: var(--card); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Startseite: Termine */
.card-cal .card-icon { background: #e1ecfa; color: #2f6bbf; }
@media (prefers-color-scheme: dark) { .card-cal .card-icon { background: #1c2c42; color: #7eaee8; } }
.card-cal .card-icon .ico { width: 20px; height: 20px; }
.home-events { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.home-ev { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; border-radius: 10px; }
.home-ev:active { background: var(--bg); }
.home-ev-bar { width: 4px; height: 30px; border-radius: 4px; flex: none; }
.home-ev-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.home-ev-when { font-size: 13px; font-weight: 600; color: var(--muted); }
.home-ev-title { font-size: 15.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-ev-bar { align-self: stretch; height: auto; min-height: 30px; }
.home-ev-empty { color: var(--muted); font-size: 15px; padding: 4px 2px; }

/* Kalender: gewählter Tag unter dem Monat */
.day-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.day-title { margin: 0; display: flex; flex-direction: column; gap: 1px; }
.day-title strong { font-size: 20px; letter-spacing: -0.02em; text-transform: capitalize; }
.day-title span { font-size: 14px; font-weight: 500; color: var(--muted); }
.day-add {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.day-add .ico { width: 22px; height: 22px; margin: 0; stroke-width: 2.4; }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-empty { margin: 4px 4px 0; color: var(--muted); font-size: 15px; }
.cal-month { margin-bottom: 18px; }

/* Kalender-Formular: feste Fußleiste mit Abbrechen / Speichern */
.ev-sheet > * { flex-shrink: 0; }
.ev-sheet { padding-bottom: 0 !important; }
.ev-footer {
  position: sticky; bottom: 0; z-index: 2; display: flex; gap: 10px;
  margin: 4px -16px 0; padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px);
  background: var(--card); border-top: 1px solid var(--line);
}
.ev-footer button {
  height: 52px; border: 0; border-radius: 14px; font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.ev-cancel { flex: 1; background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.ev-footer .ev-save {
  flex: 2; background: var(--accent); color: #fff;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 85%, transparent);
}
.ev-footer .ev-save .ico { width: 20px; height: 20px; margin: 0; stroke-width: 2.6; }
.ev-footer button:active { transform: scale(.98); }

/* Kühlschrank: Aktionen, manuelle Einträge */
.fridge-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.fridge-actions:has(#add-photos[hidden]) { grid-template-columns: 1fr; }
.fa-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; height: 48px; border-radius: 14px; border: 0;
  background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.fa-btn .ico { margin: 0; width: 18px; height: 18px; color: var(--accent); }
.fa-btn:active { transform: scale(.98); }
.fridge-links { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 2px; }
.fridge-links .btn-link { font-size: 14px; text-decoration: none; padding: 6px 0; width: auto; margin: 0; }
.delete-scan { color: var(--danger) !important; }
.manual-head { cursor: default; }
.manual-thumb { display: grid; place-items: center; background: var(--accent-soft) !important; color: var(--accent); }
.manual-thumb .ico { width: 20px; height: 20px; }
.fridge-items li .manual-rm { height: 28px; width: 32px; margin: -6px -8px -6px 0; }
.fridge-items li .manual-rm .ico { width: 18px; height: 18px; margin: 0; padding: 0; opacity: .7; }
.manual-sheet { gap: 12px; }
.manual-amount { width: 34%; flex: none; }
.manual-added { margin: 0; min-height: 1.2em; color: var(--accent); font-weight: 600; font-size: 14px; }
.vi-remove-photo { display: flex; margin: 14px 14px 0; color: var(--danger) !important; font-size: 15px; }

/* Cookidoo-Bewertung */
.ico-fill { fill: currentColor; stroke: none; }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; color: #b7791f; }
.rating .ico { width: 14px; height: 14px; color: #f5a623; }
.rating small { font-weight: 500; color: var(--muted); }
.rating-badge {
  position: absolute; right: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 8px 4px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.92); color: #222; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.rating-badge .ico { width: 13px; height: 13px; color: #f5a623; }
.plan-rating { display: block; min-height: 0; }
.plan-rating .rating { margin-top: 1px; }
.meta-rating .ico { color: #ffc84a; width: 15px; height: 15px; }
.meta-rating small { color: rgba(255,255,255,.8); font-weight: 500; }
.no-hero .meta-rating small { color: var(--muted); }

/* Portionen-Regler */
.servings { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.srv-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; padding: 0; cursor: pointer;
}
.srv-btn .ico { width: 18px; height: 18px; margin: 0; stroke-width: 2.6; }
.srv-btn:disabled { opacity: .35; cursor: default; }
.srv-btn:not(:disabled):active { transform: scale(.92); }
.srv-label { min-width: 92px; text-align: center; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.srv-label strong { font-size: 16px; color: var(--text); }
.srv-label.changed strong { color: var(--accent); }
.ing-head { align-items: center !important; }
.ing-amount.scaled { color: var(--accent); }
.ing.checked .ing-amount.scaled { color: var(--muted); }

/* Startseite: Termine verlinkt + „Heute“ blinkend */
.home-ev { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 12px; color: inherit; text-decoration: none; }
.home-ev:active { background: var(--bg); }
.home-ev-go { color: var(--muted); display: grid; place-items: center; }
.home-ev-go .ico { width: 18px; height: 18px; }
.today-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; margin-right: 2px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  animation: today-pulse 1.6s ease-in-out infinite;
}
@keyframes today-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); }
  50% { opacity: .55; box-shadow: 0 0 0 5px color-mix(in srgb, var(--danger) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .today-badge { animation: none; } }

/* ---------- Ideen (Rezeptvorschläge) ---------- */
.idea-cats { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 2px; scrollbar-width: none; }
.idea-cats::-webkit-scrollbar { display: none; }
.idea-cat {
  flex: none; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.idea-cat.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.idea-quick { display: inline-flex; align-items: center; gap: 8px; margin: 2px 2px 16px; font-size: 15px; font-weight: 500; cursor: pointer; user-select: none; }
.idea-quick input { position: absolute; opacity: 0; pointer-events: none; }
.idea-switch { position: relative; width: 42px; height: 26px; border-radius: 999px; background: var(--line); transition: background .2s; flex: none; }
.idea-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.idea-quick input:checked + .idea-switch { background: var(--accent); }
.idea-quick input:checked + .idea-switch::after { transform: translateX(16px); }
.idea-quick .ico { width: 17px; height: 17px; color: #e0a03a; }

.ideas { display: flex; flex-direction: column; gap: 14px; transition: opacity .2s; }
.ideas.fading { opacity: .35; }
.idea-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--card);
  border: 1px solid var(--line); color: inherit; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 30px -20px rgba(0,0,0,.3);
  animation: idea-in .35s ease both;
}
.idea-card:active { transform: scale(.985); }
@keyframes idea-in { from { opacity: 0; transform: translateY(10px); } }
.idea-img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--line); overflow: hidden; }
.idea-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.idea-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.idea-title { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.idea-why { display: flex; align-items: flex-start; gap: 6px; font-size: 14.5px; color: var(--muted); line-height: 1.35; }
.idea-why .ico { width: 16px; height: 16px; margin-top: 1px; color: #e0a03a; flex: none; }
.idea-have { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); margin-top: 2px; }
.idea-meter { flex: 0 0 72px; height: 6px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.idea-meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

.idea-card.skeleton { animation: sk 1.2s ease-in-out infinite; }
.idea-card.skeleton .sk-line { display: block; height: 16px; margin: 14px 16px 0; border-radius: 8px; background: var(--line); }
.idea-card.skeleton .sk-line.short { width: 55%; margin-bottom: 16px; }
@keyframes sk { 50% { opacity: .55; } }

.reroll {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; margin: 18px 0 8px;
  border: 0; border-radius: 16px; background: var(--text); color: var(--bg); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer;
}
.reroll .ico { width: 24px; height: 24px; margin: 0; }
.reroll:disabled { opacity: .7; }
.reroll.spinning .ico { animation: dice .7s ease-in-out infinite; }
@keyframes dice { 0% { transform: rotate(0); } 50% { transform: rotate(180deg) scale(.85); } 100% { transform: rotate(360deg); } }
.idea-basis { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.seg-switch a { white-space: nowrap; }

/* ---------- Eigene SVG-Steuerelemente statt Browser-Symbolen ---------- */
/* Kästchen (z. B. Foto-Vorschau der Einkaufsliste) */
input[type="checkbox"]:not([id="quick"]) {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none;
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); background: var(--card);
  display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s;
}
input[type="checkbox"]:not([id="quick"]):checked {
  border-color: var(--accent); background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
/* „Ganztägig“ als Schalter wie „Schnell“ */
.ev-switch input[type="checkbox"] {
  width: 44px; height: 26px; border-radius: 999px; border: 0; background: var(--line); position: relative;
}
.ev-switch input[type="checkbox"]::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.ev-switch input[type="checkbox"]:checked { background: var(--accent); }
.ev-switch input[type="checkbox"]:checked::after { transform: translateX(18px); }

/* Datum & Uhrzeit: eigenes SVG-Symbol, das Browser-Symbol unsichtbar darüber (bleibt antippbar) */
input[type="date"], input[type="time"] {
  position: relative; padding-right: 40px !important;
  background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 18px !important;
}
input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7d5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2.5'/%3E%3Cpath d='M3.5 9.5h17M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
}
input[type="time"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7d5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E") !important;
}
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; margin: 0; padding: 0;
}
input[type="date"]::-webkit-inner-spin-button, input[type="time"]::-webkit-inner-spin-button { display: none; }

/* Ideen: zuerst Essensart wählen */
.idea-pick-title { margin: 4px 2px 12px; font-size: 22px; letter-spacing: -0.02em; }
.idea-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.idea-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 1;
  border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--text);
  font: inherit; cursor: pointer; padding: 8px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 10px 22px -18px rgba(0,0,0,.3);
}
.idea-tile:active { transform: scale(.96); background: var(--accent-soft); }
.idea-tile-ico { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.idea-tile-ico .ico { width: 26px; height: 26px; margin: 0; stroke-width: 1.8; }
.idea-tile-label { font-size: 13.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.idea-cat { display: inline-flex; align-items: center; gap: 6px; }
.idea-cat .ico { width: 17px; height: 17px; margin: 0; }

/* ---------- Ideen: Schritte, Würfeln, Spielautomat ---------- */
.dice-setup { display: flex; flex-direction: column; gap: 22px; }
.step-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.step-head h2 { margin: 0; font-size: 19px; letter-spacing: -0.015em; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
}
.idea-grid { margin-bottom: 0; }
.idea-tile { position: relative; transition: transform .12s, border-color .15s, box-shadow .15s; }
.idea-tile.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent), 0 10px 22px -16px color-mix(in srgb, var(--accent) 80%, transparent); }
.idea-tile.on .idea-tile-ico { background: var(--accent); color: #fff; }
.idea-tile.on::after {
  content: ""; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.time-seg { display: flex; padding: 4px; gap: 4px; border-radius: 14px; background: var(--line); }
.time-seg button {
  flex: 1; height: 42px; border: 0; border-radius: 10px; background: none; color: var(--text);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.time-seg button.on { background: var(--card); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.14); color: var(--accent); }
.ico-fridge { color: var(--accent) !important; }

.dice-go {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 62px; margin-top: 4px;
  border: 0; border-radius: 20px; cursor: pointer; font: inherit; font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #0b3d28));
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 90%, transparent);
}
.dice-go .ico { width: 28px; height: 28px; margin: 0; stroke-width: 2; }
.dice-go:not(:disabled) .ico { animation: dice-wobble 2.4s ease-in-out infinite; }
.dice-go:active:not(:disabled) { transform: scale(.98); }
.dice-go:disabled { background: var(--line); color: var(--muted); box-shadow: none; font-weight: 600; font-size: 16px; cursor: default; }
@keyframes dice-wobble { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-16deg); } 86% { transform: rotate(12deg); } 93% { transform: rotate(-6deg); } }
.dice-go .ico.throw { animation: dice-throw .7s cubic-bezier(.3,1.6,.6,1); }
@keyframes dice-throw { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(320deg) scale(1.25); } 100% { transform: rotate(360deg) scale(1); } }

.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.stage-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 700;
}
.sum-chip .ico { width: 15px; height: 15px; margin: 0; }
.stage-change {
  display: inline-flex; align-items: center; gap: 5px; flex: none; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 6px 2px;
}
.stage-change .ico { width: 15px; height: 15px; margin: 0; }

.reel {
  position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
}
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px) saturate(1.15); transform: scale(1.08); }
.reel.flick img { animation: reel-spin .15s linear; }
@keyframes reel-spin { from { transform: translateY(-18%) scale(1.08); opacity: .5; } to { transform: translateY(0) scale(1.08); opacity: 1; } }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent 30%, transparent 70%, rgba(0,0,0,.35)); }
.reel-dice {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--accent);
  box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: dice-roll .9s linear infinite;
}
.reel-dice .ico { width: 36px; height: 36px; margin: 0; }
@keyframes dice-roll { to { transform: rotate(360deg); } }
.rolling-msg { min-height: 1.4em; margin: 14px 0 0; text-align: center; font-weight: 600; color: var(--accent); }
.rolling-msg:empty { display: none; }
.idea-card.reveal { animation: reveal .5s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes reveal { from { transform: perspective(900px) rotateX(-70deg) translateY(-20px); opacity: 0; } }
.reroll-btn { margin-top: 18px; }
@media (prefers-reduced-motion: reduce) {
  .reel-dice, .dice-go .ico, .idea-card.reveal, .reel.flick img { animation: none !important; }
}

/* „Wie oft gekocht“-Abzeichen + Abschnitte in den Ideen */
.cooked-badge {
  position: absolute; left: 8px; top: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px 4px 7px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .01em;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.cooked-badge .ico { width: 13px; height: 13px; margin: 0; stroke-width: 2.6; }
.cooked-badge.is-new { background: var(--accent); color: #fff; }
.cooked-badge.is-cooked { background: rgba(255,255,255,.94); color: var(--accent); }
.cooked-badge.is-proven { background: linear-gradient(135deg, #ffd66b, #f5a623); color: #4a2c00; }
.cooked-badge.is-proven .ico { color: #7a4a00; }
.meta-cooked { position: static !important; box-shadow: none !important; }
.meta-cooked.is-cooked { background: rgba(255,255,255,.2) !important; color: #fff !important; }
.meta-cooked.is-cooked .ico { color: #fff; }
.no-hero .meta-cooked.is-cooked { background: var(--card) !important; color: var(--accent) !important; }

.slot-head { display: flex; align-items: center; gap: 7px; margin: 8px 4px -4px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.slot-head .ico { width: 17px; height: 17px; margin: 0; }
.slot-head.slot-proven { color: #c78400; }
.slot-head.slot-again { color: #2f6bbf; }
.slot-head.slot-new { color: var(--accent); }
.slot-head:first-child { margin-top: 0; }
.idea-last { font-size: 13px; color: var(--muted); }

/* Kachel-Abzeichen: eine Zeile oben, darf umbrechen – nie übereinander */
.tile-badges {
  position: absolute; left: 6px; right: 6px; top: 6px; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 4px;
  pointer-events: none;
}
.tile-badges .cooked-badge, .tile-badges .rating-badge { position: static; margin: 0; }
.tile-badges .rating-badge { margin-left: auto; }
.tile-badges .cooked-badge { padding: 4px 8px 4px 6px; font-size: 12px; }
.recipe-tile-img .time-badge { max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Ideen: kompakte Auswahl (alles vorbelegt) ---------- */
.dice-setup { gap: 14px !important; }
.setup-title { margin: 0 2px; font-size: 21px; letter-spacing: -0.02em; }
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 72px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.type-tile .ico { width: 24px; height: 24px; margin: 0; color: var(--accent); stroke-width: 1.8; transition: color .15s; }
.type-tile.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.type-tile.on .ico { color: #fff; }
.type-tile:active { transform: scale(.95); }

.row-label { display: block; margin: 0 2px 7px; font-size: 14px; font-weight: 700; }
.row-label small { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.focus-row { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease, opacity .25s, margin .3s; }
.focus-inner { min-height: 0; overflow: hidden; }
.focus-row.collapsed { grid-template-rows: 0fr; opacity: 0; margin-top: -14px; pointer-events: none; }
.focus-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.focus-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.focus-chip .ico { width: 18px; height: 18px; margin: 0; color: var(--accent); }
.focus-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }

.opt-row { display: flex; flex-direction: column; gap: 10px; }
.opt-row .time-seg button { height: 38px; font-size: 14px; }
.fridge-toggle { margin: 0 2px !important; }

.go-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.go-summary { margin: 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); min-height: 1.2em; }
.dice-go { position: relative; overflow: hidden; }
.go-ripple {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: rgba(255,255,255,.45); transform: scale(0); pointer-events: none;
}
.dice-go.thrown .go-ripple { animation: ripple .6s ease-out; }
@keyframes ripple { to { transform: scale(70); opacity: 0; } }
.dice-go.thrown .ico { animation: throw-dice .7s cubic-bezier(.25,1.4,.5,1) !important; }
@keyframes throw-dice {
  0% { transform: translate(0,0) rotate(0) scale(1); }
  35% { transform: translate(40px,-46px) rotate(260deg) scale(1.35); }
  70% { transform: translate(70px,0) rotate(520deg) scale(.95); }
  100% { transform: translate(0,0) rotate(720deg) scale(1); }
}
.dice-go.thrown { animation: go-press .38s ease; }
@keyframes go-press { 30% { transform: scale(.96); } 70% { transform: scale(1.02); } }

.pop { animation: pop .3s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 40% { transform: scale(1.08); } }
.dice-setup.leaving { animation: leave .32s ease forwards; }
@keyframes leave { to { opacity: 0; transform: translateY(-24px) scale(.98); } }
.dice-setup.entering, .stage.entering { animation: enter .35s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) {
  .dice-go.thrown .ico, .dice-go.thrown, .pop, .dice-setup.leaving, .dice-setup.entering, .stage.entering { animation: none !important; }
}

/* Suche: Vorschläge beim Tippen */
.search-wrap { position: relative; z-index: 15; }
.typeahead {
  position: absolute; left: 0; right: 0; top: calc(100% - 8px); max-height: min(64vh, 520px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.3); animation: ta-in .16s ease;
}
@keyframes ta-in { from { opacity: 0; transform: translateY(-6px); } }
.ta-head { margin: 8px 10px 4px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ta-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.ta-row:active, .ta-row:hover { background: var(--bg); }
.ta-img { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; flex: none; background: var(--line); display: grid; place-items: center; color: var(--muted); }
.ta-img img { width: 100%; height: 100%; object-fit: cover; }
.ta-img .ico { width: 22px; height: 22px; }
.ta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ta-title { font-size: 15px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ta-title mark { background: none; color: var(--accent); font-weight: 800; }
.ta-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.ta-rating { font-size: 12px; }
.ta-badge { position: static !important; box-shadow: none !important; flex: none; }
.ta-loading { display: flex; align-items: center; gap: 4px; margin: 6px 10px; font-size: 14px; color: var(--muted); }
.ta-all {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 6px; height: 44px;
  border: 0; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.ta-all .ico { width: 17px; height: 17px; margin: 0; }

/* ---------- Anmeldung ---------- */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding-bottom: env(safe-area-inset-bottom); }
.login { width: min(92vw, 380px); text-align: center; padding: 24px 0; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.4); }
.login h1 { margin: 16px 0 2px; font-size: 30px; letter-spacing: -0.03em; }
.login-sub { margin: 0 0 22px; color: var(--muted); }
.login-card {
  text-align: left; display: flex; flex-direction: column; gap: 12px; padding: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 40px -24px rgba(0,0,0,.35);
}
.login-card input { height: 52px; font-size: 18px; }
.login-error { margin: 0; min-height: 1.2em; color: var(--danger); font-weight: 600; font-size: 14px; }
.login-error:empty { display: none; }
.login-btn { margin-top: 2px; height: 54px; font-size: 17px; }
.login-hint { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Weicher Übergang zwischen den Seiten (statt weißem Aufblitzen) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
.tabbar { view-transition-name: tabbar; }
