*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --cream: #f7f2ea;
  --warm-white: #fdfaf5;
  --terracotta: #c05c38;
  --terracotta-dark: #9b4428;
  --espresso: #1c1008;
  --bark: #3d2314;
  --sand: #d4b896;
  --sage: #7a8c6e;
  --gold: #c8973a;
  --gold-light: #e8c97a;
  --card-bg: #fffdf9;
  --border: rgba(60, 35, 20, 0.12);
  --shadow: 0 4px 24px rgba(28, 16, 8, 0.08);
  --shadow-hover: 0 16px 48px rgba(28, 16, 8, 0.18);
  --bg: var(--cream);
  --text: var(--espresso);
  --header-bg: var(--espresso);
  --card: var(--card-bg);
  --warm: var(--warm-white);
}
[data-theme="dark"] {
  --bg: #0f0a06;
  --text: #f0e8d8;
  --header-bg: #0a0603;
  --card: #1a1008;
  --warm: #120c06;
  --border: rgba(212, 184, 150, 0.1);
  --sand: #8a6a42;
  --bark: #c4a880;
  --cream: #f0e8d8;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Karla", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}

/* HEADER */
header {
  background: var(--header-bg);
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.logo {
  font-family: "Cormorant Garamond", serif;
  font-size: 32px;
  font-weight: 300;
  color: var(--cream);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.logo span {
  color: var(--gold);
  font-style: italic;
}
.logo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hdr-btn {
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--sand);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.hdr-btn:hover {
  background: rgba(200, 151, 58, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
}
.hdr-btn.active {
  background: rgba(200, 151, 58, 0.2);
  border-color: var(--gold);
  color: var(--gold-light);
}
.fav-count {
  background: var(--terracotta);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}
.theme-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* HERO */
.hero {
  background: var(--header-bg);
  padding: 72px 40px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 120%,
    rgba(192, 92, 56, 0.2) 0%,
    transparent 70%
  );
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.05;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero-sub {
  font-size: 15px;
  font-weight: 300;
  color: var(--sand);
  max-width: 440px;
  margin: 0 auto 36px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* SEARCH */
.search-wrap {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.search-row {
  display: flex;
}
.search-input-wrap {
  flex: 1;
  position: relative;
}
.search-input-wrap svg {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sand);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  height: 58px;
  padding: 0 20px 0 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-right: none;
  border-radius: 12px 0 0 12px;
  color: var(--cream);
  font-family: "Karla", sans-serif;
  font-size: 15px;
  outline: none;
  transition: all 0.25s;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
#searchInput::placeholder {
  color: rgba(212, 184, 150, 0.45);
}
#searchInput:focus {
  border-color: rgba(200, 151, 58, 0.5);
  background: rgba(255, 255, 255, 0.09);
}
.search-btn {
  height: 58px;
  padding: 0 28px;
  background: var(--terracotta);
  border: none;
  border-radius: 0 12px 12px 0;
  color: white;
  font-family: "Karla", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.search-btn:hover {
  background: var(--terracotta-dark);
}
.search-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.random-btn {
  margin-top: 10px;
  width: 100%;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--sand);
  font-family: "Karla", sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.random-btn:hover {
  background: rgba(200, 151, 58, 0.1);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* SUGGESTIONS */
.suggestions {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 12px auto 0;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}
.suggestion-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--sand);
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Karla", sans-serif;
}
.suggestion-chip:hover {
  background: rgba(200, 151, 58, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* INGREDIENT SEARCH PANEL */
.ingr-search-bar {
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
  display: none;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ingr-search-bar.visible {
  display: flex;
}
.ingr-input-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 200px;
}
#ingrInput {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
#ingrInput:focus {
  border-color: var(--terracotta);
}
.ingr-add-btn {
  height: 38px;
  padding: 0 16px;
  background: var(--terracotta);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ingr-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ingr-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(192, 92, 56, 0.12);
  color: var(--terracotta);
  border: 1px solid rgba(192, 92, 56, 0.2);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.ingr-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--terracotta);
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.ingr-search-btn {
  height: 38px;
  padding: 0 18px;
  background: var(--espresso);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
[data-theme="dark"] .ingr-search-btn {
  background: var(--gold);
  color: var(--espresso);
}

/* FILTERS */
.filters-bar {
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  height: 56px;
}
.filters-bar::-webkit-scrollbar {
  display: none;
}
.filter-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bark);
  opacity: 0.5;
  white-space: nowrap;
  margin-right: 4px;
}
.filter-chip {
  height: 32px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 40px;
  background: var(--card);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--bark);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.filter-chip:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}
.filter-chip.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
}

/* CATEGORY BAR */
.category-bar {
  background: var(--warm);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  height: 48px;
}
.category-bar::-webkit-scrollbar {
  display: none;
}
.cat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bark);
  opacity: 0.5;
  white-space: nowrap;
  margin-right: 4px;
}
.cat-chip {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: var(--card);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--bark);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-chip:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.cat-chip.active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

