:root {
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2b2420;
  --muted: #8a7d72;
  --line: #ece3d8;
  --accent: #c4622d;
  --accent-soft: #f6e7dc;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(120,90,60,.07);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250,246,240,.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: flex; flex-direction: column; gap: 1px;
  cursor: pointer; color: var(--ink); flex: 1; min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand b { font-size: 19px; letter-spacing: -.02em; }
.brand span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.lang-toggle {
  display: inline-flex; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px; box-shadow: var(--shadow);
}
.lang-toggle button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.lang-toggle button.active { background: var(--accent); color: #fff; }

/* ---- layout ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 80px; }

.search-wrap { position: relative; margin: 8px 0 26px; }
.search-wrap input {
  width: 100%; padding: 14px 18px 14px 46px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow); color: var(--ink);
}
.search-wrap input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search-wrap::before {
  content: "🔍"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 15px; opacity: .55;
}
.count { color: var(--muted); font-size: 13px; margin: -14px 0 18px; }

/* ---- grid ---- */
.grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(0,0,0,.08), 0 16px 40px rgba(120,90,60,.12); }
.card .thumb { aspect-ratio: 4/3; background: var(--accent-soft); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: .4; }
.card h3 { margin: 0; padding: 14px 16px 18px; font-size: 15px; line-height: 1.35; font-weight: 600; }

/* ---- recipe page ---- */
.back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.back:hover { color: var(--accent); text-decoration: none; }
.recipe { max-width: 760px; margin: 0 auto; }
.recipe h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 22px; }
.recipe .hero { border-radius: 18px; overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow); }
.recipe .hero img { width: 100%; }
.recipe h2, .recipe h3, .recipe h4 { line-height: 1.25; margin: 30px 0 10px; letter-spacing: -.01em; }
.recipe h2 { font-size: 24px; }
.recipe h3 { font-size: 20px; }
.recipe h4 { font-size: 17px; }
.recipe p { margin: 0 0 12px; }
.recipe ul, .recipe ol { margin: 0 0 16px; padding-left: 26px; }
.recipe li { margin: 4px 0; }
.recipe .body-img { border-radius: 14px; overflow: hidden; margin: 22px 0; box-shadow: var(--shadow); }
.recipe .body-img img { width: 100%; height: auto; }
.recipe .spacer { height: 8px; }
.recipe .embed { position: relative; aspect-ratio: 16/9; margin: 22px 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.recipe .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.recipe b, .recipe strong { font-weight: 700; }

.empty-state { text-align: center; color: var(--muted); padding: 60px 0; }

footer.site-footer {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 20px 50px;
  color: var(--muted); font-size: 13px; text-align: center; border-top: 1px solid var(--line);
}
footer.site-footer .dedication {
  margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--accent);
  font-style: italic; letter-spacing: .01em;
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .header-inner { padding: 12px 16px; }
  main { padding: 20px 16px 60px; }
}
