:root {
  --bg: #f6f1e8;
  --panel: #fffaf2;
  --ink: #1f2933;
  --muted: #5d6d7e;
  --line: #d9cdb8;
  --accent: #d1495b;
  --accent-strong: #b33143;
  --ok: #1e7a39;
  --warn: #9e2a2b;
  --shadow: 0 12px 30px rgba(83, 63, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #fff8eb 0, transparent 50%),
    linear-gradient(165deg, #f4ebdd 0%, var(--bg) 70%);
  padding: 2.5rem 1rem 2rem;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  z-index: -1;
}

.bg-shape-a {
  width: 260px;
  height: 260px;
  top: -70px;
  right: -60px;
  background: rgba(209, 73, 91, 0.2);
}

.bg-shape-b {
  width: 200px;
  height: 200px;
  bottom: -60px;
  left: -40px;
  background: rgba(240, 185, 11, 0.17);
}

.hero {
  max-width: 960px;
  margin: 0 auto 1.6rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
}

.subtitle {
  margin: 0.7rem 0 0;
  color: var(--muted);
  max-width: 700px;
}

.workspace {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(290px, 340px) 1fr;
  gap: 1rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.input-panel h2,
.result-panel h2 {
  margin-top: 0;
}

form label {
  display: block;
  font-weight: 600;
  margin: 0.8rem 0 0.35rem;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid #c8b79c;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font: inherit;
  background: #fff;
}

textarea:focus,
input:focus,
select:focus,
button:focus {
  outline: 2px solid #f0b90b;
  outline-offset: 1px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 0.7rem;
}

button {
  margin-top: 1rem;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status.loading {
  color: #7a5c00;
}

.status.error {
  color: var(--warn);
}

.status.success {
  color: var(--ok);
}

.results {
  display: grid;
  gap: 0.85rem;
}

.empty-state {
  color: var(--muted);
}

.recipe-card {
  border: 1px solid #d8ccb7;
  border-radius: 12px;
  padding: 0.8rem;
  background: #fff;
}

.recipe-card h3 {
  margin: 0;
}

.recipe-card p {
  margin: 0.45rem 0 0.6rem;
}

.recipe-card ul,
.recipe-card ol {
  margin: 0.35rem 0 0.7rem 1rem;
}

.substitutions {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: #fff7e0;
}

.footer {
  max-width: 960px;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}