/* MAIN */
main {
  padding: 40px 40px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-count {
  font-family: "Karla", sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--sand);
}
.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sort-select {
  font-family: "Karla", sans-serif;
  font-size: 13px;
  color: var(--bark);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 7px 12px;
  cursor: pointer;
  outline: none;
}
.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.view-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s;
  color: var(--bark);
}
.view-btn.active {
  background: var(--terracotta);
  color: white;
}

/* GRID / LIST */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.recipe-grid.list-view {
  grid-template-columns: 1fr;
  gap: 14px;
}
.recipe-grid.list-view .recipe-card {
  display: flex;
  flex-direction: row;
  height: 110px;
}
.recipe-grid.list-view .card-img-wrap {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 0;
}
.recipe-grid.list-view .card-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  padding: 14px 18px;
}
.recipe-grid.list-view .card-desc {
  display: none;
}
.recipe-grid.list-view .card-title {
  font-size: 18px;
  margin-bottom: 0;
}
.recipe-grid.list-view .card-meta {
  padding-top: 0;
  border-top: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

/* SKELETON */
.skeleton-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.skeleton-img {
  height: 210px;
  background: linear-gradient(
    90deg,
    var(--border) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    var(--border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-body {
  padding: 20px;
}
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--border) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    var(--border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 10px;
}
.skeleton-line.w60 {
  width: 60%;
}
.skeleton-line.w80 {
  width: 80%;
}
.skeleton-line.w40 {
  width: 40%;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* RECIPE CARD */
.recipe-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition:
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s;
  cursor: pointer;
  position: relative;
  animation: fadeUp 0.45s ease both;
}
.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #e8d5c0 0%, #d4b896 100%);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.recipe-card:hover .card-img-wrap img {
  transform: scale(1.05);
}
.food-emoji-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.card-area-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(28, 16, 8, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--cream);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
}
.fav-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.25s;
  color: var(--sand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.fav-toggle:hover {
  transform: scale(1.15);
}
.fav-toggle.active {
  color: var(--terracotta);
}
.fav-toggle.pop {
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}
.card-category-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(28, 16, 8, 0.65);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: white;
}
.card-body {
  padding: 18px;
}
.card-cuisine {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 6px;
}
.card-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 7px;
}
.card-desc {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--bark);
  opacity: 0.8;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.card-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(122, 140, 110, 0.12);
  color: var(--sage);
}
.card-note-indicator {
  font-size: 11px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* MEAL PLAN DRAG */
.recipe-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
.drag-handle {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200, 151, 58, 0.15);
  border: none;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gold);
  transition: background 0.2s;
}
.drag-handle:hover {
  background: rgba(200, 151, 58, 0.3);
}

/* LOADER */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  gap: 20px;
  color: var(--sand);
}
.spinner {
  width: 40px;
  height: 40px;
  border: 2.5px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loader-text {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 18px;
}
.infinite-sentinel {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.load-more-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.load-more-spinner.visible {
  display: block;
}

/* EMPTY */
.empty-state {
  text-align: center;
  padding: 70px 40px;
  display: none;
}
.empty-state.visible {
  display: block;
}
.empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.empty-state h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: var(--sand);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═══════════ MODAL ═══════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 16, 8, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--warm);
  border-radius: 20px;
  max-width: 740px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(28, 16, 8, 0.35);
  transform: scale(0.95) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}
.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, #e8d5c0, #c8a888);
}
.modal-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 16, 8, 0.5) 0%, transparent 55%);
}
.modal-top-btns {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(28, 16, 8, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgba(28, 16, 8, 0.9);
}
.modal-top-right {
  display: flex;
  gap: 8px;
}
.modal-fav-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: none;
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--espresso);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.25s;
}
.modal-fav-btn:hover {
  background: white;
}
.modal-fav-btn.active {
  background: var(--terracotta);
  color: white;
}
.modal-plan-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 40px;
  background: rgba(200, 151, 58, 0.85);
  border: none;
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
}
.modal-plan-btn:hover {
  background: var(--gold);
}
.modal-body {
  padding: 28px 34px 36px;
}
.modal-cuisine {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.modal-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 34px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 10px;
}
.modal-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.modal-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 20px;
  background: rgba(122, 140, 110, 0.12);
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modal-stats {
  display: flex;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.modal-stat {
  flex: 1;
  padding: 14px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.modal-stat:last-child {
  border-right: none;
}
.stat-val {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  display: block;
}
.stat-label {
  font-size: 10px;
  color: var(--sand);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* SERVING SCALER */
.serving-scaler {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px 18px;
  background: rgba(200, 151, 58, 0.07);
  border: 1px solid rgba(200, 151, 58, 0.2);
  border-radius: 12px;
}
.scaler-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bark);
  flex: 1;
}
.scaler-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scaler-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: none;
  color: var(--gold);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 300;
}
.scaler-btn:hover {
  background: var(--gold);
  color: white;
}
.scaler-val {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  min-width: 30px;
  text-align: center;
}

