:root {
  --recipe-bg: #ffffff;
  --recipe-card: #fbfdff;
  --recipe-border: rgba(15, 23, 42, 0.12);
  --recipe-border-strong: #c3d4f1;
  --recipe-text: var(--ink);
  --recipe-muted: #4f6487;
  --recipe-blue: var(--primary);
  --recipe-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.recipe-tool-page { background: var(--recipe-bg); color: var(--recipe-text); }
.recipe-tool-page .tool-back { color: var(--recipe-blue); }

.recipe-hero {
  max-width: 980px;
  margin: 20px auto 0;
  text-align: center;
}

.recipe-hero__title {
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-family: "Syne", "Inter", system-ui, sans-serif;
}

.recipe-hero__title span { color: var(--recipe-blue); }

.recipe-hero__sub {
  margin: 10px auto 0;
  max-width: 760px;
  color: var(--recipe-muted);
  font-size: 1.02rem;
}

.recipe-panel {
  max-width: 980px;
  margin: 14px auto 0;
  border: 1px solid var(--recipe-border);
  border-radius: 20px;
  background: var(--recipe-card);
  box-shadow: var(--recipe-shadow-soft);
  padding: 16px;
}

.recipe-panel h2 {
  margin: 0;
  font-family: "Syne", "Inter", system-ui, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.recipe-form { margin-top: 12px; display: grid; gap: 10px; }

.recipe-search-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--recipe-border-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--recipe-text);
  padding: 0 14px;
  font-size: 0.96rem;
}

.recipe-search-input:focus {
  outline: none;
  border-color: rgba(63, 139, 255, 0.78);
  box-shadow: 0 0 0 4px rgba(63, 139, 255, 0.18);
}

.recipe-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipe-chip {
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid #b9cef1;
  background: #f5f9ff;
  color: #3d5989;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.recipe-chip.is-active {
  border-color: #2f6cdf;
  background: linear-gradient(135deg, #3f86f5 0%, #2d69cf 100%);
  color: #fff;
}

.recipe-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recipe-count {
  margin: 0;
  color: #57709a;
  font-size: 0.88rem;
  font-weight: 700;
}

.recipe-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recipe-card {
  border: 1px solid #d9e4f5;
  border-radius: 14px;
  background: #fbfdff;
  padding: 10px;
  display: grid;
  gap: 8px;
  overflow: hidden;
}

.recipe-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recipe-card__title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.96rem;
  font-weight: 800;
}

.recipe-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6cdf;
  background: #e8f1ff;
  flex: 0 0 auto;
}

.recipe-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recipe-tag {
  border: 1px solid #c8d8f2;
  background: #eff5ff;
  color: #4e6794;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
}

.recipe-card--building .recipe-icon { background: #e7f7ef; color: #2f9a61; }
.recipe-card--utility .recipe-icon { background: #e8f1ff; color: #2f6cdf; }
.recipe-card--redstone .recipe-icon { background: #fff0f0; color: #c93f3f; }
.recipe-card--combat .recipe-icon { background: #f0ebff; color: #7b4cff; }
.recipe-card--food .recipe-icon { background: #fff5e8; color: #cf7a21; }

.recipe-section h4 {
  margin: 0 0 4px;
  font-size: 0.74rem;
  color: #5b6f91;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.recipe-list {
  margin: 0;
  padding-left: 16px;
  color: #2a3b5c;
  display: grid;
  gap: 2px;
  font-size: 0.86rem;
}

.recipe-output {
  margin: 0;
  color: #1e2a44;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.88rem;
  background: #f4f8ff;
  border: 1px solid #dbe6f7;
  border-radius: 8px;
  padding: 8px;
  word-break: break-word;
}

.recipe-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.recipe-btn {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #b7cdf2;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  color: #355686;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0 12px;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(15, 23, 42, 0.1);
}

.recipe-btn:hover { border-color: #96b3e4; filter: brightness(0.99); }
.recipe-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 rgba(15, 23, 42, 0.1); }

.recipe-btn--primary {
  border-color: #2f6cdf;
  background: linear-gradient(180deg, #3f86f5 0%, #2d69cf 100%);
  color: #ffffff;
}

.recipe-empty {
  margin: 10px 0 0;
  color: #6a7f9f;
  font-size: 0.92rem;
}

.mc-final-cta {
  max-width: 980px;
  margin: 16px auto 0;
}

.mc-final-cta__banner {
  border-radius: 14px;
  border: 1px solid var(--recipe-border);
  background: linear-gradient(135deg, #edf4ff, #f8fbff);
  box-shadow: var(--recipe-shadow-soft);
  padding: 26px 20px;
  text-align: center;
}

.mc-final-cta__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 4.2vw, 2.3rem);
  letter-spacing: -0.02em;
  font-family: "Syne", "Inter", system-ui, sans-serif;
  font-weight: 600;
}

.mc-final-cta__sub { margin: 8px 0 0; color: #506587; font-size: 0.95rem; }

.mc-final-cta__btn {
  margin-top: 16px;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 980px) { .recipe-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .recipe-hero { margin-top: 18px; }
  .recipe-panel { padding: 12px; }
  .recipe-results-head { align-items: flex-start; flex-direction: column; }
  .recipe-btn { width: 100%; }
}
