:root {
  --bg: #fffaf4;
  --card: #ffffff;
  --ink: #241510;
  --muted: #8a7565;
  --line: #eadfd2;
  --accent: #9c4d2b;
  --dark: #241510;
  --chip: #f7ebdd;
  --ok: #16834e;
  --shadow: 0 18px 50px rgba(59, 28, 16, 0.08);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(900px 400px at 10% -10%, #ffe8cf 0%, transparent 55%),
    radial-gradient(700px 300px at 100% 0%, #f3d7c2 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}
.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 27, 58, 0.18);
  background: #0b1b3a;
}
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
}
h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
}
.sub { margin: 0; color: var(--muted); font-size: 0.95rem; }

.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.btn.ghost:hover { background: var(--chip); }
.btn.primary {
  background: var(--dark);
  color: #fff7ec;
  border-color: var(--dark);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 720px) {
  .toolbar { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr !important; }
  .detail-panel { position: static !important; }
}

input, select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  width: 100%;
}

.countries {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 8px;
}
.country-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 110px;
  text-align: left;
}
.country-pill strong { display: block; font-size: 13px; }
.country-pill span { color: var(--muted); font-size: 11px; font-weight: 700; }
.country-pill.active {
  color: #fff;
  border-color: transparent;
}

.layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}
.list-panel, .detail-panel {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.detail-panel {
  position: sticky;
  top: 16px;
  min-height: 420px;
}
.list-panel h2, .detail-panel h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.recipe-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}
.recipe-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.recipe-card:hover, .recipe-card.active {
  border-color: #d7b89d;
  background: #fff8f0;
}
.plate {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fbdec3;
  border: 5px solid #fff4e8;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--accent);
  font-size: 12px;
}
.recipe-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}
.recipe-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.cost {
  font-weight: 900;
  color: #b85b31;
  font-size: 13px;
  white-space: nowrap;
}

.empty-detail {
  color: var(--muted);
  padding: 24px 8px;
}
.detail-hero {
  background: linear-gradient(145deg, #2d1710, #4a2618);
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
}
.detail-hero .meta {
  color: #f8cc9d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.detail-hero h2 {
  color: #fff;
  margin: 6px 0 8px;
  font-size: 1.6rem;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag {
  background: var(--chip);
  color: #70432d;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
}
.ing, .step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.ing {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px;
}
.process {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: #4d4037;
  line-height: 1.5;
  font-size: 14px;
  margin-bottom: 12px;
}

.foot {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.foot code {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}
.status-ok { color: var(--ok); font-weight: 800; }
.status-bad { color: #b43428; font-weight: 800; }