.modal-section-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.ingredient-list {
  margin-bottom: 24px;
}
.ingredient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 4px;
}
.ingredient-item:last-child {
  border-bottom: none;
}
.ingredient-item.checked .ingredient-name {
  text-decoration: line-through;
  opacity: 0.45;
}
.ingredient-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 10px;
}
.ingredient-item.checked .ingredient-check {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}
.ingredient-amount {
  font-weight: 600;
  color: var(--terracotta);
  min-width: 90px;
}
.ingredient-name {
  color: var(--bark);
  flex: 1;
}
.add-to-list-btn {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--sand);
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}
.add-to-list-btn:hover {
  color: var(--gold);
}
.add-to-list-btn.added {
  color: var(--sage);
}
.step-list {
  list-style: none;
}
.step-item {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  align-items: flex-start;
  cursor: pointer;
}
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--terracotta);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.2s;
}
.step-item.done .step-num {
  background: var(--sage);
}
.step-item.done .step-text {
  text-decoration: line-through;
  opacity: 0.5;
}
.step-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--bark);
}
.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 11px 22px;
  background: #ff0000;
  color: white;
  border-radius: 40px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
}
.youtube-link:hover {
  opacity: 0.85;
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--bark);
  border-radius: 40px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.source-link:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* NOTES */
.notes-section {
  margin-top: 24px;
}
.notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.notes-textarea:focus {
  border-color: var(--gold);
}
.notes-save-btn {
  margin-top: 8px;
  height: 34px;
  padding: 0 18px;
  background: var(--espresso);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: "Karla", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
[data-theme="dark"] .notes-save-btn {
  background: var(--gold);
  color: var(--espresso);
}
.notes-save-btn:hover {
  opacity: 0.85;
}
.notes-saved-msg {
  font-size: 12px;
  color: var(--sage);
  margin-left: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}
.notes-saved-msg.show {
  opacity: 1;
}

/* RATING */
.rating-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.rating-label {
  font-size: 13px;
  color: var(--bark);
}
.stars {
  display: flex;
  gap: 3px;
}
.star {
  font-size: 22px;
  cursor: pointer;
  color: #ddd;
  transition: color 0.15s;
  line-height: 1;
}
.star.active {
  color: var(--gold);
}
.star:hover,
.star:hover ~ .star + .star {
  color: var(--gold-light);
}

/* ═══════════ MEAL PLANNER ═══════════ */
.planner-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(28, 16, 8, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.planner-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.planner-modal {
  background: var(--warm);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(28, 16, 8, 0.3);
  transform: scale(0.95) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.planner-overlay.open .planner-modal {
  transform: scale(1) translateY(0);
}
.planner-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.planner-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
}
.planner-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--bark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.planner-body {
  padding: 24px 28px;
}
.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}
.day-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bark);
  opacity: 0.6;
  text-align: center;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.day-slot {
  min-height: 90px;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s;
  position: relative;
}
.day-slot.drag-over {
  border-color: var(--gold);
  background: rgba(200, 151, 58, 0.05);
}
.day-slot.has-meal {
  border-style: solid;
  border-color: var(--border);
}
.planned-meal {
  background: var(--card);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.planned-meal:hover {
  box-shadow: var(--shadow);
}
.planned-meal-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.planned-meal-img {
  width: 100%;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 4px;
}
.planned-meal-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--terracotta);
  border: none;
  color: white;
  font-size: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.meal-type-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
}
.add-to-plan-prompt {
  font-size: 11px;
  color: var(--sand);
  text-align: center;
  padding: 8px 4px;
  opacity: 0.6;
  line-height: 1.4;
}
.planner-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.planner-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-family: "Karla", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.planner-btn-primary {
  background: var(--terracotta);
  color: white;
}
.planner-btn-primary:hover {
  background: var(--terracotta-dark);
}
.planner-btn-ghost {
  background: var(--card);
  color: var(--bark);
  border: 1px solid var(--border);
}
.planner-btn-ghost:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* MEAL TYPE PICKER */
.meal-type-picker {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.meal-type-btn {
  height: 24px;
  padding: 0 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bark);
  cursor: pointer;
  transition: all 0.2s;
}
.meal-type-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

