:root {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --ink: #2a2420;
  --muted: #7a6e64;
  --line: #e4dacd;
  --accent: #8c3b1f;
  --accent-dark: #6e2d16;
  --ok-bg: #e9f1e4;
  --ok-ink: #2f5a22;
  --err-bg: #f8e4e0;
  --err-ink: #8a2416;
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
}

/* Kopfzeile */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark span { color: var(--accent); font-weight: 400; }
.site-header nav { display: flex; align-items: center; gap: 1.2rem; }

/* Layout */
/* Footer immer am unteren Rand, auch bei wenig Inhalt */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1; width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem) 4rem; }
.container.narrow { max-width: 760px; }

.intro { margin-bottom: 2rem; }
.eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, legend { font-family: var(--serif); font-weight: 600; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.15; }
.lede { margin: 0.6rem 0 0; color: var(--muted); max-width: 46ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; margin-top: 0; }

/* Buttons & Links */
.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 600 0.95rem var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.button:hover { background: var(--accent-dark); }
.button:disabled { opacity: 0.6; cursor: wait; }
.button.ghost { background: transparent; color: var(--accent); }
.button.ghost:hover { background: #f3e6dc; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Rezeptkarten */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.recipe-card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.4rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(42, 36, 32, 0.04);
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-date { font-size: 0.8rem; color: var(--muted); }
.kind-badge {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.recipe-card.is-component { border-top-color: #6b7a3a; }
.is-component .kind-badge { background: #6b7a3a; }
.card-uses { margin: -0.4rem 0 1rem; font-size: 0.85rem; font-style: italic; color: var(--muted); }
.recipe-card h2 { margin: 0 0 0.5rem; font-size: 1.4rem; line-height: 1.25; }
.card-text {
  margin: 0 0 1rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}
.meta li {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.8rem;
}

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tag {
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
}
.tag.course { border-color: #e2c3b3; color: var(--accent); }
.tag.diet { border-color: #c9d3ab; background: #f2f5e8; color: #4f5d24; }

/* Auswahl-Chips (Filter und Formular) */
.chip-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { position: relative; margin: 0; cursor: pointer; }
.chip input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.chip span {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover span { border-color: var(--accent); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.filters {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.75rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-group { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 0.8rem; }
.filter-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.filter-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filter-foot .small { margin: 0; font-size: 0.8rem; }
@media (max-width: 640px) {
  .filter-group { grid-template-columns: 1fr; gap: 0.35rem; }
}

.tag-field { margin-bottom: 1rem; }
.tag-field:last-child { margin-bottom: 0; }

.empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
}
.empty p { margin-top: 0; color: var(--muted); }

/* Hinweise */
.notice {
  margin: 0 0 1.5rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.notice.error { background: var(--err-bg); color: var(--err-ink); grid-column: 1 / -1; }

/* Formular */
.card {
  margin: 0 0 1.5rem;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
legend { padding: 0 0.4rem; font-size: 1.25rem; }
label { display: block; margin-bottom: 1rem; font-weight: 500; font-size: 0.92rem; }
label.short { max-width: 10rem; }
input, textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 400 1rem var(--sans);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #bdb2a7; }
select {
  display: block;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: 400 0.95rem var(--sans);
}
select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
[hidden] { display: none !important; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row.two-up { grid-template-columns: 1.4fr 1fr; align-items: end; }
.row.two-up > label { margin-bottom: 0; }
.yield { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.yield > label { margin-bottom: 0; }
.hint { margin: 0.6rem 0 0; }

/* Gericht / Komponente */
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.kind-option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.kind-option:has(input:checked) { border-color: var(--accent); background: #fbf3ec; }
.kind-option input { width: auto; margin: 0.25rem 0 0; accent-color: var(--accent); }
.kind-option strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.kind-option small { color: var(--muted); font-weight: 400; }

/* Zeilen für Zutaten und verwendete Komponenten */
.line-head,
.line {
  display: grid;
  gap: 0.5rem;
  align-items: center;
}
.ingredient-cols { grid-template-columns: 5.5rem 5.5rem minmax(0, 2fr) minmax(0, 2fr) 2rem; }
.usage-cols { grid-template-columns: minmax(0, 2.5fr) 5.5rem 5.5rem minmax(0, 1.5fr) 2rem; }
.line-head { font-size: 0.78rem; color: var(--muted); margin-bottom: 0.2rem; }
.line { margin-bottom: 0.5rem; }
.line input { margin-top: 0; padding: 0.45rem 0.55rem; font-size: 0.95rem; }
.line input[data-field="amount"] { text-align: right; }
.remove-line {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.remove-line:hover { background: var(--err-bg); color: var(--err-ink); }
.link-button {
  padding: 0.2rem 0;
  border: none;
  background: none;
  color: var(--accent);
  font: 500 0.9rem var(--sans);
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.muted-button { color: var(--muted); }
.usage-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.empty-inline {
  margin-bottom: 0.8rem;
  padding: 0.8rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
}

.totals {
  margin: 0 0 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  background: #fbf3ec;
  font-weight: 600;
  color: var(--accent);
}
.totals:empty { display: none; }

.checkbox { display: flex; align-items: center; gap: 0.6rem; font-weight: 500; }
.checkbox input { width: auto; margin: 0; accent-color: var(--accent); }

.actions { display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; }

@media (max-width: 640px) {
  .row, .row.two-up, .kind-switch { grid-template-columns: 1fr; }
  .row.two-up > label { margin-bottom: 0.5rem; }
  /* Mobil: Zeilen zweispaltig, Entfernen-Knopf oben rechts */
  .line-head { display: none !important; }
  .line {
    grid-template-columns: 1fr 1fr 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--line);
  }
  .line > :not(.remove-line) { grid-column: span 1; }
  .ingredient-cols > [data-field="name"],
  .ingredient-cols > [data-field="note"],
  .usage-cols > [data-field="component_id"],
  .usage-cols > [data-field="note"] { grid-column: 1 / 3; }
  .remove-line { grid-column: 3; grid-row: 1; }
  .site-header { flex-wrap: wrap; }
}

/* Ganze Karte klickbar (Link im Titel wird über die Karte gespannt) */
.recipe-card { position: relative; transition: box-shadow 0.15s, transform 0.15s; }
.recipe-card:hover { box-shadow: 0 6px 18px rgba(42, 36, 32, 0.1); transform: translateY(-2px); }
.recipe-card h2 a { color: inherit; text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.stretched:focus-visible { outline: none; }
.stretched:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Detailseite */
.back-link { display: inline-block; margin-bottom: 1.2rem; font-size: 0.92rem; }
.detail-head { position: relative; margin-bottom: 2rem; }
.edit-top { position: absolute; top: 0; right: 0; }
.detail-head .card-top { justify-content: flex-start; gap: 1rem; }
.detail-head h1 { margin-bottom: 0.4rem; }
.detail-head .lede { max-width: 62ch; margin-bottom: 1rem; }
.detail-head.is-component .kind-badge { background: #6b7a3a; }
.badges { display: inline-flex; gap: 0.4rem; }
.kind-badge.draft, .detail-head.is-component .kind-badge.draft { background: var(--muted); }
.meta.large li { padding: 0.35rem 0.85rem; font-size: 0.9rem; background: var(--surface); border: 1px solid var(--line); }

.detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 1.5rem;
  align-items: start;
}
.detail-side { position: sticky; top: 1rem; }
.detail-side h2, .section h2 { margin: 0 0 0.8rem; font-size: 1.35rem; }
.detail-side h3 { margin: 1.4rem 0 0.2rem; font-family: var(--serif); font-size: 1.1rem; }
.section { margin-bottom: 1.5rem; }
.section > .small { margin-top: -0.4rem; }

.ingredient-list { margin: 0; padding: 0; list-style: none; }
.ingredient-list li,
.usage summary {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.8rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.ingredient-list li:last-child { border-bottom: none; }
.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.name small { display: block; color: var(--muted); font-size: 0.82rem; }

.usage { border-bottom: 1px solid var(--line); }
.usage summary { position: relative; border-bottom: none; padding-right: 1.4rem; cursor: pointer; list-style: none; }
.usage summary::-webkit-details-marker { display: none; }
.usage summary::after {
  content: "▸";
  position: absolute;
  right: 0.2rem;
  top: 0.45rem;
  color: var(--muted);
  transition: transform 0.15s;
}
.usage[open] > summary::after { transform: rotate(90deg); }
.usage.is-empty summary { cursor: default; }
.usage.is-empty summary::after { content: none; }
.usage-body {
  margin: 0 0 0.6rem 1rem;
  padding: 0.2rem 0 0.2rem 0.9rem;
  border-left: 2px solid #6b7a3a;
  font-size: 0.93rem;
}
.usage-body .ingredient-list li,
.usage-body .usage summary { grid-template-columns: 4.5rem 1fr; }
.usage-body .usage:last-child { border-bottom: none; }

.instructions { white-space: pre-line; line-height: 1.7; }
.instructions.small { margin: 0.6rem 0 0.2rem; color: var(--muted); font-size: 0.88rem; }

.used-in { margin: 0; padding-left: 1.1rem; }
.used-in li { margin-bottom: 0.3rem; }

.detail-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.button.danger { background: transparent; color: var(--err-ink); border-color: var(--err-ink); }
.button.danger:hover { background: var(--err-bg); }

@media (max-width: 820px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .edit-top { position: static; margin-bottom: 1rem; }
}

/* ---------- Bilder ---------- */
.field-label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.92rem; }
.cover-field { margin-bottom: 1rem; }
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 1.4rem 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: #fdfaf5;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone span { color: var(--accent); font-weight: 600; }
.drop-zone:hover, .drop-zone.is-over, .step-edit.is-over { border-color: var(--accent); background: #fbf3ec; }
.drop-zone.is-busy { opacity: 0.6; pointer-events: none; }
.drop-zone.is-busy span::after { content: " – wird hochgeladen …"; }
.cover-preview { position: relative; display: inline-block; max-width: 100%; }
.cover-preview img { display: block; max-width: 100%; max-height: 260px; border-radius: var(--radius); }
.image-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.8rem;
  height: 1.8rem;
  border: none;
  border-radius: 50%;
  background: rgba(42, 36, 32, 0.75);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.image-remove:hover { background: var(--err-ink); }

/* ---------- Arbeitsschritte im Formular ---------- */
.step-editor { margin: 0 0 1rem; padding: 0; list-style: none; }
.step-edit {
  margin-bottom: 1rem;
  padding: 1rem 1rem 0.8rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fdfaf5;
  transition: border-color 0.15s, background 0.15s;
}
.step-edit:has([data-field="is_passive"]:checked) { border-style: dashed; background: #f7f5ef; }
.step-edit-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.step-number { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.step-tools { display: flex; gap: 0.2rem; }
.icon-button {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.icon-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-button:disabled { opacity: 0.35; cursor: default; }
.icon-button.danger:hover { border-color: var(--err-ink); color: var(--err-ink); background: var(--err-bg); }
.step-edit textarea { margin: 0 0 0.7rem; }
.step-edit-meta { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.2rem; }
.step-edit-meta label { margin-bottom: 0; }
.duration-inputs { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.duration-inputs input { width: 5.5rem; margin: 0; text-align: right; }
.duration-inputs select { width: auto; }
.passive-toggle { padding-bottom: 0.5rem; }
.step-images { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 0.8rem; }
.thumbs { display: contents; }
.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .image-remove { top: 0.2rem; right: 0.2rem; width: 1.5rem; height: 1.5rem; font-size: 0.95rem; }
.thumb.is-busy { display: grid; place-items: center; color: var(--muted); animation: pulse 1s infinite alternate; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }
.add-images { margin: 0; }

/* ---------- Detailseite: Titelbild & Schritte ---------- */
.detail-cover { margin: 0 0 1.8rem; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.detail-cover img { display: block; width: 100%; max-height: 460px; object-fit: cover; }

.step-list { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step-list > li {
  position: relative;
  padding: 0 0 1.4rem 3rem;
  counter-increment: step;
}
.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-list > li.is-passive::before { background: var(--surface); color: var(--muted); border: 2px dashed var(--muted); }
.step-list > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.3rem;
  bottom: 0.3rem;
  border-left: 2px solid var(--line);
}
.step-text { margin: 0.2rem 0 0.4rem; white-space: pre-line; line-height: 1.65; }
.duration-badge {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: #fbf3ec;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}
.duration-badge.passive { background: var(--bg); color: var(--muted); border: 1px dashed var(--muted); }
/* Schrittbilder: neben dem Text, auf schmalen Flächen darunter */
.step-list:not(.compact) { container-type: inline-size; }
.step-list > li.has-images { padding-bottom: 2rem; }
.step-gallery { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.step-gallery-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
@container (min-width: 520px) {
  .has-images .step-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.4rem;
    align-items: start;
  }
  .has-images .step-gallery { margin-top: 0.2rem; }
}
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--line);
  cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.gallery-item:hover img { transform: scale(1.04); }

.step-list.compact > li { padding: 0 0 0.6rem 2rem; }
.step-list.compact > li::before { width: 1.4rem; height: 1.4rem; font-size: 0.72rem; }
.step-list.compact > li:not(:last-child)::after { left: calc(0.7rem - 1px); top: 1.6rem; }
.step-list.compact .step-text { margin: 0 0 0.2rem; font-size: 0.88rem; }
.step-list.compact .duration-badge { font-size: 0.72rem; }
.usage-body .step-list { margin-top: 0.6rem; }

.image-viewer {
  max-width: 94vw;
  max-height: 94vh;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  cursor: zoom-out;
}
.image-viewer::backdrop { background: rgba(20, 16, 14, 0.85); }
.image-viewer img { display: block; max-width: 94vw; max-height: 94vh; }

/* ---------- Startseite: Titelbild auf der Karte ---------- */
.card-cover {
  margin: -1.4rem -1.4rem 1rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--line);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.recipe-card:hover .card-cover img { transform: scale(1.03); }
.recipe-card.has-cover { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 1.4rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 1.2rem; }

/* ---------- Impressum ---------- */
.legal h2 { margin: 2rem 0 0.5rem; font-size: 1.25rem; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 0.8rem; line-height: 1.65; }
.placeholder { padding: 0 0.25rem; border-radius: 3px; background: #fdf0c4; color: #6b5300; }

/* ---------- Admin ---------- */
html:not(.is-admin) [data-admin],
html.is-admin [data-guest] { display: none !important; }
.site-footer .link-button { font-size: inherit; }

.login-card { max-width: 420px; }
.login-card .button { width: 100%; margin-top: 0.4rem; }

/* Startseite */
.welcome { margin-bottom: 2.5rem; }
.welcome .lede { max-width: 62ch; }
.db-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 3rem;
  padding: 1.8rem clamp(1.25rem, 3vw, 2.2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius);
}
.db-teaser h2 { margin: 0 0 0.3rem; font-size: 1.7rem; }
.db-teaser p:last-child { margin: 0; }
.button.large { padding: 0.85rem 1.6rem; font-size: 1.05rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head h2 { margin: 0; font-size: 1.6rem; }
