:root {
  --bg: #1a1612;
  --bg-card: #241f1a;
  --bg-hover: #2e2822;
  --text: #e8e0d6;
  --text-muted: #9a8e80;
  --accent: #d4956a;
  --accent-light: #e8b08a;
  --accent-dim: #a06840;
  --border: #3a3228;
  --check: #8b9a6b;
  --radius: 12px;
  --radius-sm: 8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
.app { max-width: 600px; margin: 0 auto; padding: 0 16px; padding-bottom: env(safe-area-inset-bottom); }

/* Back button */
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 0;
  background: none; border: none; color: var(--accent); font-size: 14px;
  cursor: pointer; font-family: inherit; font-weight: 500; text-decoration: none;
}
.back-btn:hover { color: var(--accent-light); }
.logo { font-family: "DM Serif Display", serif; font-size: 24px; color: var(--accent); }

/* Hero image */
.recipe-hero {
  width: 100%; border-radius: var(--radius); display: block; margin: 8px 0 20px;
  height: auto;
}

/* Header */
.recipe-header-title {
  font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text);
  line-height: 1.2; margin-bottom: 4px;
}
.recipe-header-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* Story */
.recipe-story {
  border-left: 3px solid var(--accent-dim); padding: 12px 16px; margin-bottom: 20px;
  background: var(--bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.recipe-story p { font-style: italic; color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* Method selector */
.method-selector { margin-bottom: 16px; }
.method-label { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; display: block; }
.toggle-pill {
  display: inline-flex; gap: 4px; background: var(--bg-card); border-radius: 20px;
  padding: 3px; border: 1px solid var(--border); width: fit-content;
}
.toggle-pill button {
  padding: 6px 14px; border-radius: 18px; border: none; background: none;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: inherit; white-space: nowrap;
}
.toggle-pill button.active { background: var(--accent-dim); color: var(--text); }
.method-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.method-btn {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); font-size: 13px;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.method-btn.active { border-color: var(--accent); color: var(--accent); background: var(--bg-hover); }

/* Servings */
.servings-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 20px;
}
.servings-label { font-size: 14px; color: var(--text-muted); flex: 1; }
.servings-controls { display: flex; align-items: center; gap: 12px; }
.serving-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-hover); color: var(--text); font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-family: inherit;
}
.serving-btn:hover { border-color: var(--accent); color: var(--accent); }
.serving-count { font-size: 20px; font-weight: 600; min-width: 28px; text-align: center; }

