:root {
  --bg: #faf9f6;
  --fg: #1d1d1b;
  --muted: #77736b;
  --line: #e4e1da;
  --accent: #1d1d1b;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --fg: #ecebe7; --muted: #9a968e; --line: #2e2d2a; --accent: #ecebe7; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 620px; margin: 0 auto; padding: 48px 22px 64px; }

/* Home */
.home { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 0; }
.home h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }
form { display: flex; flex-direction: column; gap: 10px; }
input, textarea {
  width: 100%; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--fg); }
button, .btn {
  display: inline-block; font: inherit; font-weight: 600; text-align: center; text-decoration: none;
  background: var(--accent); color: var(--bg); border: 0; border-radius: 10px; padding: 13px 18px; cursor: pointer;
}
button:disabled { opacity: 0.55; cursor: progress; }
.msg { color: var(--muted); min-height: 1.5em; margin-top: 14px; font-size: 15px; }

/* Recipe */
.hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 24px; background: var(--line); }
.recipe h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 15px; margin: 0 0 16px; }
.desc { margin: 0 0 8px; }
.recipe h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 32px 0 10px; }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps { padding-left: 1.3em; margin: 0; }
.steps li { margin: 0 0 12px; padding-left: 4px; }
.notes { white-space: pre-line; margin: 0; }
.source { color: var(--muted); font-size: 14px; margin-top: 32px; word-break: break-word; }
.source a { color: inherit; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions .btn { flex: 0 0 auto; }
button.link { background: none; color: var(--muted); padding: 0; font-weight: 400; font-size: 15px; text-decoration: underline; }
