@import url('https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  /* Use the web path, not your computer's Desktop path */
  background-image: url('/static/backgrounds/timeline_background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0; 
  font-family: Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}

h1, h2, h3,
.auth-title,
.hero-h1,
.recipe-meal-title,
.lnav-logo,
.how-title,
.try-title,
.footer-logo {
  font-family: 'Gloria Hallelujah', cursive;
}

/* Specific to the Recipes page */
body.recipe-page {
    background-image: url('/static/backgrounds/recipe_sidebars.png');
    background-size: cover;
    background-position: center;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header > div:first-child { flex: 1; }

.btn-secondary {
  background: white;
  color: #2d5a27;
  border: 1.5px solid #2d5a27;
  border-radius: 5px;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover { background: #eef5ec; }

.header-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Recipe list */
.recipe-list { display: flex; flex-direction: column; gap: 0.75rem; }

.recipe-list-item {
  background: #fffdf8;
  border: 2px solid #b5aa95;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.07);
}

.recipe-list-info { display: flex; flex-direction: column; gap: 0.2rem; }

a.recipe-list-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}
a.recipe-list-link:hover strong { text-decoration: underline; }

.recipe-list-meta { font-size: 0.85rem; color: #888; }

/* Recipe book sections */
/* ── Recipe search ───────────────────────────────────────────────────────── */
.recipe-search-wrap {
  margin-bottom: 2rem;
  position: relative;
  margin-top: 2rem;
}

.recipe-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1.5px solid #d0ccc5;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: inherit;
  background: #fff;
  transition: border-color 0.15s;
}

.recipe-search-input:focus {
  outline: none;
  border-color: #2d5a27;
}

.recipe-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  pointer-events: none;
  font-size: 0.95rem;
}

.recipe-search-empty {
  text-align: center;
  color: #888;
  padding: 2rem 0;
  font-size: 0.95rem;
  display: none;
}

.recipe-book-meal-section {
  margin-bottom: 3rem;
}

.recipe-meal-title {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 1.7rem;
  color: #2d5a27;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2d5a27;
}

.recipe-book-subsection {
  margin-bottom: 1.5rem;
  padding-left: 0.5rem;
}

.recipe-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #444;
  margin-bottom: 0.6rem;
}

/* Green primary button (links styled as buttons) */
.btn-primary {
  background: #2d5a27;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}
.btn-primary:hover { background: #3a7233; color: white; }

/* ── Section tabs (filing cabinet style) ───────────────────────────────── */
.section-tabs-wrap {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0;
  flex: 1;
}

.section-tab {
  background: #f0ece4;
  border: 1.5px solid #bbb;
  border-bottom: none;
  border-radius: 7px 7px 0 0;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  color: #555;
  margin-right: 3px;
  position: relative;
  bottom: -2px;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.section-tab.section-tab--active {
  background: white;
  border-color: #2d5a27;
  color: #2d5a27;
  font-weight: 700;
  z-index: 2;
}

.section-tab:hover:not(.section-tab--active) {
  background: #eef5ec;
  color: #2d5a27;
}

.section-tab .tab-close {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  color: #aaa;
  vertical-align: middle;
  cursor: pointer;
  line-height: 1;
}
.section-tab .tab-close:hover { color: #c44; }

.section-add-tab {
  background: none;
  border: 1.5px dashed #bbb;
  border-bottom: none;
  color: #888;
  border-radius: 7px 7px 0 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  bottom: -2px;
  white-space: nowrap;
}
.section-add-tab:hover { border-color: #2d5a27; color: #2d5a27; background: none; }

.section-panels-wrap {
  border: 2px solid #b5aa95;
  border-radius: 0 8px 8px 8px;
  padding: 1.5rem 1.5rem 0.5rem;
  background: rgba(255,255,255,0.55);
  margin-bottom: 2rem;
}

.section-panel { display: none; }
.section-panel.section-panel--active { display: block; }

/* Actions group (fav + share) */
.recipe-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Favorite button */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #bbb;
  padding: 0.1rem 0.3rem;
  transition: color 0.15s;
}
.fav-btn:hover { color: #e05a6a; }
.fav-btn.fav-active { color: #e05a6a; }

/* ── Emoji reactions ─────────────────────────────────────────────────────────── */
.reaction-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.6rem;
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f5f2ee;
  border: 1px solid #e0ddd7;
  border-radius: 99px;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  color: #555;
  transition: background 0.12s, border-color 0.12s;
}
.reaction-btn:hover  { background: #eceae5; border-color: #ccc; }
.reaction-btn.reacted { background: #eef5ec; border-color: #2d5a27; color: #2d5a27; font-weight: 600; }

.reaction-add-wrap { position: relative; display: inline-flex; }
.reaction-add-btn {
  background: none;
  border: 1px dashed #ccc;
  border-radius: 99px;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: #aaa;
  font-family: inherit;
  transition: border-color 0.12s, color 0.12s;
}
.reaction-add-btn:hover { border-color: #2d5a27; color: #2d5a27; }

.reaction-picker-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #e0ddd7;
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  gap: 0.2rem;
  z-index: 20;
  white-space: nowrap;
}
.reaction-picker-popup.open { display: flex; }
.reaction-picker-opt {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 6px;
  transition: background 0.1s;
  line-height: 1;
}
.reaction-picker-opt:hover { background: #f5f2ee; }

/* ── Notification panel (profile page) ────────────────────────────────────── */
.notif-panel {
  background: #fffdf8;
  border: 1.5px solid #f0d9a0;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.notif-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 1rem;
}
.notif-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #f9f7f2;
  border: 1px solid #ece8e0;
}
.notif-item.notif-no_plan      { border-left: 3px solid #f0a500; }
.notif-item.notif-friend_request { border-left: 3px solid #4444aa; }
.notif-item.notif-friend_accepted { border-left: 3px solid #2d5a27; }
.notif-item.notif-friend_removed  { border-left: 3px solid #aaa; }
.notif-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.3; }
.notif-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.notif-text { font-size: 0.95rem; color: #2c2c2c; line-height: 1.4; }
.notif-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.notif-action-btn {
  display: inline-block;
  background: #2d5a27;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.notif-action-btn:hover { background: #234a1f; color: #fff; }
.notif-action-secondary {
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
}
.notif-action-secondary:hover { background: #f5f2ee; color: #333; }
.notif-resolved { font-size: 0.82rem; color: #aaa; font-style: italic; }

/* Auth */
.auth-icons {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  color: #2d5a27;
  opacity: 0.7;
}

.auth-card {
  max-width: 530px;
  width: 90%;
  margin: 4rem auto;
  background: #fffdf8;
  border: 2px solid #b5aa95;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 2px 5px 12px rgba(0,0,0,0.10);
}

.auth-title {
  font-family: 'Gloria Hallelujah', cursive;
  font-size: 2.5rem;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  color: #777;
  margin-bottom: 1.5rem;
  font-style: italic;
  font-size: 0.95rem;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-card input, 
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
}

.auth-card button:not(.show-password-btn) {
  width: 100%;
  padding: 0.65rem;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #666;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-links a { color: #2d5a27; }

.password-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.password-wrapper input {
  display: block;
  width: 100%;
  padding-right: 3.5rem;
}

.show-password-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 0.72rem;
  padding: 0.2rem 0.3rem;
  cursor: pointer;
  white-space: nowrap;
}

.show-password-btn:hover { color: #2d5a27; background: none; }

.forgot-link {
  font-size: 0.85rem;
  color: #2d5a27;
  text-align: right;
  margin-top: -0.5rem;
}

.remember-label {
  display: flex;
  align-items: left;
  gap: 2.5 rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 0;
  cursor: pointer;
}

.remember-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #2d5a27;
  cursor: pointer;
  flex-shrink: 0;
  align-items: left
}

/* Made-by badge */
.made-by-badge {
  display: inline-block;
  background: #f0eaf8;
  color: #5a3d7a;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 99px;
  border: 1px solid #d4bfec;
}

/* Share panel */
.share-panel {
  background: #f7f5f1;
  border: 1px solid #e0ddd7;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: -0.75rem;
  padding: 0.85rem 1.25rem;
}

.share-panel-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.share-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: bold;
  color: #444;
}

.share-email-input {
  width: 240px;
}

.share-status {
  font-size: 0.85rem;
  color: #888;
}

.share-status.share-ok    { color: #2d5a27; }
.share-status.share-error { color: #b94a48; }
.hint.share-ok    { color: #2d5a27; }
.hint.share-error { color: #b94a48; }

/* Recipe view page */
.recipe-view-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}
.recipe-view-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  padding: 0 0.5rem 0.5rem 0;
  border-bottom: 1px solid #e8e5df;
}
.recipe-view-table td {
  padding: 0.45rem 0.5rem 0.45rem 0;
  border-bottom: 1px solid #f0ede8;
  color: #2c2c2c;
}
.recipe-view-table tr:last-child td { border-bottom: none; }
.ing-optional-row td { color: #888; }

.recipe-directions-list {
  padding-left: 1.4rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: #2c2c2c;
  line-height: 1.55;
}

.nutrition-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.nutrition-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f7f5f1;
  border: 1px solid #e8e5df;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  min-width: 60px;
}
.nutrition-value {
  font-weight: 700;
  font-size: 1rem;
  color: #1a1a1a;
}
.nutrition-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

/* Preferences */
.pref-group {
  margin-top: 1.25rem;
}

.pref-group-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 0;
}

.preferences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.pref-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  font-size: 0.95rem;
  cursor: pointer;
}

.user-email {
  font-size: 0.88rem;
  color: #666;
  align-self: center;
}

.required { color: #b94a48; }

/* ── Sale items row ──────────────────────────────────────────────────────── */
.sale-row {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sale-label {
  font-size: 0.9rem;
  font-weight: bold;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sale-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  max-width: 500px;
}

/* ── Sale suggestions in meal cards ─────────────────────────────────────── */
.sale-suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fffbe6;
  border: 1px solid #e8d96a;
  border-radius: 6px;
  font-size: 0.85rem;
}

.sale-badge {
  background: #e8d96a;
  color: #5a4a00;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.swap-hint { color: #5a4a00; }

/* ── Sale swap note in grocery list ─────────────────────────────────────── */
.sale-swap-note {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  color: #7a6200;
  background: #fffbe6;
  border: 1px solid #e8d96a;
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  white-space: nowrap;
}

/* ── Add Recipe form ─────────────────────────────────────────────────────── */
.form-card + .form-card { margin-top: 1.25rem; }

.form-row.wrap { flex-wrap: wrap; }

/* Ingredient table header + rows share the same column grid */
.ingredient-header,
.ingredient-row {
  display: grid;
  grid-template-columns: 2fr 80px 90px 70px 2fr 28px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0ede8;
}

.ingredient-row:last-child { border-bottom: none; }

.ingredient-header {
  font-size: 0.78rem;
  font-weight: bold;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.ingredient-header span,
.ingredient-row input { width: 100%; }

.center { display: flex; justify-content: center; }

.remove-row {
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
  flex-shrink: 0;
}

.remove-row:hover { color: #b94a48; background: none; }

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 2rem;
  /* color: #2d5a27; */
  color: #2B1608;
  margin-bottom: 0.15rem;
}

.subtitle {
  color: #777;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Form */
.form-card {
  background: #fffdf8;
  border: 2px solid #b5aa95;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 2px 5px 12px rgba(0,0,0,0.08);
}

.form-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #444;
}

.optional-label {
  font-weight: normal;
  color: #999;
  font-size: 0.8rem;
}

input[type="number"],
input[type="email"],
input[type="text"],
input[type="password"],
textarea {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  color: inherit;
}

input[type="number"] { width: 100px; }
input[type="email"]  { width: 220px; }

textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.6;
}

.input-narrow { width: 80px; }
.label-grow { flex: 1; min-width: 180px; }

button {
  background: #2d5a27;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.6rem 1.4rem;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

button:hover { background: #3a7233; }

.hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #888;
}

.email-confirm {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: #2d5a27;
}

.email-confirm.error { color: #b94a48; }

/* Results */
.hidden { display: none !important; }

.results-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

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

h2 {
  font-size: 1.3rem;
  color: #2d5a27;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0ddd7;
  padding-bottom: 0.4rem;
}

/* Meal cards */
.meal-card {
  background: #fffdf8;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 2px 5px 12px rgba(0,0,0,0.08);
}

.meal-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tag {
  background: #eef5ec;
  color: #2d5a27;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-family: inherit;
}

.nutrition ul {
  list-style: none;
  font-size: 0.9rem;
  color: #444;
  margin: 0.4rem 0 0.6rem 0;
}

.nutrition ul li { padding: 0.1rem 0; }

.nutrition-note {
  font-size: 0.82rem;
  color: #666;
  font-style: italic;
  margin-top: 0.3rem;
}

details { margin-top: 0.75rem; }
summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: #2d5a27;
  font-weight: bold;
}

details ol {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  font-size: 0.88rem;
  color: #444;
}

details li { margin-bottom: 0.3rem; }

/* Grocery list */
#grocery-list {
  list-style: none;
  background: #fffdf8;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  box-shadow: 2px 5px 12px rgba(0,0,0,0.08);
}

#grocery-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0ede8;
  font-size: 0.9rem;
}

#grocery-list li:last-child { border-bottom: none; }

.optional-header {
  font-size: 0.75rem !important;
  font-weight: bold;
  color: #999 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: none !important;
  margin-top: 0.5rem;
  display: block !important;
}

.optional { color: #888; font-style: italic; }

/* ── Planner board ───────────────────────────────────────────────────────── */
.planner-main { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.planner-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.week-nav-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 120px;
  text-align: center;
}

.week-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid #e0ddd7;
  background: white;
  color: #2d5a27;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s;
}
.week-nav-btn:hover { background: #f5f3ef; }

.optimize-row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0ddd7;
}

#optimize-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Health summary bar */
.health-summary {
  background: #fffdf8;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.07);
}

.health-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.health-summary-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.health-summary-score {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.health-summary-prefs {
  font-size: 0.78rem;
  color: #888;
  text-transform: capitalize;
}

.health-day-row {
  display: flex;
  gap: 0.4rem;
}

.health-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.health-day-label {
  font-size: 0.65rem;
  color: #888;
}

.health-day::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e0ddd7;
}

.health-day-on::before  { background: #2d5a27; }
.health-day-off::before { background: #e05a6a; }
.health-day-empty::before { background: #e0ddd7; }

.nutr-grid {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.nutr-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.nutr-val {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
}

.nutr-label {
  font-size: 0.7rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nutr-warn .nutr-val  { color: #c0392b; }
.nutr-warn .nutr-label { color: #c0392b; }

.nutr-note {
  font-size: 0.72rem;
  color: #aaa;
  margin: 0 0 0.5rem;
}

.planner-page-header h1 {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}

.planner-scroll { overflow-x: auto; }

.planner-grid {
  display: grid;
  grid-template-columns: 90px repeat(7, minmax(120px, 1fr));
  gap: 6px;
  min-width: 700px;
}

.planner-cell { min-height: 36px; }

.planner-snack-cell { grid-column: span 7; }

.planner-corner {}

.planner-day-header {
  background: #2d5a27;
  color: white;
  text-align: center;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 0.4rem;
  border-radius: 5px;
}

.planner-meal-label {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: bold;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-right: 0.5rem;
}

.planner-slot-cell {
  background: #f4f1ec;
  border-radius: 6px;
  height: 100px;
  overflow: hidden;
}

.slot-list {
  list-style: none;
  padding: 4px;
  height: 100%;
  overflow-y: auto;
}

.planner-card {
  background: #fffdf8;
  border: 2px solid #b5aa95;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  cursor: grab;
  height: 100px;
  box-sizing: border-box;
  user-select: none;
  position: relative;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.08);
}

.card-remove-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
}
.card-remove-btn:hover { color: #c0392b; }

.planner-card:active { cursor: grabbing; }

.planner-card[data-recipe-id="eating-out"] {
  background: #e8e8e8;
  border-color: #ccc;
  color: #888;
}

.planner-card-name {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  color: #2c2c2c;
  margin-bottom: 0.2rem;
}

.card-people {
  display: inline-block;
  font-size: 0.75rem;
  color: white;
  background: #2d5a27;
  border-radius: 99px;
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.35rem;
}

.planner-card-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.planner-card-tags .tag { font-size: 0.65rem; padding: 0.1rem 0.4rem; }

/* Card detail modal */
.modal-body { padding: 1.25rem; flex: 1; overflow-y: auto; }
.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e0ddd7;
  display: flex;
  justify-content: flex-end;
}

.card-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.dots-menu { position: relative; }

.dots-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #aaa;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.05em;
}

.dots-btn:hover { color: #555; background: #f0ede8; }

.dots-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: #fffdf8;
  border: 1px solid #e8e4dc;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.dots-option {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: #2c2c2c;
  cursor: pointer;
  border-radius: 0;
}

.dots-option:hover { background: #f5f3ef; color: #2c2c2c; }

/* ── Add meal choice modal ───────────────────────────────────────────────── */
.choice-options {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-radius: 8px;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
}

.choice-btn-secondary {
  background: white;
  color: #2d5a27;
  border: 1.5px solid #2d5a27;
}

.choice-btn-secondary:hover { background: #eef5ec; }

.choice-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 1.75rem;
  text-align: center;
}

.choice-btn strong {
  display: block;
  font-size: 0.92rem;
}

.choice-desc {
  display: block;
  font-size: 0.78rem;
  font-weight: normal;
  margin-top: 0.1rem;
  opacity: 0.75;
}

/* Inline checkbox labels */
.inline-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: normal;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
}

.empty-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  color: #bbb;
  font-size: 0.8rem;
  border: 1.5px dashed #ddd;
  border-radius: 5px;
  cursor: default;
  user-select: none;
}

/* Highlight drop target while dragging */
.slot-list.sortable-drag-over { background: #eef5ec; border-radius: 5px; }

/* ── Snack cards ─────────────────────────────────────────────────────────── */
.snack-card {
  background: #f0f0f0;
  border-color: #ccc;
  cursor: pointer;
}

.snack-card-items {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #555;
  line-height: 1.4;
}

/* ── Snack picker modal ──────────────────────────────────────────────────── */
.snack-picker-modal { max-width: 560px; }

.snack-picker-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.snack-category { margin-bottom: 0.25rem; }

.snack-category-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 0.5rem;
}

.snack-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.snack-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f4f1ec;
  border: 1.5px solid #e0ddd7;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}

.snack-item-btn:hover { background: #eae7e0; }

.snack-item-btn.selected {
  background: #2d5a27;
  border-color: #2d5a27;
  color: white;
}

.snack-item-btn.selected .snack-item-unit { color: rgba(255,255,255,0.75); }

.snack-item-unit {
  font-size: 0.7rem;
  font-weight: normal;
  color: #999;
  margin-top: 0.1rem;
}

.snack-add-custom { border-top: 1px solid #eee; padding-top: 1rem; }
.snack-add-custom h4 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; color: #444; }

.snack-custom-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.snack-custom-row input { flex: 1; min-width: 120px; }

/* ── Snack library (my_recipes) ─────────────────────────────────────────── */
.snack-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.snack-lib-category { display: flex; flex-direction: column; }

.snack-lib-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.snack-lib-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f4f1ec;
  border: 1px solid #e0ddd7;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  font-size: 0.82rem;
  color: #444;
}

.snack-lib-chip-custom { background: #eef5ec; border-color: #c3dbc0; }

.snack-lib-unit { font-size: 0.72rem; color: #999; }

.snack-lib-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 0.65rem;
  padding: 0;
  line-height: 1;
  margin-left: 0.1rem;
}
.snack-lib-delete:hover { color: #c0392b; background: none; }

/* ── Show more button ────────────────────────────────────────────────────── */
.show-more-btn {
  background: none;
  border: 1px solid #ccc;
  border-radius: 5px;
  color: #555;
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  margin-top: 0.5rem;
  width: 100%;
}
.show-more-btn:hover { background: #f4f1ec; border-color: #aaa; }

/* ── Recipe picker modal ─────────────────────────────────────────────────── */
.picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.picker-modal {
  background: #fffdf8;
  border-radius: 10px;
  width: 420px;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e0ddd7;
}

.picker-header h3 { font-size: 1rem; color: #2d5a27; margin: 0; }

.picker-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: #aaa;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.picker-close:hover { color: #555; }

.picker-list {
  list-style: none;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.picker-item {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid #f0ede8;
}

.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: #f5f3ef; }

.picker-item-name {
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.picker-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.picker-more-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2d5a27;
  cursor: pointer;
  border-top: 1px solid #f0ede8;
  list-style: none;
}
.picker-more-btn:hover { background: #f5f3ef; }

.saved-popup {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #2d5a27;
  color: white;
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.saved-popup-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.saved-popup-close:hover { color: white; }

.pick-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #2d5a27;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.pick-banner-cancel {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
}
.pick-banner-cancel:hover { color: white; }

.pick-add-btn {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
}

.picker-match {
  font-size: 0.72rem;
  background: #eef5ec;
  color: #2d5a27;
  border: 1px solid #2d5a27;
  border-radius: 99px;
  padding: 0.1rem 0.5rem;
}

/* ── Email card ──────────────────────────────────────────────────────────── */
.email-card {
  background: #fffdf8;
  border: 1px solid #e8e4dc;
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 2rem;
  box-shadow: 2px 5px 12px rgba(0,0,0,0.08);
}

/* ── Landing page ────────────────────────────────────────────────────────── */

.lnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #e8dfc8;
  border-bottom: 2px solid #b5aa95;
  /* font-family: 'Nunito', sans-serif; */
  padding: 0 2rem;
}

.lnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  font-family: inherit;
  justify-content: space-between;
  height: 62px;
}

.lnav-logo {
  font-family: inherit;
  color: #2d5a27;
  text-decoration: none;
  /* font-weight: 700; */
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.lnav-logo .logo-icon {
  font-size: 1.3rem;
  line-height: 1;
}

.lnav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.lnav-link {
  text-decoration: none;
  color: #555;
  font-family: inherit;
  font-size: 0.9rem;
}

.lnav-link:hover { color: #2d5a27; }

/* ── Notification bell ──────────────────────────────────────────────────── */
.lnav-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #555;
  font-size: 1.1rem;
  line-height: 1;
}
.lnav-bell:hover { color: #2d5a27; }
.notif-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: #c44;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  /* font-family: 'Nunito', sans-serif; */
  pointer-events: none;
}

.lnav-welcome {
  font-size: 0.85rem;
  color: #888;
  font-family: inherit;
  pointer-events: none;
}

.lnav-btn {
  background: #2d5a27;
  color: white;
  border-radius: 5px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
}

.lnav-btn:hover { background: #3a7233; }

/* ── Nav mobile toggle ──────────────────────────────────────────────────── */
.lnav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  color: #555;
  transition: background 0.15s;
  flex-direction: column;
  align-items: center;
  gap: 3.5px;
}
.lnav-toggle:hover { background: #f5f2ee; }
.lnav-toggle-dot {
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  display: block;
}

.save-status-nav {
  font-size: 0.82rem;
  color: #aaa;
  font-family: inherit;
  min-width: 4rem;
  text-align: right;
}

.save-status-nav.saved  { color: #2d5a27; }
.save-status-nav.save-err { color: #b94a48; }

/* ── Weekly defaults table ─────────────────────────────────────────────────── */
.defaults-table { border-collapse: collapse; width: 100%; font-size: 0.85rem; }
.defaults-table th {
  padding: 0.35rem 0.25rem; font-weight: 600; color: #888; font-size: 0.8rem;
  text-align: center; min-width: 72px;
}
.defaults-table td { padding: 0.3rem 0.2rem; }
@media (max-width: 600px) {
  .defaults-table th, .defaults-table td { min-width: 54px; }
}

.planner-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.manual-save-btn {
  padding: 0.4rem 1rem;
  background: #2d5a27;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.manual-save-btn:hover:not(:disabled) { background: #3d7a35; }
.manual-save-btn:disabled { opacity: 0.65; cursor: default; }

/* Hero */
.hero {
  background: #f6f1e8;
  padding: 5rem 2rem 6rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4.5rem;
  align-items: center;
}

.hero-eyebrow {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2d5a27;
  margin-bottom: 1rem;
}

.hero-h1 {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 3.75rem;
  color: #1a1a1a;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-family: inherit;
  font-size: 1.05rem;
  color: #555;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero-btn-primary {
  background: #2d5a27;
  color: white;
  padding: 0.8rem 1.75rem;
  border-radius: 7px;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
}

.hero-btn-primary:hover { background: #3a7233; }

.hero-btn-secondary {
  background: white;
  color: #2d5a27;
  border: 1.5px solid #2d5a27;
  padding: 0.8rem 1.75rem;
  border-radius: 7px;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
}

.hero-btn-secondary:hover { background: #eef5ec; }

.hero-note {
  font-family: inherit;
  font-size: 0.8rem;
  color: #aaa;
}

.hero-photo-wrap {
  position: relative;
  padding-bottom: 24px;
}

.hero-photo {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
  display: block;
  object-fit: cover;
}

.hero-plan-card {
  position: absolute;
  bottom: 0;
  left: -28px;
  background: #fffdf8;
  border-radius: 14px;
  box-shadow: 0 8px 36px rgba(0,0,0,0.14);
  padding: 1rem 1.25rem;
  min-width: 210px;
}

.hero-plan-title {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  color: #2d5a27;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
}

.hero-plan-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.28rem 0.45rem;
  border-radius: 5px;
  margin-bottom: 0.1rem;
}

.hpr-active { background: #eef5ec; }

.hpr-day {
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
  min-width: 26px;
}

.hpr-active .hpr-day { color: #2d5a27; }

.hpr-meal {
  font-family: inherit;
  font-size: 0.8rem;
  color: #333;
}

.hpr-active .hpr-meal { color: #2d5a27; font-weight: 600; }

/* Features */
.features-section {
  background: white;
  padding: 5.5rem 2rem;
}

.features-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  background: #f6f1e8;
  border-radius: 14px;
  padding: 2rem 1.75rem;
  border: 1px solid #e8e4dc;
}

.feature-icon { font-size: 2rem; margin-bottom: 0.9rem; }

.feature-card h3 {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-family: inherit;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
}

/* How it works */
.how-section {
  background: #f6f1e8;
  padding: 5.5rem 2rem;
}

.how-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.how-title {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 2.25rem;
  color: #1a1a1a;
  margin-bottom: 3.5rem;
  border: none;
  padding: 0;
}

.how-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.how-step { flex: 1; padding: 0 1rem; }

.how-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #2d5a27;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.how-step h4 {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.how-step p {
  font-family: inherit;
  font-size: 0.88rem;
  color: #666;
  line-height: 1.7;
}

.how-connector {
  flex: 0 0 48px;
  height: 2px;
  background: #e0ddd7;
  margin-top: 23px;
}

/* Try it now */
.try-section {
  background: #2d5a27;
  padding: 5.5rem 2rem;
}

.try-inner {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.try-title {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 2.25rem;
  color: white;
  margin-bottom: 0.6rem;
  border: none;
  padding: 0;
}

.try-sub {
  font-family: inherit;
  color: #a8cfa1;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.try-form { margin-bottom: 0; text-align: left; }

/* Footer */
.landing-footer {
  background: #111;
  padding: 1.75rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  /* font-family: 'Nunito', sans-serif; */
  color: #666;
  font-size: 1rem;
}

.footer-links { display: flex; gap: 1.75rem; }

.footer-links a {
  color: #777;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.85rem;
}

.footer-links a:hover { color: #bbb; }

/* Responsive */
@media (max-width: 820px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-h1 { font-size: 2.6rem; }

  .hero-plan-card { left: 0; }

  .features-inner { grid-template-columns: 1fr; }

  .how-steps { flex-direction: column; align-items: center; gap: 1.5rem; }

  .how-connector { width: 2px; height: 32px; flex: 0 0 32px; margin: 0 auto; }
}

/* ── Mobile (≤ 640px) ────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Tighten page chrome */
  main { padding: 1.25rem 1rem; }
  .planner-main { padding: 1.25rem 1rem; }

  h1 { font-size: 1.6rem; }

  .form-card { padding: 1rem; }

  /* Email inputs: let them fill the container */
  input[type="email"] { width: 100%; }

  /* Auth card: less vertical whitespace */
  .auth-card { margin: 1.5rem auto; padding: 1.25rem; }

  /* Page headers: stack title + actions vertically */
  .page-header { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; flex-wrap: wrap; }

  /* Recipe list items: stack name/actions */
  .recipe-list-item { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .recipe-card-actions { width: 100%; justify-content: flex-end; }

  /* Ingredient table: hide fixed header, reflow rows as wrapped flex */
  .ingredient-header { display: none; }
  .ingredient-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    padding: 0.75rem 0;
  }
  .ingredient-row .col-item   { width: 100%; }
  .ingredient-row .col-amount { width: 70px; }
  .ingredient-row .col-unit   { width: 80px; }
  .ingredient-row .col-optional { flex: 0; }
  .ingredient-row .col-swaps  { flex: 1; min-width: 120px; }
  .ingredient-row .col-remove { margin-left: auto; }

  /* Share email input: full width */
  .share-email-input { width: 100%; }

  /* Nav: show toggle, collapse links into dropdown */
  .lnav { padding: 0 1rem; }
  .lnav-toggle { display: flex; }
  .lnav-links {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: #fffdf8;
    border-bottom: 1px solid #e8e4dc;
    box-shadow: 0 6px 20px rgba(0,0,0,0.09);
    flex-direction: column;
    padding: 0.25rem 0 0.75rem;
    gap: 0;
    z-index: 49;
  }
  .lnav-links.is-open { display: flex; }
  .lnav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #f5f2ee;
    color: #333;
  }
  .lnav-link:last-of-type { border-bottom: none; }
  .lnav-bell {
    display: block;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f5f2ee;
    font-size: 1rem;
  }
  .lnav-welcome {
    display: block;
    padding: 0.75rem 1.25rem 0.4rem;
    font-size: 0.8rem;
    color: #aaa;
    border-bottom: 1px solid #f5f2ee;
  }
  .lnav-btn {
    margin: 0.75rem 1.25rem 0;
    display: block;
    text-align: center;
  }
  .save-status-nav { padding: 0 1.25rem 0.25rem; }

  /* Landing hero: tighter spacing */
  .hero { padding: 3rem 1rem 4rem; }
  .hero-h1 { font-size: 2rem; }

  /* Features / how-it-works sections */
  .features-section { padding: 3rem 1rem; }
  .how-section { padding: 3rem 1rem; }
  .try-section { padding: 3rem 1rem; }
}

/* ── Import option cards (Add Recipe page) ─────────────────────────────────── */
.import-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.import-option-card {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border: 1.5px solid #d6d1c9;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.import-option-card:not(.import-option-passive):hover {
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(45,90,39,0.08);
}

.import-option-passive {
  cursor: default;
  background: #faf9f7;
  color: #888;
}

.import-option-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.import-option-card strong {
  display: block;
  font-size: 0.95rem;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
}

.import-option-passive strong { color: #888; }

.import-option-card p {
  margin: 0;
  font-size: 0.82rem;
  color: #777;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .import-options { flex-direction: column; }
}

/* ── Parse banner (import page) ────────────────────────────────────────────── */
.parse-banner {
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.parse-banner.success { background: #eef5ec; color: #2d5a27; border: 1px solid #c8e0c4; }
.parse-banner.warning { background: #fdf6ec; color: #7a5500; border: 1px solid #f0d9a0; }

/* ── Notebook / scrapbook decorative elements ─────────────────────────────── */
.note {
  /* font-family: 'Nunito', sans-serif; */
  font-size: 1rem;
  color: #555;
  line-height: 1.5;
}

.tape {
  width: 50px;
  height: 18px;
  background: rgba(255,255,200,0.65);
  position: absolute;
  top: -8px;
  left: 20px;
  transform: rotate(-5deg);
  pointer-events: none;
}

.clip {
  width: 16px;
  height: 32px;
  border: 3px solid #aaa;
  border-radius: 10px;
  position: absolute;
  top: -16px;
  right: 12px;
  transform: rotate(18deg);
  pointer-events: none;
}

/* ── Photo Carousel ──────────────────────────────────────────────────────────── */
.carousel {
  position: relative;
  margin-bottom: 1.25rem;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e8e5df;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.carousel-track {
  display: flex;
  transition: transform 0.28s ease;
  will-change: transform;
}
.carousel-slide {
  min-width: 100%;
  position: relative;
  flex-shrink: 0;
}
.carousel-slide img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 10px;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.42);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s;
}
.carousel-dot.active { background: #fff; }
.carousel-count {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.42);
  color: #fff;
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.73rem;
  z-index: 2;
  pointer-events: none;
}
.carousel-add-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.52);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 38px;
  display: flex;
  align-items: center;
  z-index: 2;
  transition: background 0.15s;
}
.carousel-add-btn:hover { background: rgba(0,0,0,0.75); }
.carousel-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.48);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.15s;
}
.carousel-delete-btn:hover { background: rgba(180,30,30,0.85); }
/* Compact carousel variant used in recipe cards */
.carousel-card .carousel-slide img {
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}
.carousel-card .carousel-btn {
  width: 28px;
  height: 28px;
  font-size: 0.95rem;
}
.carousel-card .carousel-dots { bottom: 6px; }
.carousel-card .carousel-dot { width: 6px; height: 6px; }