/* SHOPPING LIST PANEL */
.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(28, 16, 8, 0.65);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.shop-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.shop-modal {
  background: var(--warm);
  border-radius: 20px 20px 0 0;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(28, 16, 8, 0.2);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.shop-overlay.open .shop-modal {
  transform: translateY(0);
}
.shop-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--warm);
  z-index: 10;
}
.shop-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
}
.shop-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.shop-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 17px;
  color: var(--bark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-body {
  padding: 16px 24px 30px;
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
}
.shop-item:last-child {
  border-bottom: none;
}
.shop-check {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.shop-item.done .shop-check {
  background: var(--sage);
  border-color: var(--sage);
  color: white;
}
.shop-item.done .shop-name {
  text-decoration: line-through;
  opacity: 0.45;
}
.shop-amount {
  font-weight: 600;
  color: var(--terracotta);
  min-width: 80px;
}
.shop-name {
  flex: 1;
  color: var(--bark);
}
.shop-empty {
  text-align: center;
  padding: 40px 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  color: var(--sand);
  font-style: italic;
}
.shop-clear-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--bark);
  cursor: pointer;
  transition: all 0.2s;
}
.shop-clear-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}
.shop-print-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: none;
  background: var(--espresso);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: white;
  cursor: pointer;
}
[data-theme="dark"] .shop-print-btn {
  background: var(--gold);
  color: var(--espresso);
}
.shop-count {
  background: var(--terracotta);
  color: white;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAV PANEL */
.fav-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  z-index: 150;
  background: var(--warm);
  box-shadow: -8px 0 40px rgba(28, 16, 8, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
}
.fav-panel.open {
  transform: translateX(0);
}
.fav-panel-header {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fav-panel-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
}
.fav-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font-size: 17px;
  color: var(--bark);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-panel-close:hover {
  background: var(--bg);
}
.fav-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}
.fav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 7px;
  border: 1px solid var(--border);
}
.fav-item:hover {
  background: var(--bg);
}
.fav-item-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.fav-item-emoji {
  font-size: 32px;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-item-info {
  flex: 1;
  min-width: 0;
}
.fav-item-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-item-meta {
  font-size: 12px;
  color: var(--sand);
  margin-top: 2px;
}
.fav-item-note {
  font-size: 11px;
  color: var(--gold);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fav-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--sand);
  font-size: 15px;
  padding: 3px;
  transition: color 0.2s;
}
.fav-remove:hover {
  color: var(--terracotta);
}
.fav-empty {
  text-align: center;
  padding: 50px 16px;
  font-family: "Cormorant Garamond", serif;
  font-size: 17px;
  color: var(--sand);
  font-style: italic;
}
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(28, 16, 8, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.panel-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ADD TO PLAN MODAL */
.pick-day-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(28, 16, 8, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.pick-day-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.pick-day-modal {
  background: var(--warm);
  border-radius: 16px;
  padding: 28px;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(28, 16, 8, 0.3);
}
.pick-day-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 18px;
}
.pick-day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.pick-day-btn {
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-family: "Karla", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--bark);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.pick-day-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.pick-day-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}
.pick-meal-type {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pick-type-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--bark);
  cursor: pointer;
  transition: all 0.2s;
  text-transform: capitalize;
}
.pick-type-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: white;
}
.pick-confirm-btn {
  width: 100%;
  height: 42px;
  background: var(--terracotta);
  border: none;
  border-radius: 10px;
  color: white;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.pick-confirm-btn:hover {
  background: var(--terracotta-dark);
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--espresso);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(28, 16, 8, 0.25);
  z-index: 400;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ATTRIBUTION */
.attribution {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--sand);
  border-top: 1px solid var(--border);
}
.attribution a {
  color: var(--terracotta);
  text-decoration: none;
}

/* COOKING MODE */
.cook-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--espresso);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cook-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.cook-header {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cook-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  color: var(--cream);
  font-style: italic;
}
.cook-exit {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--sand);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 40px;
  cursor: pointer;
  letter-spacing: 0.06em;
}
.cook-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px 28px;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}
.cook-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 36px;
}
.cook-pip {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s;
}
.cook-pip.done {
  background: var(--terracotta);
}
.cook-pip.active {
  background: var(--gold);
}
.cook-step-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.cook-step-text {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 300;
  color: var(--cream);
  line-height: 1.5;
  margin-bottom: 32px;
}
.cook-timer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.cook-timer-display {
  font-family: "Cormorant Garamond", serif;
  font-size: 48px;
  color: var(--gold);
  font-weight: 300;
  min-width: 120px;
}
.cook-timer-btn {
  height: 38px;
  padding: 0 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: none;
  color: var(--sand);
  font-family: "Karla", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-timer-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.cook-nav {
  display: flex;
  gap: 12px;
}
.cook-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: 12px;
  border: none;
  font-family: "Karla", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}