/* Unit toggle */
.unit-row {
  display: flex; gap: 4px; background: var(--bg-card); border-radius: 20px;
  padding: 3px; border: 1px solid var(--border); margin-bottom: 24px; width: fit-content;
}
.unit-btn {
  padding: 6px 16px; border-radius: 18px; border: none; background: none;
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.unit-btn.active { background: var(--accent-dim); color: var(--text); }

/* Tabs */
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab-btn {
  flex: 1; padding: 12px; background: none; border: none;
  border-bottom: 2px solid transparent; color: var(--text-muted);
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Ingredients */
.ingredient-group-label {
  font-size: 13px; font-weight: 600; color: var(--accent-dim);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.ingredient-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid rgba(58,50,40,0.5); cursor: pointer; transition: opacity 0.2s;
}
.ingredient-item.checked { opacity: 0.4; text-decoration: line-through; }
.ingredient-check {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.15s; font-size: 13px;
}
.ingredient-item.checked .ingredient-check { background: var(--check); border-color: var(--check); }
.ingredient-qty { font-weight: 600; color: var(--accent-light); min-width: 60px; font-size: 14px; }
.ingredient-name { font-size: 14px; color: var(--text); }

/* Steps */
.step-item { display: flex; gap: 14px; margin-bottom: 20px; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent-dim);
  color: var(--text); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
}
.step-text { font-size: 15px; line-height: 1.6; color: var(--text); }
.step-text strong { color: var(--accent-light); font-weight: 600; }

/* Cook mode button */
.cook-mode-btn {
  width: 100%; padding: 16px; border-radius: var(--radius);
  background: var(--accent); color: #1a1612; font-size: 16px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit; margin-top: 20px; transition: all 0.2s;
}
.cook-mode-btn:hover { background: var(--accent-light); }

/* Cook mode overlay */
.cook-mode-overlay {
  display: none; position: fixed; inset: 0; background: var(--bg);
  z-index: 1000; flex-direction: column;
}
.cook-mode-overlay.active { display: flex; }
.cook-mode-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.cook-mode-close {
  background: none; border: none; color: var(--accent); font-size: 16px;
  cursor: pointer; font-family: inherit;
}
.cook-mode-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 24px; overflow-y: auto;
}
.cook-mode-step { text-align: center; max-width: 500px; }
.cook-mode-step-num { font-size: 48px; color: var(--accent-dim); font-weight: 700; margin-bottom: 16px; }
.cook-mode-step-text { font-size: 22px; line-height: 1.5; }
.cook-mode-step-text strong { color: var(--accent-light); }
.cook-mode-nav { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); }
.cook-mode-nav button {
  flex: 1; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: 16px;
  cursor: pointer; font-family: inherit;
}
.cook-mode-nav button.primary { background: var(--accent); color: #1a1612; border-color: var(--accent); font-weight: 600; }

/* Share */
.share-btn {
  flex-shrink: 0; margin-top: 4px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
  font-size: 13px; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--text); }

/* Servings + unit wrapper */
.servings-unit-row { display: block; }

/* Footer */
.recipe-footer { padding: 40px 0 20px; text-align: center; }
.recipe-footer a { color: var(--accent); text-decoration: none; font-size: 14px; }

/* ---- RESPONSIVE ---- */
@media (min-width: 640px) {
  .app { padding: 0 24px; }
}

/* ---- DESKTOP ---- */
@media (min-width: 1024px) {
  .app { max-width: 1100px; padding: 0 32px; }
  img.recipe-hero { width: 100%; height: auto; border-radius: var(--radius); }
  .controls-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
  .controls-row .method-selector { margin-bottom: 0; }
  .controls-row .method-label { display: none; }
  .controls-row .servings-unit-row { display: flex; align-items: center; gap: 16px; }
  .controls-row .servings-row { margin-bottom: 0; }
  .controls-row .toggle-pill:last-child { margin-left: auto; }
  .recipe-body { display: grid; grid-template-columns: 340px 1fr; gap: 40px; align-items: start; }
  .recipe-col-ingredients { position: sticky; top: 20px; border-right: 1px solid var(--border); padding-right: 32px; }
}
.section-title { font-family: 'DM Serif Display', serif; font-size: 1.2rem; color: var(--accent); margin-bottom: 12px; }
.step-qty { color: var(--accent); font-weight: 500; white-space: nowrap; }


/* ---- Country landing pages ---- */
.page { max-width: 900px; margin: 0 auto; padding: 0 16px 48px; }
.page-title { font-family: 'DM Serif Display', serif; font-size: 32px; line-height: 1.15; margin: 8px 0 6px; }
.page-sub { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.crumbs { font-size: 13px; color: var(--text-muted); padding: 14px 0 0; }
.crumbs a { color: var(--accent); text-decoration: none; }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: 1fr 1fr; } }
.card {
  display: flex; gap: 14px; align-items: center; padding: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: inherit; transition: all 0.2s;
}
.card:hover { border-color: var(--accent-dim); background: var(--bg-hover); }
.card-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover;
  flex-shrink: 0; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.card-name { font-family: 'DM Serif Display', serif; font-size: 17px; margin-bottom: 2px; }
.card-sub { font-size: 13px; color: var(--text-muted); line-height: 1.4; }
.card-meta { font-size: 12px; color: var(--accent-dim); margin-top: 4px; }
