:root {
  --bg: #EAF0EC; --surface: #FBFDFC; --ink: #14211C; --muted: #56675F; --line: #CFDAD4;
  --accent: #6B2D5C; --accent-ink: #FFFFFF; --mark: #F2C230; --mark-ink: #14211C; --cut: #C9D3CD;
  --error: #A3261F;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1613; --surface: #18221E; --ink: #E8EFEB; --muted: #96A89F; --line: #2B3A33;
    --accent: #DC97CB; --accent-ink: #1F0F1A; --mark: #E3B427; --mark-ink: #14211C; --cut: #34443D;
    --error: #F08A80;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 1.2em; }
p { margin: 0 0 .8em; }
a { color: inherit; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.handle { font-weight: 600; color: var(--accent); white-space: nowrap; }
.mark { background: var(--mark); color: var(--mark-ink); padding: 0 .15em; border-radius: 4px; }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--mark); font-size: .8rem; font-weight: 800;
}
.nav { display: flex; gap: 20px; margin-right: auto; }
.nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.account { display: flex; align-items: center; }
.account-user { display: flex; align-items: center; gap: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, .nav a:focus-visible {
  outline: 3px solid var(--mark); outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  padding: 72px 0 56px;
}
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); font-size: .8rem; font-weight: 600;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.note-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 18px 40px -24px rgba(20, 33, 28, .35);
}
.note-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: .85rem; }
.chip {
  background: var(--mark); color: var(--mark-ink); border-radius: 999px;
  padding: 2px 10px; font-weight: 700; font-size: .78rem;
}
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: 1px dashed var(--line);
}
.steps { padding-left: 1.2em; margin: 0; }
.steps li { margin-bottom: 4px; }
.cut {
  margin: 18px 0 0; padding: 8px 12px; border-radius: 8px;
  background: var(--cut); color: var(--muted); font-size: .85rem; text-decoration: line-through;
}

/* Abschnitte */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.how { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.how li, .kind {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; margin-bottom: 12px;
}
.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.formats { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.formats li {
  padding: 10px 20px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-weight: 600;
}

.savelist { padding-top: 40px; }
.empty {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px;
}
.empty p:last-child { margin: 0; }

.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Login-Dialog */
.login {
  width: min(400px, 100% - 32px); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); padding: 28px;
}
.login::backdrop { background: rgba(10, 16, 13, .55); }
.login-close-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent;
  color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.icon-btn:hover { background: var(--cut); color: var(--ink); }
.dm-login {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
}
.dm-login p:last-child { margin: 0; }
.dm-login-title { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dm-login-title .badge { font-size: .72rem; padding: 0 8px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.input-at {
  display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); margin-bottom: 14px;
}
.input-at span { padding-left: 12px; color: var(--muted); }
.input-at input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: inherit; padding: 10px 12px 10px 4px; border-radius: 10px;
}
.error { color: var(--error); font-size: .9rem; }
#login-form .small { margin: 12px 0 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .how, .kinds { grid-template-columns: 1fr; }
  .nav { display: none; }
  .topbar-inner { justify-content: space-between; }
}
@media (max-width: 420px) {
  .account-user .handle { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
