/* ═══════════════════════════════════════════════════════════
   Savoré – Erweiterungen: Begrüßung, Saison, Kochbuch, Kühlschrank,
   Zutaten-Ersatz, Leerzustände.  (Dunkelmodus: css/dark.css)
   ═══════════════════════════════════════════════════════════ */
:root { --artbase: #FFFFFF; --soft-shadow: 0 6px 18px rgba(18, 64, 42, .1); }
.card-art, .deck-card .art, .sw-art, .rec-art, .fr-art, .pa, .art-preview, .slot-art, .d-hero { background-color: var(--basil-100); }

/* ───────── Begrüßung ───────── */
.greet-sub { margin-top: 10px; color: var(--muted); font-size: calc(15px * var(--fs, 1)); line-height: 1.45; font-style: italic; min-height: 22px; animation: fadeUp .8s .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────── Saison-Reihe „Jetzt frisch“ ───────── */
.season { margin: 4px -20px 6px; padding: 0 0 4px; }
.season-head { display: flex; align-items: center; gap: 12px; padding: 0 20px; margin-bottom: 10px; }
.season-ico { flex: none; width: 42px; height: 42px; border-radius: 14px; background: var(--lemon-soft); color: #7A5F0E; display: grid; place-items: center; }
.season-ico .ico { width: 24px; height: 24px; }
.season-head h2 { font-size: calc(21px * var(--fs, 1)); }
.season-head p { color: var(--muted); font-size: calc(13px * var(--fs, 1)); font-weight: 600; margin-top: 1px; }
.season-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 20px 12px; scroll-snap-type: x mandatory; scroll-padding: 0 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.season-row::-webkit-scrollbar { display: none; }
.sea-card { flex: none; width: 138px; scroll-snap-align: start; background: var(--white); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--soft-shadow); overflow: hidden; cursor: pointer; transition: transform .3s var(--spring); animation: cardIn .6s var(--ease) both; }
.sea-card:nth-child(2) { animation-delay: 60ms; } .sea-card:nth-child(3) { animation-delay: 120ms; } .sea-card:nth-child(4) { animation-delay: 180ms; }
.sea-card:active { transform: scale(.96); }
.sea-card .card-art { aspect-ratio: 1 / .78; }
.sea-card .card-art .dish { width: 118%; margin-top: 4%; }
.sea-card h3 { font-size: calc(14px * var(--fs, 1)); line-height: 1.2; padding: 9px 10px 0; min-height: 2.5em; }
.sea-card p { padding: 3px 10px 11px; font-size: calc(12px * var(--fs, 1)); color: var(--muted); font-weight: 600; }

/* ───────── Chips: „Vom Grill“, „Fisch“ ───────── */
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .ico { width: 17px; height: 17px; margin: 0; }
.chip.special { background: var(--white); border-style: dashed; }
.chip.special.on { border-style: solid; background: var(--basil-700); border-color: var(--basil-700); color: #fff; box-shadow: 0 6px 16px rgba(31, 94, 59, .3); }
.chip.special.on .ico { color: #fff; }

/* ───────── Kühlschrank ───────── */
.fridge-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin: 4px 0 4px; border-radius: 18px; background: var(--basil-50); border: 1.5px dashed var(--basil-300); text-align: left; transition: transform .3s var(--spring), background .2s; }
.fridge-banner:active { transform: scale(.98); }
.fridge-banner.on { border-style: solid; background: var(--lemon-soft); border-color: #F0DC8A; }
.fb-ico { flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--white); color: var(--basil-700); display: grid; place-items: center; box-shadow: var(--shadow-s); }
.fb-ico .ico { width: 22px; height: 22px; }
.fb-t { min-width: 0; }
.fb-t b { display: block; font-size: calc(14.5px * var(--fs, 1)); }
.fb-t small { display: block; color: var(--muted); font-size: calc(12.5px * var(--fs, 1)); margin-top: 1px; }
.fr-h { font-size: calc(19px * var(--fs, 1)); margin: 20px 0 10px; }
.fr-results { display: grid; gap: 10px; }
.fr-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px; border-radius: 20px; background: var(--basil-50); cursor: pointer; animation: cardIn .45s var(--ease) both; }
.fr-art { border-radius: 14px; display: grid; place-items: center; overflow: hidden; min-height: 84px; }
.fr-art .dish { width: 122%; }
.fr-t { min-width: 0; align-self: center; }
.fr-t h4 { font-family: var(--serif); font-size: calc(16px * var(--fs, 1)); line-height: 1.2; font-weight: 600; margin: 0; }
.fr-t p { font-size: calc(12.5px * var(--fs, 1)); color: var(--muted); margin-top: 5px; }
.cover { height: 6px; border-radius: 3px; background: var(--basil-100); overflow: hidden; margin-top: 8px; }
.cover i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--basil-300), var(--basil-500)); transition: width .5s var(--ease); }
.mini-btn { margin-top: 8px; padding: 7px 12px; border-radius: 999px; background: var(--white); color: var(--basil-700); border: 1.5px solid var(--basil-100); font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; transition: transform .25s var(--spring); }
.mini-btn:active { transform: scale(.93); }
.pantry-in { display: flex; gap: 8px; }
.pantry-in .btn-primary { flex: none; width: 52px; padding: 0; font-size: calc(22px * var(--fs, 1)); }

