:root {
  --bg: #fbf7f2;
  --card: #ffffff;
  --ink: #2f2a28;
  --muted: #8a7f78;
  --azalea: #d6567f;
  --azalea-soft: #f7e2ea;
  --rye: #b98a3e;
  --line: #ece4db;
  --shadow: 0 2px 10px rgba(90, 60, 50, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
a { color: var(--azalea); text-decoration: none; }
header.site {
  position: relative;
  text-align: center;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--azalea-soft), var(--bg));
}
.collage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
}
.collage .tile {
  background-size: cover;
  background-position: center 22%;  /* bias toward the top so faces stay visible */
  background-repeat: no-repeat;
}
.scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(60, 40, 45, 0.28) 0%,
    rgba(150, 55, 95, 0.4) 55%,
    rgba(214, 86, 127, 0.55) 100%);
}
.hero-inner { position: relative; z-index: 2; padding: 40px 20px 34px; }
header.site h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  margin: 0;
  letter-spacing: 0.5px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(40, 20, 30, 0.55);
}
header.site h1 .amp { color: #ffd9e6; font-style: italic; }
header.site p.tag {
  color: #fff;
  margin: 8px 0 0;
  font-style: italic;
  text-shadow: 0 1px 10px rgba(40, 20, 30, 0.55);
}
.emblem {
  display: block;
  width: 118px;
  max-width: 50%;
  height: auto;
  margin: 0 auto 6px;
  filter: drop-shadow(0 2px 7px rgba(40, 20, 30, 0.45));
}
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(40, 20, 30, 0.6);
  animation: cue-bob 1.9s ease-in-out infinite;
}
.scroll-cue svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 6px rgba(40, 20, 30, 0.5)); }
@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue { animation: none; }
}
.emblem .stem { fill: none; stroke: var(--rye); stroke-width: 2.4; stroke-linecap: round; }
.emblem .awn { fill: none; stroke: #c9a45f; stroke-width: 1.2; stroke-linecap: round; }
.emblem .kernel { fill: url(#ryeG); stroke: #a9762f; stroke-width: 0.6; }
.emblem .leaf { fill: #9bb583; stroke: #7f9a67; stroke-width: 0.6; }
.emblem .petal { fill: url(#petalG); stroke: #c94b74; stroke-width: 1; }
.emblem .disc { fill: #f2c14e; }
.emblem .stamen { fill: var(--rye); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; }
.controls { position: sticky; top: 0; background: var(--bg); padding: 16px 0; z-index: 5; }
#search {
  width: 100%;
  padding: 14px 18px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  outline: none;
}
#search:focus { border-color: var(--azalea); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--azalea); }
.chip.active { background: var(--azalea); color: #fff; border-color: var(--azalea); }
.count { color: var(--muted); font-size: 0.85rem; margin: 18px 2px 8px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  min-height: 118px;
  box-shadow: var(--shadow);
  transition: transform 0.12s, box-shadow 0.12s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(90, 60, 50, 0.14); }
.card-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--rye);
  font-weight: 600;
}
.card-title {
  font-family: Georgia, serif;
  font-size: 1.2rem;
  color: var(--ink);
  line-height: 1.3;
}
.empty { color: var(--muted); text-align: center; padding: 60px 20px; display: none; }
/* Recipe detail page */
.recipe { max-width: 760px; margin: 0 auto; padding: 24px 20px 80px; }
.back { display: inline-block; margin-bottom: 20px; font-size: 0.9rem; }
.recipe h1 {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  margin: 0 0 12px;
}
.badges { margin-bottom: 28px; }
.badge {
  display: inline-block;
  background: var(--azalea-soft);
  color: var(--azalea);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-right: 6px;
}
.recipe-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.recipe-body h2, .recipe-body h3, .recipe-body h4,
.recipe-body h5, .recipe-body h6 {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  color: var(--azalea);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-top: 28px;
}
.recipe-body > :first-child { margin-top: 0; }
.recipe-body ul, .recipe-body ol { padding-left: 22px; }
.recipe-body li { margin: 6px 0; }
footer.site { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 30px 20px 50px; }
@media (max-width: 520px) {
  header.site h1 { font-size: 2rem; }
  .collage { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 1fr); }
  .recipe-body { padding: 24px 20px; }
}