.cook-btn-prev {
  background: rgba(255, 255, 255, 0.08);
  color: var(--sand);
}
.cook-btn-prev:hover {
  background: rgba(255, 255, 255, 0.14);
}
.cook-btn-next {
  background: var(--terracotta);
  color: white;
  flex: 1;
}
.cook-btn-next:hover {
  background: var(--terracotta-dark);
}
.cook-ingr-sidebar {
  margin-bottom: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.cook-ingr-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 10px;
}
.cook-ingr-item {
  font-size: 14px;
  color: rgba(240, 232, 216, 0.7);
  padding: 4px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cook-ingr-amt {
  color: var(--terracotta);
  font-weight: 600;
}

@media (max-width: 768px) {
  header {
    padding: 0 16px;
  }
  .hero {
    padding: 50px 16px 48px;
  }
  .filters-bar,
  .category-bar {
    padding: 0 16px;
  }
  main {
    padding: 28px 16px 48px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .fav-panel {
    width: 100%;
  }
  .modal-body {
    padding: 20px 18px 28px;
  }
  .planner-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hdr-btn span:not(.fav-count) {
    display: none;
  }
}
@media print {
  body * {
    visibility: hidden;
  }
  .shop-modal,
  .shop-modal * {
    visibility: visible;
  }
  .shop-modal {
    position: fixed;
    inset: 0;
    box-shadow: none;
  }
}

/* APP INFO POPUP */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  padding: 20px;
  display: none;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.7);
}

.popup-overlay.active {
  display: flex;
  animation: popupFadeIn 0.3s ease;
}

.popup-content {
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--warm-white) 0%, var(--cream) 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideUp 0.4s ease;
  display: flex;
  flex-direction: column;
}

.popup-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(197, 103, 60, 0.72) rgba(197, 103, 60, 0.12);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.popup-body::-webkit-scrollbar {
  width: 10px;
}

.popup-body::-webkit-scrollbar-track {
  background: rgba(197, 103, 60, 0.08);
  border-radius: 999px;
  margin: 14px 8px;
}

.popup-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--terracotta), var(--gold));
  border: 2px solid var(--warm-white);
  border-radius: 999px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--gold), var(--terracotta));
}

.popup-header {
  padding: 30px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(to right, var(--terracotta), var(--gold));
  color: white;
  text-align: center;
}

.popup-header h2 {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-size: 2.2rem;
}

.popup-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

.popup-section {
  padding: 25px 30px;
  border-bottom: 1px solid var(--border);
}

.popup-section:last-child {
  border-bottom: none;
}

.popup-section h3 {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--espresso);
  font-size: 1.3rem;
}

.popup-section p {
  margin-bottom: 10px;
  color: var(--bark);
  font-size: 0.95rem;
  line-height: 1.6;
}

.popup-section ul {
  margin: 10px 0;
  padding-left: 20px;
  list-style: disc;
}

.popup-section li {
  margin-bottom: 8px;
  color: var(--bark);
  font-size: 0.95rem;
  line-height: 1.5;
  list-style: disc;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tech-tag {
  padding: 8px 16px;
  border-radius: 50px;
  background: linear-gradient(to right, var(--terracotta-dark), var(--terracotta));
  color: white;
  box-shadow: 0 4px 10px rgba(192, 92, 56, 0.2);
  font-size: 0.9rem;
  font-weight: 600;
}

.highlight-box {
  margin-top: 10px;
  padding: 20px;
  border-left: 4px solid var(--terracotta);
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(192, 92, 56, 0.05) 0%,
    rgba(192, 92, 56, 0.1) 100%
  );
}

.close-popup-btn {
  margin: 30px auto;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  display: block;
  background: linear-gradient(to right, var(--gold), var(--terracotta-dark));
  color: white;
  box-shadow: 0 6px 20px rgba(200, 151, 58, 0.3);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.close-popup-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(200, 151, 58, 0.4);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .popup-header h2 {
    font-size: 1.7rem;
  }

  .popup-subtitle {
    font-size: 1rem;
  }

  .popup-section {
    padding: 20px;
  }
}
