/* Aussehen wie die bisherige App: Grün, Seitenleiste, Übersicht; hell und dunkel */
:root { color-scheme: light; --bg:#f7f8f5; --surface:#fff; --text:#20332b; --muted:#6f7b75; --line:#e6ebe8; --accent:#2e765d; --on-accent:#fff; --pale:#eaf3ee; --hero1:#dcebe2; --hero2:#eaf2e8; --error:#a32d2d; }
:root[data-theme="dark"] { color-scheme: dark; --bg:#141b18; --surface:#1d2622; --text:#e8efea; --muted:#9aa8a0; --line:#2e3a34; --accent:#6fc09c; --on-accent:#0f1a15; --pale:#233029; --hero1:#1f3129; --hero2:#222e26; --error:#f09595; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; --bg:#141b18; --surface:#1d2622; --text:#e8efea; --muted:#9aa8a0; --line:#2e3a34; --accent:#6fc09c; --on-accent:#0f1a15; --pale:#233029; --hero1:#1f3129; --hero2:#222e26; --error:#f09595; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin:0; background:var(--bg); color:var(--text); font:15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, .brand, .stats b { font-family: Georgia, "Times New Roman", serif; font-weight:700; line-height:1.2; }
h1 { font-size:1.9rem; margin:0; } h2 { font-size:1.35rem; margin:0 0 .4rem; } h3 { font-size:1.1rem; margin:0 0 .5rem; }
.muted { color:var(--muted); margin-top:0; }
.error { color:var(--error); margin:0 0 .5rem; } .error:empty { display:none; }
.card, .panel { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:1.25rem; }
.auth { min-height:100dvh; display:grid; place-items:center; padding:1rem; }
.auth form { width:min(24rem, 100%); display:grid; gap:.85rem; }
label { display:grid; gap:.3rem; font-size:.85rem; font-weight:600; color:var(--muted); }
input, textarea, select { font:inherit; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:.7rem .8rem; min-width:0; }
textarea, select { width:100%; }
button { font:inherit; border-radius:9px; padding:.6rem 1rem; min-height:44px; cursor:pointer; border:1px solid transparent; color:var(--text); background:transparent; }
.primary { background:var(--accent); color:var(--on-accent); font-weight:700; box-shadow:0 5px 14px #2e765d2b; }
.secondary, .ghost { background:var(--surface); color:var(--accent); border-color:var(--line); font-weight:700; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }

.sidebar { position:fixed; inset:0 auto 0 0; width:236px; padding:24px 18px; display:flex; flex-direction:column; gap:1rem; overflow-y:auto; background:var(--surface); border-right:1px solid var(--line); z-index:30; }
.brand { display:flex; align-items:center; gap:12px; font-size:20px; padding:0 8px 8px; }
.brand-mark { width:38px; height:38px; }
#tabs { display:grid; gap:3px; }
.nav-item { display:flex; align-items:center; gap:13px; width:100%; text-align:left; color:var(--muted); border-radius:10px; padding:.6rem .8rem; }
.nav-item span { width:18px; text-align:center; font-size:19px; }
.nav-item:hover, .nav-item[aria-current="page"] { background:var(--pale); color:var(--accent); font-weight:700; }
.side-foot { margin-top:auto; display:grid; gap:.4rem; }
.content { margin:0 auto; padding:28px clamp(16px,4.5vw,68px) 60px; max-width:1400px; }
.sidebar ~ .content { margin:0 0 0 236px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; margin-bottom:26px; }
.top-actions { display:flex; gap:.5rem; flex-wrap:wrap; justify-content:flex-end; }
.eyebrow { margin:0 0 6px; font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.eyebrow.dot { color:var(--accent); }
.eyebrow.dot::before { content:""; display:inline-block; width:7px; height:7px; margin-right:8px; border-radius:50%; background:currentColor; }
.section-head { margin-bottom:1.2rem; } .section-head h2 { font-size:1.75rem; }
[data-view="recipes"] .section-head, [data-view] > .section-head { max-width:46rem; }

.hero-card { display:grid; grid-template-columns:1.35fr .65fr; min-height:247px; overflow:hidden; border-radius:20px; background:linear-gradient(125deg,var(--hero1),var(--hero2)); margin-bottom:17px; }
.hero-copy { padding:36px 44px; } .hero-copy h2 { font-size:clamp(27px,3vw,39px); margin:12px 0 9px; }
.hero-copy > p:not(.eyebrow) { color:var(--muted); max-width:38rem; margin:0 0 20px; }
.search { width:min(570px,100%); border:0; min-height:48px; box-shadow:0 5px 20px #365e4b17; }
.hero-art { position:relative; min-height:220px; }
.bowl { position:absolute; bottom:21%; right:12%; width:180px; height:88px; padding-top:20px; display:flex; justify-content:center; gap:8px; color:#e89656; background:#fffdf8; border-radius:8px 8px 95px 95px; transform:rotate(-5deg); box-shadow:0 18px 30px #365e4b30; letter-spacing:4px; font-size:20px; }
.bowl::before { content:""; position:absolute; top:-12px; left:12px; right:12px; height:28px; border-radius:50%; background:#d3a679; }
.leaf { position:absolute; width:70px; height:28px; border-radius:90% 0; background:#83aa8d; }
.leaf.one { right:38%; top:18%; transform:rotate(55deg); } .leaf.two { right:16%; top:25%; transform:rotate(-12deg); opacity:.65; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; margin-bottom:30px; }
.stats article { display:flex; gap:12px; align-items:center; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px; }
.stats i { width:39px; height:39px; flex:none; display:grid; place-items:center; border-radius:10px; background:var(--pale); color:var(--accent); font-style:normal; font-size:19px; }
.stats b { font-size:24px; } .stats p { margin:0; color:var(--muted); font-size:12px; } .stats small { color:var(--accent); font-size:11px; }
.panels { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; margin-bottom:30px; }
.panel { display:flex; flex-direction:column; align-items:stretch; } .panel button { margin-top:auto; align-self:flex-start; }
.panel ul { list-style:none; padding:0; margin:0 0 .8rem; } .panel li { display:flex; justify-content:space-between; gap:.6rem; padding:.25rem 0; border-bottom:1px solid var(--line); }
progress { width:100%; height:9px; accent-color:var(--accent); }

.grid { display:grid; gap:17px; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); }
.recipe { display:flex; flex-direction:column; padding:0; overflow:hidden; text-align:left; background:var(--surface); border:1px solid var(--line); border-radius:14px; }
.visual { position:relative; height:150px; width:100%; display:grid; place-items:center; overflow:hidden; background:linear-gradient(125deg,var(--hero1),var(--hero2)); font-size:46px; }
.visual .photo { position:absolute; inset:0; width:100%; height:100%; max-height:none; border-radius:0; margin:0; object-fit:cover; }
.visual em { position:absolute; left:12px; bottom:10px; max-width:85%; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; background:var(--surface); border-radius:20px; padding:2px 10px; font-size:11px; font-style:normal; font-weight:700; }
.recipe-text { padding:14px 16px; } .recipe-text h2 { font-size:1.1rem; }
.chips { display:flex; gap:.4rem; overflow-x:auto; margin-bottom:1rem; padding-bottom:2px; }
.chips button { flex:none; border-radius:30px; background:var(--surface); border-color:var(--line); font-size:13px; min-height:36px; padding:.3rem .9rem; }
.chips button[aria-pressed="true"] { background:var(--accent); color:var(--on-accent); }

.split { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr)); gap:17px; align-items:start; }
.row { display:flex; flex-wrap:wrap; gap:.6rem; align-items:end; margin-bottom:1rem; }
.row > input, .row > label { flex:1 1 9rem; }
.row input { width:100%; } .row > input { width:auto; }
.stack { display:grid; gap:.8rem; }
ul.card { list-style:none; padding:.5rem 1.25rem; }
ul.card li { padding:.45rem 0; display:flex; gap:.6rem; align-items:center; }
li.done span { text-decoration:line-through; color:var(--muted); }
input[type="checkbox"] { width:1.3rem; height:1.3rem; accent-color:var(--accent); }
.mobile-nav { display:none; }
.gallery { display:flex; gap:8px; overflow-x:auto; } .gallery figure { margin:0 0 10px; flex:none; text-align:center; } .gallery img { height:120px; border-radius:10px; display:block; }
.order { flex-basis:100%; margin:0; }
.week { display:grid; gap:8px; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); margin-bottom:18px; }
@media (min-width:1150px) { .week { grid-template-columns:repeat(7,minmax(0,1fr)); } }
.day { display:flex; flex-direction:column; gap:8px; padding:.7rem; } .day.today { border-color:var(--accent); } .day select { font-size:12px; margin-top:auto; }
.meal { background:var(--pale); border-radius:10px; padding:6px 8px; font-size:13px; } .meal div { display:flex; align-items:center; gap:4px; } .meal input { width:64px; padding:.25rem .4rem; }
.weekhead { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.recipe .visual { cursor:pointer; }
.fav { position:absolute; top:8px; right:8px; width:38px; min-height:38px; padding:0; border-radius:50%; background:var(--surface); color:#d6a449; font-size:20px; }
.titlelink { padding:0; min-height:0; text-align:left; font:inherit; color:inherit; border:0; }
.recipe-text { display:flex; flex-direction:column; flex:1; } .recipe-text .stepper { grid-column:auto; min-height:46px; margin-bottom:.6rem; } .recipe-text .source { font-size:11px; }
.cardactions { display:flex; gap:6px; margin-top:auto; border-top:1px solid var(--line); padding-top:10px; } .cardactions button { font-size:12px; padding:.3rem .7rem; min-height:36px; }
.manual-row { display:grid; grid-template-columns:minmax(0,8rem) minmax(0,1fr) auto; gap:6px; } .manual-row.step { grid-template-columns:minmax(0,1fr) auto; }
.optin { margin-bottom:14px; font-weight:400; }
.linkimport { margin-bottom:17px; }
.setting { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:10px; }
.setting summary { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:16px 18px; cursor:pointer; list-style:none; }
.setting summary::-webkit-details-marker { display:none; }
.setting summary::after { content:"›"; font-size:22px; color:var(--accent); } .setting[open] summary::after { content:"×"; }
.setting summary small { display:block; color:var(--muted); font-size:12px; }
.setting-body { padding:4px 18px 18px; border-top:1px solid var(--line); display:grid; gap:.8rem; }
.setting-body h4 { margin:.6rem 0 0; font-size:1rem; }
ul.plain { list-style:none; margin:0; padding:0; } ul.plain li { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; padding:.45rem 0; border-bottom:1px solid var(--line); }
ul.plain li span { flex:1; } ul.plain li.feedback { display:grid; }
.stepper b { min-width:52px; text-align:center; color:var(--text); font-size:14px; }
.error:not(:empty) { position:fixed; z-index:60; left:50%; transform:translateX(-50%); top:max(12px,env(safe-area-inset-top)); width:min(34rem,calc(100% - 24px)); padding:.7rem 1rem; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 30px #0003; }
.overlay { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:24px; background:#14261eaa; backdrop-filter:blur(3px); }
.panel-body { position:relative; width:min(960px,100%); max-height:calc(100dvh - 48px); overflow-y:auto; background:var(--surface); border-radius:18px; padding:30px; }
.close { position:absolute; top:10px; right:12px; font-size:28px; line-height:1; color:var(--muted); min-width:44px; }
.panel-body .title { font-size:clamp(24px,4vw,32px); margin:6px 0; }
.stars { display:flex; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.stars button { font-size:26px; padding:0; width:32px; color:var(--line); }
.stars button.on { color:#e3a72f; } .stars button:disabled { cursor:default; } .stars span { margin:0 0 0 10px; font-size:12px; }
.actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; padding-bottom:20px; border-bottom:1px solid var(--line); margin-bottom:18px; }
.stepper { grid-column:span 2; display:flex; align-items:center; gap:5px; background:var(--pale); border-radius:10px; padding:0 6px; font-size:12px; font-weight:700; color:var(--accent); }
.stepper span { margin-right:auto; } .stepper button { min-width:36px; min-height:36px; padding:0; } .stepper input { width:60px; flex:none; text-align:center; padding:.35rem .2rem; font-weight:700; }
.box { background:var(--pale); border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.explain { background:var(--pale); border:1px solid var(--accent); border-radius:12px; padding:14px 16px; margin-bottom:16px; }
.recipe-columns { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1fr); gap:28px; margin-bottom:20px; }
.recipe-columns table { width:100%; border-collapse:collapse; } .recipe-columns th { text-align:left; font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.recipe-columns th, .recipe-columns td { padding:.65rem .4rem; border-bottom:1px solid var(--line); vertical-align:top; }
.recipe-columns td:first-child { color:var(--accent); font-weight:700; width:34%; }
.recipe-columns ol { padding-left:1.3rem; margin:0; } .recipe-columns li { margin-bottom:.8rem; } .recipe-columns li::marker { color:var(--accent); font-weight:700; }
.term { display:inline; min-height:0; padding:0; border:0; border-bottom:1px dotted var(--accent); border-radius:0; color:var(--accent); font-weight:700; }
@media (max-width:800px) { .overlay { padding:0; } .panel-body { width:100%; height:100dvh; max-height:100dvh; border-radius:0; padding:calc(22px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom)); } .close { top:calc(6px + env(safe-area-inset-top)); }
  .actions { grid-template-columns:1fr 1fr; } .stepper { grid-column:1/-1; min-height:48px; } .recipe-columns { grid-template-columns:1fr; } }
.pre { white-space:pre-wrap; overflow-wrap:anywhere; }
label.check { display:flex; align-items:center; gap:.5rem; }
ul.card li span { flex:1; }
ul.card li { flex-wrap:wrap; }
a { color:var(--accent); }
.photo { display:block; width:100%; max-height:22rem; object-fit:cover; border-radius:12px; margin-bottom:.6rem; }
#print { display:none; }
@media print {
  body { background:#fff; color:#000; } #app, #auth { display:none !important; } #print { display:block; }
  #print .pre, #print p, #print li { color:#000; } #print article { break-after:page; } #print article:last-child { break-after:auto; }
}
body.friend .household { display:none !important; }
ul.card:empty { display:none; }
body.friend .mobile-nav .household { display:none !important; }
@media (max-width:800px) {
  .sidebar { display:none; inset:0 0 0 0; width:auto; padding:calc(20px + env(safe-area-inset-top)) 18px 100px; border:0; }
  .menu .sidebar { display:flex; }
  .sidebar ~ .content { margin:0; }
  .content { padding:calc(18px + env(safe-area-inset-top)) 16px 110px; }
  .topbar h1 { font-size:25px; } .top-actions .secondary { display:none; }
  .top-actions .primary { font-size:13px; padding:.4rem .7rem; }
  .hero-card { grid-template-columns:1fr; min-height:0; } .hero-art { display:none; } .hero-copy { padding:26px 20px; } .hero-copy h2 { font-size:28px; }
  .stats { grid-template-columns:1fr 1fr; gap:9px; } .stats article { padding:12px; }
  .mobile-nav { display:flex; position:fixed; z-index:42; left:10px; right:10px; bottom:max(12px,env(safe-area-inset-bottom)); justify-content:space-around; padding:6px; background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:0 8px 30px #1a332922; }
  .mobile-nav button { flex:1; min-width:0; display:grid; place-items:center; gap:0; padding:2px; color:var(--muted); font-size:19px; }
  .mobile-nav button[aria-current="page"], .mobile-nav button[aria-expanded="true"] { color:var(--accent); } .mobile-nav small { font-size:10px; }
}
@media print { .mobile-nav { display:none; } }
