
:root {
  --bg: #fbf7f1; --card-bg: #ffffff; --ink: #2c2420; --muted: #7a6f66;
  --accent: #b5651d; --accent-soft: #f3e6d8; --border: #e9ddd0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
header.site {
  padding: 2rem 1.5rem 1rem; text-align: center;
}
header.site h1 { font-size: 2.2rem; margin: 0 0 .25rem; font-family: Georgia, "Times New Roman", serif; }
header.site p.tagline { color: var(--muted); margin: 0; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; padding: 0 1rem; margin-top: 1.1rem; }
.nav a {
  padding: .4rem .9rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--muted); border: 1px solid var(--border); background: var(--card-bg);
}
.nav a.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.filter-panel {
  max-width: 900px; margin: 1.2rem auto 0; padding: 1rem 1.2rem; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 14px;
}
.filter-panel + .filter-panel { margin-top: .7rem; }
.filter-panel.exclude { border-color: #d9a79a; background: color-mix(in srgb, var(--card-bg) 92%, #b23b2e); }
.filter-panel .filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.filter-panel .filter-head span { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.filter-panel .clear-filters { font-size: .82rem; color: var(--accent); font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; }
.filter-panel.exclude .clear-filters { color: #b23b2e; }
.filter-options { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.filter-options label {
  display: flex; align-items: center; gap: .4rem; font-size: .92rem; cursor: pointer;
}
.filter-options input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.exclude-options input { accent-color: #b23b2e; }
.filter-controls {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center;
  max-width: 640px; margin: .8rem auto 0; padding: 0 1rem; font-size: .9rem; color: var(--muted);
}
.filter-controls .switch, .filter-controls .sort-wrap { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.filter-controls input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
.filter-controls select {
  font: inherit; padding: .3rem .5rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--ink); cursor: pointer;
}
.search-wrap { max-width: 640px; margin: 1.5rem auto 0; padding: 0 1rem; }
#search {
  width: 100%; padding: .8rem 1rem; font-size: 1.05rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card-bg); color: var(--ink);
}
#search:focus { outline: 2px solid var(--accent); }
.count { text-align: center; color: var(--muted); font-size: .9rem; margin: .6rem 0 0; }
.grid {
  display: grid; gap: 1.1rem; padding: 1.5rem; max-width: 1200px; margin: 0 auto;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.card .thumb { aspect-ratio: 4/3; background: var(--accent-soft) center/cover no-repeat; }
.card .thumb.noimg { display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.card .body { padding: .8rem .9rem 1rem; }
.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; font-family: Georgia, "Times New Roman", serif; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip {
  font-size: .72rem; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: .15rem .55rem;
}
.recipe .chips { margin: .3rem 0 1rem; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; display: none; }
.recipe { max-width: 760px; margin: 0 auto; padding: 1.5rem; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--accent); font-weight: 600; }
.recipe .hero { width: 100%; border-radius: 16px; aspect-ratio: 16/10; object-fit: cover; background: var(--accent-soft); }
.recipe h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; margin: 1rem 0 1.5rem; }
.recipe h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); border-bottom: 2px solid var(--accent-soft); padding-bottom: .3rem; margin-top: 2rem; }
.group-label { font-weight: 700; margin: .8rem 0 .2rem; }
.recipe ul, .recipe ol { padding-left: 1.3rem; line-height: 1.6; }
.recipe ol li { margin-bottom: .6rem; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 2rem 1rem; }

@media (prefers-color-scheme: dark) {
  :root { --bg:#1c1815; --card-bg:#26211d; --ink:#f1e9e0; --muted:#a89a8c; --accent:#e08a3e; --accent-soft:#332a22; --border:#3a322b; }
}
