/* =========================================================
   Mahlzeitomat – warmer Look (Stand 28.09.2026)
   Farben: Creme, Tomate, Safran, Basilikum
========================================================= */
:root {
    --bg: #FFF6EC;
    --bg-deep: #FBEBDA;
    --surface: #FFFFFF;
    --ink: #2B1B12;
    --ink-soft: #5C4638;
    --muted: #9A8374;
    --line: #F1E2D1;
    --tomato: #E4572E;
    --tomato-deep: #BF3F1C;
    --tomato-soft: #FDE3D9;
    --saffron: #F2A93B;
    --saffron-soft: #FDF0D8;
    --basil: #4F8A5B;
    --basil-soft: #E3F1E4;
    --plum: #6E4AA0;
    --plum-soft: #F1EAFB;
    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --shadow-s: 0 2px 6px rgba(92, 52, 24, .07);
    --shadow-m: 0 10px 28px -10px rgba(92, 52, 24, .28);
    --shadow-l: 0 24px 60px -18px rgba(92, 52, 24, .40);
    --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --tabbar-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    background-image: radial-gradient(1200px 500px at 110% -10%, #FFE1C7 0%, transparent 60%),
                      radial-gradient(900px 400px at -20% 0%, #FFF0D6 0%, transparent 55%);
    background-attachment: fixed;
    color: var(--ink);
    line-height: 1.5;
    padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }

/* ---------- Kopf ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
    background: rgba(255, 246, 236, .82);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; display: flex; gap: 8px; align-items: center; }
.brand-pot { display: inline-block; transition: transform .4s; }
.brand:hover .brand-pot { transform: rotate(-12deg) scale(1.1); }
.topnav { display: none; gap: 6px; }
.topnav a { text-decoration: none; font-weight: 700; font-size: .92rem; padding: 8px 14px; border-radius: 999px; color: var(--ink-soft); }
.topnav a.on { background: var(--tomato-soft); color: var(--tomato-deep); }

/* ---------- Daumen-Leiste ---------- */
.tabbar {
    position: fixed; z-index: 40; left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: var(--tabbar-h);
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(43, 27, 18, .92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: var(--shadow-l);
    padding: 6px;
}
.tabbar a {
    position: relative; text-decoration: none; color: #E9D8C8;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: .7rem; font-weight: 700; border-radius: 18px;
    transition: background .25s, color .25s, transform .15s;
}
.tabbar a:active { transform: scale(.94); }
.tabbar .ti { font-size: 1.35rem; line-height: 1; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tabbar a.on { background: rgba(255, 255, 255, .12); color: #fff; }
.tabbar a.on .ti { transform: translateY(-2px) scale(1.12); }
.badge {
    position: absolute; top: 6px; left: calc(50% + 8px);
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--tomato); color: #fff; font-size: .65rem; line-height: 18px; text-align: center;
}

@media (min-width: 860px) {
    .tabbar { display: none; }
    .topnav { display: flex; }
    body { padding-bottom: 40px; }
    .topbar { padding-left: max(18px, calc(50% - 480px)); padding-right: max(18px, calc(50% - 480px)); }
}

/* ---------- Grundgerüst ---------- */
main { max-width: 960px; margin: 0 auto; padding: 8px 16px 0; }
.view-enter { animation: viewIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.15; }
.hello { font-size: .95rem; font-weight: 700; color: var(--muted); margin-top: 8px; }
.big-title { font-size: clamp(2rem, 7vw, 2.9rem); font-weight: 900; margin: 2px 0 16px; }
.big-title em { font-style: normal; color: var(--tomato); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; font-size: 1.2rem; font-weight: 850; }
.section-title small { font-size: .82rem; color: var(--muted); font-weight: 700; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px; border-radius: 16px; font-weight: 800; text-decoration: none;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--tomato); color: #fff; box-shadow: 0 8px 20px -8px rgba(228, 87, 46, .7); }
.btn.primary:hover { background: var(--tomato-deep); }
.btn.soft { background: var(--surface); box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.btn.big { padding: 16px 22px; font-size: 1.05rem; border-radius: 18px; }
.btn.block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.1rem; background: var(--surface); box-shadow: var(--shadow-s); }
.icon-btn.light { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }

/* ---------- Suche & Chips ---------- */
.search {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border-radius: 18px; padding: 4px 6px 4px 16px;
    box-shadow: var(--shadow-m); border: 1px solid var(--line);
}
.search input { flex: 1; border: 0; outline: 0; background: none; padding: 12px 0; font-size: 1rem; min-width: 0; }
.search.small { box-shadow: none; background: var(--bg); border-color: var(--line); margin: 0 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; scroll-snap-align: start; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 14px; border-radius: 999px; font-weight: 750; font-size: .9rem;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
    transition: all .2s;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sheet .chips { padding-left: 18px; padding-right: 18px; }

/* ---------- Würfel-Karte ---------- */
.dice-card {
    margin-top: 18px; position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
    padding: 18px; border-radius: var(--r-lg);
    background: linear-gradient(135deg, #E4572E 0%, #F2A93B 100%);
    color: #fff; box-shadow: 0 18px 40px -18px rgba(228, 87, 46, .8);
}
.dice-card::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.dice-card strong { display: block; font-size: 1.15rem; font-weight: 900; }
.dice-card span { font-size: .88rem; opacity: .92; }
.mini-dice { width: 54px; height: 54px; flex: none; perspective: 300px; }
.mini-dice i {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 14px;
    background: #fff; font-size: 1.7rem; font-style: normal;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08), 0 8px 14px rgba(120, 40, 10, .35);
    animation: wobble 3.2s ease-in-out infinite;
}
@keyframes wobble { 0%, 100% { transform: rotateX(12deg) rotateY(-18deg); } 50% { transform: rotateX(-10deg) rotateY(20deg) translateY(-3px); } }

/* ---------- Rezept-Karten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; perspective: 1200px; }
.card {
    position: relative; display: block; text-decoration: none;
    background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
    box-shadow: var(--shadow-m);
    transform-style: preserve-3d;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, opacity .6s;
    will-change: transform;
}
.card.reveal { opacity: 0; transform: translateY(40px) rotateX(16deg) scale(.96); }
.card.reveal.in { opacity: 1; transform: none; }
.card:active { transform: scale(.975) !important; transition-duration: .15s; }
.card .shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .45), transparent 45%); opacity: 0; transition: opacity .3s; z-index: 2; }
.card:hover .shine { opacity: 1; }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-deep); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card-img img { transform: scale(1.06); }
.card-img .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; background: repeating-linear-gradient(45deg, var(--bg-deep), var(--bg-deep) 14px, var(--bg) 14px, var(--bg) 28px); }
.pill-time {
    position: absolute; left: 12px; bottom: 12px;
    padding: 5px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800;
    background: rgba(255, 255, 255, .92); color: var(--ink); backdrop-filter: blur(6px);
}
.fav {
    position: absolute; right: 10px; top: 10px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255, 255, 255, .9); font-size: 1.1rem; box-shadow: var(--shadow-s);
    transition: transform .3s cubic-bezier(.3, 1.8, .5, 1);
}
.fav.on { transform: scale(1.15); }
.card-body { padding: 14px 16px 16px; }
.card-cat { font-size: .72rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--tomato); }
.card-title { font-size: 1.12rem; font-weight: 850; margin: 3px 0 6px; }
.card-sub { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-soft); }
.tag.ninja { background: var(--plum-soft); color: var(--plum); }
.tag.cheap { background: var(--basil-soft); color: var(--basil); }
.tag.easy { background: var(--saffron-soft); color: #9A6410; }

/* Kleine Karussell-Karten „Schnell gemacht“ */
.rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 min(72%, 250px); scroll-snap-align: start; }
.rail .card-img { aspect-ratio: 5 / 4; }

/* ---------- Rezept-Seite ---------- */
.hero { position: relative; margin: 0 -16px; height: min(62vw, 420px); overflow: hidden; border-radius: 0 0 34px 34px; background: var(--bg-deep); }
.hero img { width: 100%; height: 120%; object-fit: cover; transform-origin: center top; will-change: transform; }
.hero .ph { height: 100%; display: grid; place-items: center; font-size: 5rem; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, transparent 30%, transparent 65%, rgba(43, 27, 18, .35) 100%); }
.hero-actions { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.hero-actions div { display: flex; gap: 8px; }
.hero-actions .icon-btn { background: rgba(255, 255, 255, .9); backdrop-filter: blur(6px); }
@media (min-width: 860px) { .hero { margin: 8px 0 0; border-radius: 34px; } }

.recipe-head {
    position: relative; z-index: 3; margin: -40px 6px 0; padding: 22px 20px;
    background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-m);
}
.recipe-head h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 900; margin: 4px 0 6px; }
.recipe-head p { color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.fact { background: var(--bg); border-radius: 14px; padding: 10px; text-align: center; }
.fact b { display: block; font-size: 1.05rem; }
.fact span { font-size: .72rem; color: var(--muted); font-weight: 700; }

.ninja-box { margin-top: 16px; border-radius: var(--r-lg); padding: 18px; background: linear-gradient(135deg, #6E4AA0, #8D63C4); color: #fff; box-shadow: 0 14px 30px -14px rgba(110, 74, 160, .8); }
.ninja-box small { font-weight: 850; letter-spacing: .08em; font-size: .7rem; opacity: .85; }
.ninja-box h3 { font-size: 1.05rem; margin: 2px 0 12px; }
.ninja-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ninja-grid div { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 9px 11px; }
.ninja-grid span { display: block; font-size: .7rem; opacity: .8; font-weight: 700; }
.ninja-grid b { font-size: .98rem; }
.ninja-hint { margin-top: 10px; background: rgba(255, 255, 255, .95); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: .88rem; }

.panel { margin-top: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.panel-head h2 { font-size: 1.15rem; font-weight: 850; }
.stepper { display: flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 14px; padding: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; background: var(--surface); font-weight: 900; font-size: 1.1rem; box-shadow: var(--shadow-s); }
.stepper b { min-width: 58px; text-align: center; font-size: .9rem; }

.check-list { list-style: none; display: grid; gap: 6px; }
.check-list label {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px;
    background: var(--bg); cursor: pointer; transition: background .2s, opacity .3s;
}
.check-list input { display: none; }
.box { width: 24px; height: 24px; flex: none; border-radius: 8px; border: 2px solid #E2CDB9; background: #fff; display: grid; place-items: center; transition: all .25s cubic-bezier(.3, 1.6, .5, 1); }
.check-list input:checked + .box { background: var(--basil); border-color: var(--basil); transform: scale(1.08); }
.check-list input:checked + .box::after { content: "✓"; color: #fff; font-weight: 900; font-size: .85rem; }
.check-list input:checked ~ .txt { opacity: .45; text-decoration: line-through; }
.txt { display: flex; gap: 8px; flex: 1; min-width: 0; }
.qty { min-width: 70px; font-weight: 850; color: var(--ink); }
.qty small { font-weight: 700; color: var(--muted); }
.nm { min-width: 0; font-weight: 700; }
.gentle { font-size: .8rem; }
.gentle-note { list-style: none; margin-top: 6px; padding: 10px 12px; border-radius: 14px; background: var(--saffron-soft); color: #7A4E0C; font-size: .85rem; font-weight: 700; }
.from { display: block; font-size: .72rem; color: var(--muted); font-weight: 700; margin-top: 1px; }

.cook-cta { margin-top: 16px; }
.steps-preview { counter-reset: s; list-style: none; display: grid; gap: 10px; }
.steps-preview li { display: flex; gap: 12px; color: var(--ink-soft); }
.steps-preview li::before { counter-increment: s; content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 10px; background: var(--tomato-soft); color: var(--tomato-deep); font-weight: 900; display: grid; place-items: center; font-size: .85rem; }
.steps-preview b { color: var(--ink); }
details.tips { margin-top: 16px; background: var(--saffron-soft); border-radius: var(--r-lg); padding: 16px 18px; }
details.tips summary { font-weight: 850; cursor: pointer; list-style: none; }
details.tips div { margin-top: 10px; white-space: pre-line; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Koch-Modus ---------- */
.cook {
    position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
    background: radial-gradient(900px 600px at 80% -10%, #5A2E1A 0%, transparent 60%), #1E130D;
    color: #FFF3E6;
    padding: calc(14px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
}
.cook-top { display: flex; align-items: center; gap: 12px; }
.cook-progress { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.cook-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--tomato)); border-radius: 4px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.cook-count { font-weight: 800; font-size: .9rem; opacity: .8; min-width: 44px; text-align: right; }
.cook-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 720px; margin: 0 auto; width: 100%; perspective: 1000px; }
.cook-step { animation: stepIn .5s cubic-bezier(.2, .8, .2, 1); }
.cook-step.back { animation-name: stepBack; }
@keyframes stepIn { from { opacity: 0; transform: translateX(40px) rotateY(-14deg); } to { opacity: 1; transform: none; } }
@keyframes stepBack { from { opacity: 0; transform: translateX(-40px) rotateY(14deg); } to { opacity: 1; transform: none; } }
.cook-step small { color: var(--saffron); font-weight: 900; letter-spacing: .1em; font-size: .8rem; }
.cook-step p { font-size: clamp(1.35rem, 5.2vw, 2rem); font-weight: 700; line-height: 1.4; margin-top: 10px; }
.cook-step .done-icon { font-size: 4rem; }
.cook-timers { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; min-height: 10px; }
.timer-btn { padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 800; border: 1px solid rgba(255, 255, 255, .16); }
.timer-btn.running { background: var(--saffron); color: var(--ink); border-color: transparent; font-variant-numeric: tabular-nums; }
.timer-btn.ringing { background: var(--tomato); color: #fff; animation: ring .6s ease-in-out infinite; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg) scale(1.05); } 75% { transform: rotate(4deg) scale(1.05); } }
.cook-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; max-width: 720px; margin: 0 auto; width: 100%; }
.btn.ghost-light { background: rgba(255, 255, 255, .1); color: #fff; }

/* ---------- Wochenplan ---------- */
.week { display: grid; gap: 12px; }
.day {
    display: flex; align-items: center; gap: 14px; padding: 12px;
    background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-s); border: 1px solid var(--line);
    transition: transform .3s;
}
.day.today { border-color: var(--tomato); box-shadow: 0 0 0 3px var(--tomato-soft), var(--shadow-s); }
.day-label { width: 50px; flex: none; text-align: center; }
.day-label b { display: block; font-size: 1.15rem; font-weight: 900; }
.day-label span { font-size: .7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.day.today .day-label b { color: var(--tomato); }
.day-meal { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-decoration: none; }
.day-meal img, .day-meal .ph { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; background: var(--bg-deep); display: grid; place-items: center; font-size: 1.6rem; }
.day-meal b { display: block; font-size: .98rem; line-height: 1.25; }
.day-meal span { font-size: .78rem; color: var(--muted); font-weight: 700; }
.day-empty { flex: 1; text-align: left; padding: 16px; border-radius: 14px; border: 2px dashed #EBD6C1; color: var(--muted); font-weight: 800; transition: all .2s; }
.day-empty:hover { border-color: var(--tomato); color: var(--tomato); background: var(--tomato-soft); }
.day .icon-btn { width: 36px; height: 36px; font-size: .9rem; box-shadow: none; background: var(--bg); }
.plan-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.day.pop { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.94) rotateX(20deg); } 100% { transform: none; } }

/* ---------- Auswahl-Blatt ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(43, 27, 18, .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
    width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column;
    background: var(--surface); border-radius: 28px 28px 0 0; padding-bottom: env(safe-area-inset-bottom);
    animation: sheetUp .4s cubic-bezier(.2, .9, .25, 1);
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@media (min-width: 860px) { .sheet-backdrop { align-items: center; } .sheet { border-radius: 28px; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: #E6D3C1; margin: 10px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 12px; }
.sheet-head h3 { font-size: 1.25rem; font-weight: 900; }
.sheet-list { overflow-y: auto; padding: 4px 12px 16px; display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; text-align: left; width: 100%; transition: background .15s; }
.pick:hover, .pick:focus-visible { background: var(--bg); }
.pick img, .pick .ph { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; background: var(--bg-deep); display: grid; place-items: center; font-size: 1.5rem; }
.pick b { display: block; font-size: .95rem; line-height: 1.25; }
.pick span { font-size: .76rem; color: var(--muted); font-weight: 700; }

/* ---------- Einkauf ---------- */
.shop-progress { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-s); margin-bottom: 14px; }
.shop-progress div { height: 10px; border-radius: 5px; background: var(--bg-deep); overflow: hidden; margin-top: 8px; }
.shop-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--basil), #7DB86F); border-radius: 5px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.aisle { margin-top: 14px; }
.aisle h3 { font-size: .95rem; font-weight: 900; margin: 0 4px 8px; display: flex; gap: 8px; align-items: center; }
.aisle h3 small { color: var(--muted); font-weight: 700; margin-left: auto; font-size: .78rem; }
.empty { text-align: center; padding: 40px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-s); }
.empty .e-ico { font-size: 3rem; }
.empty h3 { margin: 8px 0 6px; font-size: 1.2rem; }
.empty p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Würfel-Bühne ---------- */
.dice-stage { position: fixed; inset: 0; z-index: 80; background: rgba(30, 19, 13, .72); backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; animation: fade .2s; padding: 20px; }
.dice-scene { width: 130px; height: 130px; perspective: 700px; position: relative; }
.dice { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transform: rotateX(-20deg) rotateY(30deg); }
.dice.rolling { animation: toss 1.5s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes toss {
    0% { transform: translateY(0) rotateX(-20deg) rotateY(30deg); }
    35% { transform: translateY(-140px) rotateX(400deg) rotateY(250deg); }
    70% { transform: translateY(0) rotateX(700deg) rotateY(520deg); }
    85% { transform: translateY(-24px) rotateX(740deg) rotateY(560deg); }
    100% { transform: translateY(0) var(--final); }
}
.face {
    position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem;
    background: linear-gradient(145deg, #FFFFFF, #FFE9D6); border-radius: 26px;
    box-shadow: inset 0 0 0 2px rgba(228, 87, 46, .15), inset 0 -8px 16px rgba(191, 63, 28, .12);
    backface-visibility: hidden;
}
.f1 { transform: translateZ(65px); }
.f2 { transform: rotateY(90deg) translateZ(65px); }
.f3 { transform: rotateY(180deg) translateZ(65px); }
.f4 { transform: rotateY(-90deg) translateZ(65px); }
.f5 { transform: rotateX(90deg) translateZ(65px); }
.f6 { transform: rotateX(-90deg) translateZ(65px); }
.dice-shadow { position: absolute; left: 10%; right: 10%; bottom: -34px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(8px); }
.dice-result { width: min(360px, 100%); }
.dice-result .card { animation: resultIn .6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes resultIn { from { opacity: 0; transform: translateY(30px) rotateX(30deg) scale(.9); } }
.dice-result .row { display: flex; gap: 10px; margin-top: 12px; }
.dice-result .row .btn { flex: 1; }

/* ---------- Spickzettel-Platzhalter ---------- */
.note { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-s); color: var(--ink-soft); }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 750; box-shadow: var(--shadow-l); animation: toastIn .35s cubic-bezier(.3, 1.4, .5, 1); max-width: calc(100% - 32px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } }

[hidden] { display: none !important; }

/* =========================================================
   Ergänzungen für die echten Seiten
========================================================= */
.muted { color: var(--muted); font-weight: 700; }
.small { font-size: .82rem; }
.center { text-align: center; padding: 20px; }
.big-title.top { margin-top: 10px; }
.page-head-flex { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-list li { list-style: none; }

/* Foto-Knöpfe auf der Rezeptseite */
.hero-actions .icon-btn { color: var(--ink); text-decoration: none; cursor: pointer; }
.hero-empty { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; font-size: 1rem !important; }
.hero-empty > span { font-size: 4rem; }
.hero-empty .btn { position: relative; z-index: 2; cursor: pointer; }
.hero:has(.hero-empty)::after { display: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Wochenplan-Tage auf der Rezeptseite */
.plan-box h2 { font-size: 1.15rem; font-weight: 850; margin-bottom: 12px; }
.day-pills { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.day-pill { padding: 12px 0; border-radius: 14px; background: var(--bg); font-weight: 850; border: 1px solid var(--line); transition: all .2s; }
.day-pill:hover, .day-pill:focus-visible { background: var(--tomato); color: #fff; border-color: var(--tomato); }
.day-pill.today { border-color: var(--tomato); color: var(--tomato-deep); }
.day-pill.today:hover { color: #fff; }

/* Wochenplan: Formulare in Tageszeile */
.day form { display: contents; }
.day { gap: 10px; padding: 10px; }
.day-label { width: 42px; }
.day .icon-btn { width: 34px; height: 34px; flex: none; }
.day-meal { gap: 10px; }
.day-meal img, .day-meal .ph { width: 52px; height: 52px; }
.day-meal b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; }
.day-meal span { white-space: nowrap; }
.plan-actions form { display: inline-flex; }
.plan-actions { flex-wrap: nowrap; gap: 8px; }
.plan-actions .btn { padding: 10px 12px; font-size: .88rem; white-space: nowrap; }
.week .day { animation: dayIn .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes dayIn { from { opacity: 0; transform: perspective(700px) rotateX(-18deg) translateY(12px); } }
.week .day.pop { animation: pop .7s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.sheet > * { flex-shrink: 0; }
.sheet > .sheet-list { flex-shrink: 1; min-height: 0; }
.sheet-tools { display: flex; gap: 10px; align-items: center; padding: 0 18px; }
.sheet-tools .search.small { margin: 0; flex: 1; }
.sheet-tools .stepper b { min-width: 44px; }

/* Einkauf */
.shop-progress .small { font-weight: 700; }
.check-list input:checked ~ .txt .from { text-decoration: none; }

/* Spickzettel */
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0; }
.help-jump { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; text-align: left; font-weight: 850; box-shadow: var(--shadow-s); transition: transform .2s; }
.help-jump:active { transform: scale(.97); }
.help-jump span { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; font-weight: 700; }
.help-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-s); margin-bottom: 12px; overflow: hidden; }
.help-card summary { list-style: none; padding: 16px 18px; display: flex; gap: 12px; align-items: center; font-weight: 850; font-size: 1.05rem; cursor: pointer; }
.help-card summary::-webkit-details-marker { display: none; }
.help-arrow { margin-left: auto; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--bg); display: grid; place-items: center; transition: transform .3s; }
.help-card[open] .help-arrow { transform: rotate(180deg); }
.help-card[open] summary { border-bottom: 1px solid var(--line); }
.help-body { padding: 16px 18px; color: var(--ink-soft); }
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-card, .step { background: var(--bg); border-radius: 14px; padding: 13px; }
.mini-card strong { display: block; margin-bottom: 4px; color: var(--ink); }
.mini-card p { font-size: .9rem; }
.step-list { display: grid; gap: 10px; }
.step b { color: var(--tomato-deep); }
.hlf-card summary { background: var(--plum-soft); color: var(--plum); }
.notice { margin-top: 12px; background: var(--saffron-soft); border-radius: 14px; padding: 12px; font-size: .9rem; color: #7A4E0C; }
.qa-card summary { font-size: .98rem; }
.qa-card summary small { display: block; font-weight: 700; color: var(--muted); font-size: .84rem; margin-top: 2px; }
@media (max-width: 600px) { .mini-grid { grid-template-columns: 1fr; } }

/* Burrito-Rollen: gezeichnete Schritte */
.fold-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .fold-steps { grid-template-columns: repeat(4, 1fr); } }
.fold .shadow { fill: rgba(92, 52, 24, .12); }
.fold .seam { fill: none; stroke: #E2C48F; stroke-width: 1.5; }
.fold .spot { fill: #D9A864; opacity: .8; }
.fold { background: var(--bg); border-radius: 14px; padding: 10px; margin: 0; }
.fold svg { width: 100%; height: auto; display: block; }
.fold figcaption { font-size: .86rem; margin-top: 6px; }
.fold figcaption b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: var(--tomato); color: #fff; font-size: .78rem; margin-right: 4px; }
.fold .tort { fill: #F6E6C8; stroke: #E2C48F; stroke-width: 1.5; }
.fold .flap { fill: #FBF0DA; stroke: #E2C48F; stroke-width: 1.5; }
.fold .fill { fill: #8A4B2A; }
.fold .dot-g { fill: #5E9C4F; } .fold .dot-r { fill: #E4572E; } .fold .dot-y { fill: #F2C230; }
.fold .arrow { fill: none; stroke: var(--tomato); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.fold .toast { fill: none; stroke: #C99A55; stroke-width: 2.5; stroke-linecap: round; }
@media (max-width: 380px) { .fold-steps { grid-template-columns: 1fr; } }

/* Ninja als Alternative: zugeklappt unter der Zubereitung */
.ninja-alt { padding: 0; }
.ninja-alt summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 850; }
.ninja-alt summary::-webkit-details-marker { display: none; }
.ninja-alt .help-arrow { background: rgba(255, 255, 255, .18); color: #fff; }
.ninja-alt[open] .help-arrow { transform: rotate(180deg); }
.ninja-alt-body { padding: 0 18px 18px; }
.ninja-alt-body h3 { margin-top: 0; }
.ninja-grid b { overflow-wrap: anywhere; }

/* =========================================================
   Startseite: Sorten, Schalter, Regale, kompaktes Raster
========================================================= */
.sorten { display: flex; gap: 6px; overflow-x: auto; padding: 16px 2px 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; scroll-snap-type: x proximity; }
.sorten::-webkit-scrollbar { display: none; }
.sorte { flex: 0 0 76px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.sorte-icon {
    width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 1.75rem;
    background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow-s);
    transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background .2s, border-color .2s;
}
.sorte:active .sorte-icon { transform: scale(.92); }
.sorte.on .sorte-icon { background: var(--tomato-soft); border-color: var(--tomato); transform: translateY(-2px) scale(1.06); }
.sorte-name { font-size: .7rem; font-weight: 800; line-height: 1.15; text-align: center; color: var(--ink-soft); max-width: 76px; }
.sorte.on .sorte-name { color: var(--tomato-deep); }
.sorte-count { position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: .66rem; font-weight: 800; line-height: 20px; text-align: center; }
.sorte.on .sorte-count { background: var(--tomato); }
.flags { padding-top: 10px; }
.flags .chip { font-size: .84rem; padding: 7px 12px; }
.flags .chip.on { background: var(--tomato); border-color: var(--tomato); }

.shelf { margin-top: 22px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; }
.shelf-head h2 { font-size: 1.12rem; font-weight: 850; }
.shelf-head h2 small { font-size: .78rem; color: var(--muted); font-weight: 800; margin-left: 4px; }
.shelf-all { font-weight: 800; font-size: .88rem; color: var(--tomato-deep); padding: 4px 8px; border-radius: 10px; }
.shelf-all:hover { background: var(--tomato-soft); }
.shelf .rail { margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; }
.rail .card-mini { flex: 0 0 min(42%, 190px); }

/* Kompakte Karte */
.card-mini { border-radius: 20px; }
.card-mini .card-img { aspect-ratio: 1 / 1; }
.card-mini .card-body { padding: 9px 11px 12px; }
.card-mini .card-cat { font-size: .64rem; letter-spacing: .04em; }
.card-mini .card-title { font-size: .92rem; margin: 2px 0 0; line-height: 1.22; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-mini .card-sub, .card-mini .tags { display: none; }
.card-mini .fav { width: 32px; height: 32px; font-size: .9rem; right: 8px; top: 8px; }
.card-mini .pill-time { left: 8px; bottom: 8px; font-size: .7rem; padding: 3px 8px; }
.pill-ninja { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: var(--plum); box-shadow: 0 4px 10px -4px rgba(110, 74, 160, .8); }
.card-mini .ph { font-size: 2.2rem; }
/* Würfel-Ergebnis: Karte groß mit Untertitel */
.dice-result .card-mini .card-img { aspect-ratio: 4 / 3; }
.dice-result .card-mini .card-sub, .dice-result .card-mini .tags { display: block; }
.dice-result .card-mini .tags { display: flex; }
.dice-result .card-mini .card-title { font-size: 1.12rem; -webkit-line-clamp: 3; }

/* Beim Filtern: Würfel als schmale Leiste */
.home.filtering .dice-card { margin-top: 12px; padding: 10px 14px; gap: 12px; }
.home.filtering .dice-card .mini-dice { width: 36px; height: 36px; }
.home.filtering .dice-card .mini-dice i { font-size: 1.15rem; border-radius: 10px; }
.home.filtering .dice-card strong { font-size: .95rem; }
.home.filtering .dice-card strong + span { display: none; }

.grid-mini { grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid-mini { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-mini { grid-template-columns: repeat(4, 1fr); } }
.grid-mini .empty { grid-column: 1 / -1; }
.results-head { display: flex; align-items: center; gap: 8px; margin: 20px 2px 12px; flex-wrap: wrap; }
.results-head h2 { font-size: 1.12rem; font-weight: 850; }
.results-head small { color: var(--muted); font-weight: 800; }
.reset-btn { margin-left: auto; font-weight: 800; font-size: .84rem; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.recipe-head .card-cat a { color: inherit; text-decoration: none; }

/* Formular: Sorten ankreuzen */
.sorten-pick { border: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.sorten-pick legend { font-weight: 800; font-size: .88rem; margin-bottom: 8px; }
.sorten-pick legend small { font-weight: 700; color: var(--muted); }
.recipe-form .sorte-check { flex-direction: row; margin: 0; }
.sorte-check input { position: absolute; opacity: 0; pointer-events: none; }
.sorte-check span { display: inline-block; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-weight: 750; cursor: pointer; transition: all .15s; }
.sorte-check input:checked + span { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.sorte-check input:focus-visible + span { outline: 2px solid var(--tomato); outline-offset: 2px; }

/* Rezept eintragen / bearbeiten */
.new-recipe { margin: -4px 0 14px; }
.recipe-form .panel h2 { font-size: 1.1rem; font-weight: 850; margin-bottom: 12px; }
.recipe-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 800; font-size: .88rem; margin-bottom: 12px; }
.recipe-form label small { font-weight: 700; color: var(--muted); }
.recipe-form input:not([type=checkbox]), .recipe-form select, .recipe-form textarea, .paste-box textarea {
    width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
    font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink);
}
.recipe-form textarea, .paste-box textarea { resize: vertical; line-height: 1.45; }
.recipe-form input:focus, .recipe-form select:focus, .recipe-form textarea:focus, .paste-box textarea:focus { outline: 2px solid var(--tomato); border-color: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: repeat(3, 1fr); } }
.recipe-form .check-row { flex-direction: row; align-items: center; gap: 10px; }
.recipe-form .check-row input { width: 20px; height: 20px; accent-color: var(--tomato); }
.ing-preview { list-style: none; display: grid; gap: 4px; margin-top: 10px; }
.ing-preview li { font-size: .85rem; background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.pv-amount { display: inline-block; min-width: 80px; font-weight: 850; color: var(--tomato-deep); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.paste-box summary { cursor: pointer; list-style: none; }
.paste-box summary::-webkit-details-marker { display: none; }
.paste-box textarea { margin: 12px 0 10px; }

/* Sandras Tipp auf der Rezeptseite */
.sandra-tip { margin-top: 16px; position: relative; padding: 18px 18px 18px 64px; border-radius: var(--r-lg); background: linear-gradient(135deg, #FFF1E4, #FDE3D9); border: 1px solid #F7C9B5; }
.sandra-tip::before { content: "💡"; position: absolute; left: 16px; top: 16px; width: 36px; height: 36px; border-radius: 12px; background: var(--tomato); display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 6px 14px -6px rgba(228, 87, 46, .8); }
.sandra-tip h2 { font-size: 1.05rem; font-weight: 900; color: var(--tomato-deep); margin-bottom: 6px; }
.sandra-tip div { white-space: pre-line; color: var(--ink-soft); }

/* Anmeldung & Fußzeile */
.login-card { max-width: 440px; margin: 20px auto; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-m); padding: 28px 22px; }
.hero-title { font-size: 1.5rem; font-weight: 900; }
.hero-subtitle { color: var(--ink-soft); margin-top: 6px; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 16px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: .9rem; }
.login-form input { padding: 13px; border: 1px solid var(--line); border-radius: 14px; font-size: 1rem; background: var(--bg); }
.login-form input:focus { outline: 2px solid var(--tomato); border-color: transparent; }
.login-error { margin-top: 14px; background: var(--tomato-soft); color: var(--tomato-deep); border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: .9rem; }
.back-link { color: var(--muted); font-weight: 700; font-size: .9rem; }
.family-footer { max-width: 960px; margin: 28px auto 0; padding: 0 16px; text-align: center; font-size: .8rem; color: var(--muted); }
.family-footer a { color: var(--muted); }

/* Drucken: nur die Liste */
@media print {
    body { background: #fff; padding: 0; }
    .topbar, .tabbar, .family-footer, .icon-btn, .shop-progress, .toast { display: none !important; }
    .check-list label { background: none; padding: 4px 0; }
    .aisle { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .card.reveal { opacity: 1; transform: none; }
}