/* ───────── Zutaten ersetzen ───────── */
.ing li { position: relative; }
.ing li .n { flex: 1; min-width: 0; }
.swapped { display: block; margin-top: 2px; font-size: calc(12px * var(--fs, 1)); color: var(--basil-700); font-weight: 700; }
.sub-btn { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--white); color: var(--basil-700); display: grid; place-items: center; box-shadow: var(--shadow-s); transition: transform .3s var(--spring); }
.sub-btn:active { transform: rotate(180deg) scale(.88); }
.sub-btn.on { background: var(--basil-700); color: #fff; }
.sub-btn .ico { width: 18px; height: 18px; }
.alts { display: grid; gap: 10px; }
.alt { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; width: 100%; padding: 14px; border-radius: 18px; background: var(--basil-50); border: 1.5px solid var(--basil-100); transition: transform .25s var(--spring), border-color .2s; }
.alt:active { transform: scale(.97); }
.alt.on { border-color: var(--basil-500); background: var(--basil-100); }
.alt-t { min-width: 0; }
.alt-t b { display: block; font-size: calc(15px * var(--fs, 1)); }
.alt-t small { display: block; margin-top: 3px; color: var(--muted); font-size: calc(13px * var(--fs, 1)); line-height: 1.35; }
.alt-go { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--basil-700); color: #fff; font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; }

/* ───────── „Fertig gekocht“ ───────── */
.btn-cook { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 17px; border-radius: 20px; font-size: calc(17px * var(--fs, 1)); font-weight: 700; color: #fff; background: linear-gradient(145deg, var(--basil-500), var(--basil-700)); box-shadow: 0 12px 26px rgba(31, 94, 59, .34); transition: transform .3s var(--spring); }
.btn-cook:active { transform: scale(.96); }
.btn-cook .ico { width: 22px; height: 22px; stroke-width: 2.8; }
.moment { position: absolute; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; background: rgba(14, 51, 34, .62); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
.moment.show { opacity: 1; }
.moment-card { width: 100%; max-width: 360px; padding: 26px 22px 22px; border-radius: 32px; background: var(--white); text-align: center; box-shadow: var(--shadow-l); transform: translateY(30px) scale(.94); transition: transform .6s var(--spring); }
.moment.show .moment-card { transform: none; }
.moment-card h2 { font-size: calc(30px * var(--fs, 1)); margin-top: 6px; }
.moment-line { margin-top: 8px; font-size: calc(16px * var(--fs, 1)); font-weight: 600; }
.moment-sub { margin-top: 4px; color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); }
.stamp-wrap { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.stamp-svg { position: relative; z-index: 1; width: 100%; height: 100%; transform-origin: 50% 50%; animation: stampIn .75s .15s var(--spring) both; }
.st-ring { stroke-dasharray: 580; stroke-dashoffset: 580; animation: draw .9s .25s var(--ease) forwards; }
.st-check { stroke-dasharray: 130; stroke-dashoffset: 130; animation: draw .6s .7s var(--ease) forwards; }
@keyframes stampIn { 0% { transform: scale(2.2) rotate(-24deg); opacity: 0; } 55% { transform: scale(.92) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
.ink { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--c); opacity: 0; animation: inkRing .9s .5s ease-out; }
@keyframes inkRing { 0% { transform: scale(.8); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
.moment-rate { margin-top: 16px; }
.moment-rate > span { display: block; font-size: calc(12.5px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.moment-rate .stars { justify-content: center; margin-top: 4px; }
.moment-actions { display: grid; gap: 8px; margin-top: 16px; }

/* ───────── Sammlung / Kochbuch ───────── */
.seg2 { grid-template-columns: repeat(2, 1fr); }
.seg2 .seg-pill { width: calc((100% - 8px) / 2); }
.level-card { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 26px; background: linear-gradient(145deg, var(--basil-100), var(--basil-50)); border: 1px solid var(--line); animation: cardIn .6s var(--ease) both; }
.level-ring { flex: none; position: relative; width: 88px; height: 88px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: conic-gradient(var(--basil-500) calc(var(--p) * 1%), var(--basil-100) 0); }
.level-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--white); }
.level-ring b, .level-ring small { position: relative; }
.level-ring b { font-family: var(--serif); font-size: calc(26px * var(--fs, 1)); line-height: 1; color: var(--basil-700); }
.level-ring small { font-size: calc(10.5px * var(--fs, 1)); color: var(--muted); font-weight: 700; }
.level-k { font-size: calc(11.5px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.level-card h2 { font-size: calc(23px * var(--fs, 1)); margin: 2px 0 4px; }
.level-card p { color: var(--muted); font-size: calc(13.5px * var(--fs, 1)); line-height: 1.4; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.mini-stats div { padding: 12px 6px; border-radius: 18px; background: var(--basil-50); text-align: center; min-width: 0; }
.mini-stats b { display: block; font-family: var(--serif); font-size: calc(22px * var(--fs, 1)); color: var(--basil-700); }
.mini-stats small { font-size: calc(11px * var(--fs, 1)); color: var(--muted); font-weight: 600; line-height: 1.25; display: block; }
.streak-card { padding: 14px 16px; border-radius: 22px; background: var(--lemon-soft); border: 1px solid #F0DC8A; margin: 12px 0; }
.streak-card h3 { font-size: calc(17px * var(--fs, 1)); }
.streak-card p { margin-top: 4px; font-size: calc(13px * var(--fs, 1)); color: #6B5410; line-height: 1.4; }
.streak-dots { display: flex; gap: 8px; margin-top: 12px; }
.streak-dots i { flex: 1; height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .08); }
.streak-dots i.on { background: var(--basil-500); }
.streak-dots i.now { box-shadow: 0 0 0 2px var(--lemon); }
.book-h { font-size: calc(19px * var(--fs, 1)); margin: 22px 0 12px; }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 8px; }
.stamp-item { display: grid; justify-items: center; gap: 7px; text-align: center; min-width: 0; }
.stamp-item span { font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; color: var(--c); line-height: 1.2; overflow-wrap: anywhere; }
.stamp-badge { position: relative; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; overflow: visible; background: color-mix(in srgb, var(--c) 10%, var(--white)); border: 3px solid var(--c); box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 5.500px var(--c); transform: rotate(-5deg); }
.stamp-item:nth-child(even) .stamp-badge { transform: rotate(5deg); }
.stamp-badge .dish { width: 74%; }
.stamp-badge b { position: absolute; right: -4px; top: -4px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--c); color: #fff; font-size: calc(12px * var(--fs, 1)); display: grid; place-items: center; }
.stamp-item.locked .stamp-badge { border-style: dashed; box-shadow: none; background: var(--basil-50); filter: grayscale(1); opacity: .5; }
.stamp-item.locked span { color: var(--muted); opacity: .8; }
.book-empty { padding-bottom: 6px; }

/* ───────── Leerzustände mit Persönlichkeit ───────── */
.empty-art { display: grid; place-items: center; }
.empty-art svg.dish { width: 170px; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1.500deg); } }
.empty p { max-width: 300px; margin: 0 auto; line-height: 1.5; }
.empty-actions { display: grid; gap: 10px; max-width: 300px; margin: 18px auto 0; }
.empty .btn-primary, .empty .btn-ghost { width: 100%; }
.empty .btn-ghost { margin-top: 0; }

@media (max-width: 360px) {
  .season { margin-left: -16px; margin-right: -16px; }
  .season-head, .season-row { padding-left: 16px; padding-right: 16px; }
  .season-row { scroll-padding: 0 16px; }
  .sea-card { width: 128px; }
  .level-card { gap: 12px; padding: 14px; }
  .level-ring { width: 76px; height: 76px; }
  .stamp-badge { width: 70px; height: 70px; }
  .fr-item { grid-template-columns: 80px 1fr; }
  .moment-card { padding: 22px 16px 18px; }
}

/* ───────── Saison-Reihe: echte Karten wie im Raster ───────── */
.season-row .card.sea { flex: none; width: clamp(150px, 42vw, 178px); scroll-snap-align: start; opacity: 1; transform: none; animation: cardIn .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.season-row .card.sea .card-art { aspect-ratio: 1 / .86; }
.season-row .card.sea h3 { min-height: 2.4em; }


/* ───────── Untere Navigation: groß und gut lesbar ───────── */
:root { --tabbar-h: 100px; }
#tabbar { left: 8px; right: 8px; height: 86px; padding: 6px 4px; border-radius: 30px; }
.tab-pill { top: 6px; bottom: 6px; left: 4px; width: calc((100% - 8px) / 5); border-radius: 24px; }
.tab { gap: 4px; padding: 0; min-width: 0; }
.tab svg { width: 32px; height: 32px; }
.tab span { font-size: calc(clamp(11.5px, 3.3vw, 13.5px) * var(--fs, 1)); font-weight: 700; letter-spacing: -.01em; }
.tab.active svg { transform: translateY(-1px) scale(1.1); }
.tab .badge { top: 3px; left: calc(50% + 7px); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; font-size: calc(13px * var(--fs, 1)); font-weight: 800; box-shadow: 0 0 0 2px var(--white); }
#fab { bottom: calc(var(--tabbar-h) + var(--sab) + 6px); }
#toast { bottom: calc(var(--tabbar-h) + var(--sab) + 24px); }
.view { padding-bottom: calc(var(--tabbar-h) + var(--sab) + 36px); }
@media (max-width: 360px) {
  #tabbar { left: 4px; right: 4px; }
  .tab span { font-size: calc(11.5px * var(--fs, 1)); letter-spacing: -.02em; }
  .tab svg { width: 30px; height: 30px; }
}

/* ───────── Scroll-Hinweise für seitlich scrollbare Reihen ───────── */
.hs { position: relative; }
.hs-fade { position: absolute; top: 0; bottom: 24px; width: 48px; pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 2; }
.hs-fade.r { right: 0; background: linear-gradient(to left, var(--white) 6%, transparent); }
.hs-fade.l { left: 0; background: linear-gradient(to right, var(--white) 6%, transparent); }
.hs.can-right .hs-fade.r, .hs.can-left .hs-fade.l { opacity: 1; }
.hs-arrow { position: absolute; top: 66px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--basil-700); box-shadow: var(--shadow-m); border: 1px solid var(--line); opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .3s, transform .45s var(--spring); }
.hs-arrow.r { right: 8px; }
.hs-arrow.l { left: 8px; }
.hs-arrow.l svg { transform: rotate(180deg); }
.hs.can-right .hs-arrow.r, .hs.can-left .hs-arrow.l { opacity: 1; transform: none; pointer-events: auto; }
.hs-arrow:active { transform: scale(.88) !important; }
.hs.can-right .hs-arrow.r svg { animation: hsNudge 1.8s ease-in-out infinite; }
.hs.can-right .hs-arrow.r::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--basil-500); opacity: 0; animation: hsPulse 3.2s ease-out infinite; }
@keyframes hsNudge { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(4px); } }
@keyframes hsPulse { 0% { transform: scale(1); opacity: .55; } 60%, 100% { transform: scale(1.7); opacity: 0; } }
.hs-prog { position: relative; width: 64px; height: 4px; margin: 0 auto 6px; border-radius: 2px; background: var(--basil-100); overflow: hidden; opacity: 0; transition: opacity .3s; }
.hs.scrollable .hs-prog { opacity: 1; }
.hs-prog i { display: block; height: 100%; border-radius: 2px; background: var(--basil-500); transition: transform .12s linear, width .2s; }
.season-row { padding-bottom: 8px; }

/* ───────── Live-Vorschläge (Kühlschrank-Check) ───────── */
.sug-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 6; background: var(--white); border: 1.5px solid var(--basil-100); border-radius: 20px; box-shadow: var(--shadow-m); overflow: hidden; animation: sugIn .2s var(--ease); }
.suggest[hidden] { display: none; }
@keyframes sugIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.sug-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 12px 16px; text-align: left; font-size: calc(16px * var(--fs, 1)); border-bottom: 1px solid var(--line); transition: background .15s; }
.sug-item:last-child { border-bottom: 0; }
.sug-item b { color: var(--basil-700); font-weight: 800; }
.sug-item small { flex: none; color: var(--muted); font-size: calc(12px * var(--fs, 1)); font-weight: 700; }
.sug-item.own span { font-style: italic; }
.sug-item.active, .sug-item:active { background: var(--basil-50); }
.suggest { max-height: min(46dvh, 330px); overflow-y: auto; overscroll-behavior: contain; }
@media (max-height: 680px) { .sug-item { min-height: 46px; padding: 10px 14px; } }

/* Startseite: „heute“ aufrecht, nur farblich hervorgehoben */
.hero h1 em { font-style: normal; }

/* ───────── Einstellungen ───────── */
.hero { position: relative; }
.settings-btn { position: absolute; top: calc(var(--sat) + 14px); right: 20px; z-index: 2; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-s); color: var(--basil-700); transition: transform .35s var(--spring); }
.settings-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: transform .6s var(--ease); }
.settings-btn:active { transform: scale(.9); }
.settings-btn:active svg { transform: rotate(60deg); }
@media (max-width: 360px) { .settings-btn { right: 16px; } }
.theme-opts { display: grid; gap: 10px; }
.theme-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px; border-radius: 20px; background: var(--basil-50); border: 2px solid var(--basil-100); transition: transform .25s var(--spring), border-color .2s, background .2s; }
.theme-opt:active { transform: scale(.98); }
.theme-opt.on { border-color: var(--basil-500); background: var(--basil-100); }
.th-ico { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; }
.th-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.th-light { background: #FBEFC1; color: #7A5F0E; }
.th-dark { background: #12301F; color: #F2D88A; }
.th-system { background: linear-gradient(135deg, #FBEFC1 50%, #12301F 50%); color: #3B5A45; }
.th-t { flex: 1; min-width: 0; }
.th-t b { display: block; font-size: calc(16px * var(--fs, 1)); }
.th-t small { display: block; color: var(--muted); font-size: calc(13px * var(--fs, 1)); margin-top: 2px; line-height: 1.3; }
.th-radio { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--basil-300); position: relative; transition: border-color .2s; }
.theme-opt.on .th-radio { border-color: var(--basil-500); }
.theme-opt.on .th-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--basil-500); animation: pop .35s var(--spring); }
/* sanfter Wechsel beim Umschalten des Themes */
html.theme-fade, html.theme-fade * { transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease !important; }

/* ───────── Fixierte Kopfzeile der Startseite (Marke + Einstellungen) ───────── */
.topbar { position: sticky; top: calc(-1 * (var(--sat) + 18px)); z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: calc(-18px) -20px 0; padding: calc(var(--sat) + 14px) 20px 10px;
  background: color-mix(in srgb, var(--white) 90%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  transition: box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 18px rgba(18, 64, 42, .08); }
.topbar .brand { min-width: 0; overflow: hidden; }
.topbar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .settings-btn { position: static; flex: none; }
.hero { margin-top: 0; padding-top: 6px; }
.hero .greet { margin-top: 8px; }
@media (max-width: 360px) { .topbar { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } }

/* Marke = Startknopf */
button.brand { background: none; border: 0; padding: 4px 6px 4px 0; margin: 0; text-align: left; cursor: pointer; color: var(--basil-700); border-radius: 12px; transition: transform .3s var(--spring), opacity .2s; }
button.brand:active { transform: scale(.95); opacity: .85; }
button.brand svg { flex: none; transition: transform .6s var(--spring); }
button.brand:active svg { transform: rotate(-20deg) scale(1.1); }

/* ───────── Schriftgröße (Einstellungen) ───────── */
:root { --fs: 1; --fs-tab: 1; }
html[data-fs="l"] { --fs: 1.15; --fs-tab: 1.06; }
html[data-fs="xl"] { --fs: 1.3; --fs-tab: 1.1; }
.tab span { font-size: calc(clamp(11.5px, 3.3vw, 13.5px) * var(--fs-tab)); }
html[data-fs="l"] .stats, html[data-fs="xl"] .stats { grid-template-columns: repeat(2, 1fr); }
html[data-fs="xl"] .mini-stats { grid-template-columns: repeat(2, 1fr); }
html[data-fs="xl"] .mini-stats div:last-child { grid-column: 1 / -1; }
@media (max-width: 360px) {
  .tab span { font-size: calc(11.5px * var(--fs-tab)); }
  html[data-fs="l"], html[data-fs="xl"] { --fs-tab: 1; }
}

/* ───────── Kühlschrank-Banner (groß, prominent, dezente Bewegung) ───────── */
.fridge-banner { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; width: 100%; min-height: 104px; margin: 8px 0 6px; padding: 18px 16px 18px 18px; text-align: left; color: #fff; border: 0; border-radius: 28px;
  background: linear-gradient(135deg, #1F5E3B 0%, #2E7D4F 55%, #3E9A63 100%); box-shadow: 0 16px 32px rgba(31, 94, 59, .3); transition: transform .35s var(--spring), box-shadow .3s; isolation: isolate; }
.fridge-banner:active { transform: scale(.975); box-shadow: 0 8px 18px rgba(31, 94, 59, .28); }
.fridge-banner.on { background: linear-gradient(135deg, #1F5E3B 0%, #2E7D4F 50%, #5BA05A 100%); }
.fridge-banner::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); transform: translateX(-130%); animation: fbShine 6s 1.2s ease-in-out infinite; }
@keyframes fbShine { 0%, 55% { transform: translateX(-130%); } 80%, 100% { transform: translateX(130%); } }
.fb-fridge { position: relative; z-index: 2; flex: none; width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 1.5px solid rgba(255, 255, 255, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.fb-fridge svg { width: 46px; height: 46px; overflow: visible; }
.fb-fridge .fr-body, .fb-fridge .fr-door rect { fill: rgba(255, 255, 255, .18); stroke: #fff; stroke-width: 2.600; stroke-linejoin: round; }
.fb-fridge .fr-line { stroke: #fff; stroke-width: 2.200; fill: none; }
.fb-fridge .fr-handle { stroke: #fff; stroke-width: 2.600; stroke-linecap: round; fill: none; }
.fb-fridge .fr-light { fill: #FFE9A0; opacity: 0; animation: frLight 7s ease-in-out infinite; }
.fb-fridge .fr-food { fill: #FFB4A0; opacity: 0; animation: frLight 7s ease-in-out infinite; }
.fb-fridge .fr-food.b { fill: #D6F0B8; }
.fb-fridge .fr-door { transform-box: fill-box; transform-origin: left center; animation: frDoor 7s ease-in-out infinite; }
@keyframes frDoor { 0%, 62%, 100% { transform: scaleX(1); } 70%, 88% { transform: scaleX(.62); } }
@keyframes frLight { 0%, 62%, 100% { opacity: 0; } 70%, 88% { opacity: 1; } }
.fb-count { position: absolute; right: -6px; top: -6px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--lemon); color: #12402A; font-style: normal; font-weight: 800; font-size: 14px; display: grid; place-items: center; box-shadow: 0 0 0 3px #2E7D4F; animation: pop .45s var(--spring); }
.fb-t { position: relative; z-index: 2; flex: 1; min-width: 0; }
.fb-t b { display: block; font-family: var(--serif); font-weight: 600; font-size: calc(21px * var(--fs, 1)); line-height: 1.15; letter-spacing: -.01em; }
.fb-t small { display: block; margin-top: 5px; font-size: calc(14px * var(--fs, 1)); line-height: 1.35; color: rgba(255, 255, 255, .86); font-weight: 500; }
.fb-go { position: relative; z-index: 2; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); }
.fb-go svg { width: 22px; height: 22px; animation: hsNudge 2.2s ease-in-out infinite; }
.fb-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.fb-deco i { position: absolute; border-radius: 50%; opacity: .32; animation: fbFloat 6s ease-in-out infinite; }
.fb-deco .d1 { width: 46px; height: 46px; right: 58px; top: -14px; background: #FF8A70; }
.fb-deco .d2 { width: 30px; height: 30px; right: 12px; bottom: -8px; background: #FFE08A; animation-delay: -2s; }
.fb-deco .d3 { width: 22px; height: 22px; right: 96px; bottom: 6px; background: #B9E6A0; animation-delay: -4s; }
@keyframes fbFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-9px) scale(1.08); } }
@media (max-width: 360px) { .fridge-banner { gap: 12px; padding: 16px 12px 16px 14px; } .fb-fridge { width: 60px; height: 60px; border-radius: 19px; } .fb-fridge svg { width: 40px; height: 40px; } }

/* ───────── Karten: Meta-Zeile darf umbrechen ───────── */
.meta { flex-wrap: wrap; row-gap: 2px; }

/* ───────── Allergene ───────── */
.allergen-badge { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 70px); padding: 4px 9px 4px 7px; border-radius: 999px; background: #C0452E; color: #fff; font-size: calc(11px * var(--fs, 1)); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.allergen-badge .ico { width: 14px; height: 14px; flex: none; }
.allergen-badge ~ .match { bottom: 42px; }
.chip.allergen-chip .ico { width: 17px; height: 17px; }
.allergens { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: var(--basil-50); }
.allergens b { font-size: calc(12px * var(--fs, 1)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.al-chip { padding: 5px 11px; border-radius: 10px; font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.al-chip.hit { background: #FBE4DE; color: #A53A25; border-color: #F2B8AC; }
.allergens p { flex-basis: 100%; margin: 6px 0 0; font-size: calc(13.5px * var(--fs, 1)); font-weight: 700; color: #A53A25; line-height: 1.4; }
.allergens small { flex-basis: 100%; color: var(--muted); font-size: calc(11.5px * var(--fs, 1)); }
.allergens.warn { background: #FDF1EE; border: 1px solid #F6D6CF; }

/* ───────── Einstellungen: Schrift, Schalter ───────── */
.set-q { font-weight: 700; font-size: calc(14px * var(--fs, 1)); margin: 0 0 8px; }
.fs-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fs-opt { display: grid; justify-items: center; gap: 4px; padding: 14px 6px 10px; border-radius: 20px; background: var(--basil-50); border: 2px solid var(--basil-100); transition: transform .25s var(--spring), border-color .2s, background .2s; }
.fs-opt span { font-family: var(--serif); font-weight: 600; line-height: 1.1; }
.fs-opt small { font-size: calc(12.5px * var(--fs, 1)); font-weight: 700; color: var(--muted); }
.fs-opt:active { transform: scale(.96); }
.fs-opt.on { border-color: var(--basil-500); background: var(--basil-100); }
.fs-opt.on small { color: var(--basil-700); }
.fs-sample { margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; background: var(--basil-50); font-size: calc(16px * var(--fs, 1)); line-height: 1.45; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: var(--basil-50); }
.sw-row b { display: block; font-size: calc(15.5px * var(--fs, 1)); }
.sw-row small { display: block; color: var(--muted); font-size: calc(13px * var(--fs, 1)); margin-top: 2px; }
.sw-row.off { opacity: .6; }
.sw { flex: none; position: relative; width: 56px; height: 34px; border-radius: 17px; background: var(--basil-300); transition: background .25s; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .35s var(--spring); }
.sw[aria-checked="true"] { background: var(--basil-500); }
.sw[aria-checked="true"]::after { transform: translateX(22px); }
.seg.mini { margin: 0; }
.seg.mini button { font-size: calc(13.5px * var(--fs, 1)); }

/* Hinweise auf Karten dürfen nicht über das Herz laufen */
.card-art .diet { max-width: calc(100% - 68px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Kleine Displays / große Schrift: Diät-Hinweis kurz, Eingabe und Marke begrenzt skalieren */
.diet .d-short { display: none; }
@media (max-width: 360px) { .diet .d-long { display: none; } .diet .d-short { display: inline; } }
html[data-fs] .diet .d-long { display: none; }
html[data-fs] .diet .d-short { display: inline; }
.card-art .diet { max-width: none; }
.search input { font-size: calc(16px * var(--fs-tab, 1)); }
.topbar .brand { font-size: calc(19px * var(--fs-tab, 1)); }
@media (max-width: 360px) { html[data-fs] .topbar .brand { font-size: 17px; } }
