:root {
    /* Brand — emerald family */
    --brand-primary:       #50C878;  /* Emerald */
    --brand-primary-hover: #3BA866;  /* Darker emerald for hover/active */
    --brand-primary-dark:  #2E8B57;  /* Even darker, for headings/focus rings */
    --brand-primary-soft:  #90EE90;  /* Light green — chip bg, subtle fills */
    --brand-accent:        #00FF7F;  /* Spring green — badges, success flashes */

    /* Surfaces & ink */
    --surface:        #FFFFFF;
    --surface-muted:  #FAF8F4;       /* Warm cream */
    --surface-ink:    #F5F2ED;       /* Warm parchment */
    --ink:            #0F1B14;       /* Near-black, emerald undertone */
    --ink-muted:      #5B6B64;
    --border:         #E3ECE7;
    --focus-ring:     rgba(80, 200, 120, 0.25);

    /* Legacy aliases — keep existing rules working */
    --accent-color:         var(--brand-primary);
    --accent-color-hover:   var(--brand-primary-hover);
    --secondary-color:       white;
    --secondary-color-hover: rgba(255, 255, 255, 0.85);
    --text-color:   var(--ink);
    --bg-color:     var(--brand-primary-dark);

    /* Nav */
    --nav-bg:   rgba(255, 255, 255, 0.82);
    --nav-blur: 14px;

    /* Radius & spacing scale */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(15, 27, 20, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 27, 20, 0.08);
    --shadow-lg: 0 10px 32px rgba(15, 27, 20, 0.12);

    /* Typography */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Type scale */
    --fs-xs:   0.78rem;
    --fs-sm:   0.875rem;
    --fs-base: 1rem;
    --fs-lg:   1.1rem;
    --fs-xl:   1.25rem;
    --fs-2xl:  1.6rem;
    --fs-3xl:  2rem;
    --fs-4xl:  2.6rem;
    --fs-5xl:  3.6rem;
    --fs-hero: 48px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* Semantic */
    --danger:  #dc3545;
    --warning: #f59e0b;
    --success: var(--brand-primary);

    /* Emerald shadow — used on FABs and primary hover glow */
    --shadow-emerald: 0 6px 18px rgba(80, 200, 120, 0.35);
}


body {
  background: var(--surface-muted);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.dark-mode {
  --brand-primary:       #50C878;
  --brand-primary-hover: #6DDA92;
  --brand-primary-dark:  #1F5E3A;
  --surface:       #14181A;
  --surface-muted: #0F1315;
  --surface-ink:   #1B2023;
  --ink:           #E9F2EC;
  --ink-muted:     #8FA79A;
  --border:        #263038;
  --nav-bg:        rgba(20, 24, 26, 0.82);
  background: var(--surface-muted);
}


.navbar-header {
    background: var(--surface-muted);
    position: sticky;
    top: 0;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
}

.navbar-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.browse-search-elements {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Browse filter panel (bottom sheet on mobile, dropdown on desktop) ── */
.browse-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1050;
}

.browse-filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
    z-index: 1051;
    padding: 0 1.25rem 2rem;
    transform: translateY(100%);
    transition: transform 0.25s ease;
}

.browse-filter-panel--open {
    transform: translateY(0);
}

.browse-filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}

.browse-filter-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
}

.browse-filter-panel-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 0 4px;
}

.browse-filter-panel-close:hover {
    color: var(--ink);
}

.browse-filter-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.browse-filter-search-row .form-control {
    flex: 1;
}

@media (min-width: 768px) {
    .browse-filter-panel {
        position: fixed;
        top: auto;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        width: 520px;
        max-height: 70vh;
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-lg);
        top: 120px;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .browse-filter-panel--open {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    .browse-filter-overlay {
        background: rgba(0,0,0,0.15);
    }
}

.card-body {
    display: flex;
    flex-wrap: wrap;
    align-content: space-between;
    min-height: 120px;
}

/* ── Recipe tag chips (edit form + browse filter bar) ─────────────────── */
.recipe-tag-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.recipe-tag-chip:hover {
    border-color: var(--accent-color);
    background: #f0fdf4;
}

.recipe-tag-chip.selected {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

/* ── Recipe tag display badges (recipe detail page) ──────────────────── */
.recipe-tag-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 500;
}

/* ── Scan review panel ────────────────────────────────────────────────── */
#scan-review-panel {
    margin-bottom: 8px;
}

/* Tab bar: hidden on desktop, shown on mobile */
.scan-review-tabs {
    display: none;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0;
}

.scan-tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.scan-tab.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

/* Image container: desktop layout */
.scan-image-container {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.scan-review-img {
    max-height: 160px;
    max-width: 180px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.scan-dismiss-btn {
    margin-top: auto;
    white-space: nowrap;
}

/* Mobile overrides */
@media (max-width: 767px) {
    .scan-review-tabs {
        display: flex;
    }

    /* Image container hidden by default on mobile (Edit tab is active) */
    .scan-image-container {
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 16px;
        margin-bottom: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Photo tab active: show image, hide form */
    #scan-review-panel.photo-mode .scan-image-container {
        display: flex;
    }

    #scan-review-panel.photo-mode ~ #edit-recipe-form-body {
        display: none !important;
    }

    .scan-review-img {
        max-height: 60vh;
        max-width: 100%;
    }

    .scan-dismiss-btn {
        margin-top: 12px;
    }
}

/* ── Browse infinite scroll sentinel ─────────────────────────────────── */
.browse-sentinel {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index:99;
    display: flex;
    background: #808080;
    opacity: 90%;
    display: flex;
    justify-content: center;
}

.recipe-header {
    background: #b6b8c9;
}

.progress-bar-container {
    display: flex;
    justify-content: center;
    width: 30%;
    height: 100%;
    align-items: center;
    z-index: 100;
}

.label-container {
    display: flex;
    align-items: center;
}

.recipe-view-content-container {
    padding: 5%;
}

/*
    MOBILE NAVBAR
*/

.mobile-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;

  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--nav-blur));
  border-radius: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);

  z-index: 1000;
}

/* Nav items */
.mobile-nav .nav-item {
  color: var(--text-color);
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-item > i.active {
  color: var(--accent-color); /* your highlight color */
  transform: scale(1.2);
  transition: all 0.2s ease;
}

/* Central floating button */
.nav-add-btn {
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(80, 200, 120, 0.35);
  margin-top: -1.5rem; /* lift it above the bar */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-add-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 24px rgba(0, 255, 127, 0.45);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

/*
    DESKTOP NAVBAR
*/

.desktop-nav {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  height: 60px;

  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(var(--nav-blur));
  border-radius: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

  z-index: 1000;
}

/* Branding */
.desktop-nav .brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent-color);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.desktop-nav .brand:hover {
    color: var(--accent-color-hover);
}

/* Nav links */
.desktop-nav .nav-links {
  list-style: none;
}

.desktop-nav .nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav .nav-link:hover {
  color: var(--accent-color-hover);
  transform: translateY(-2px);
}

/* Desktop nav active link */
.desktop-nav .nav-link.active {
  color: var(--accent-color);
  transition: all 0.2s ease;
}

/* Mobile nav active icon (from before) */
.mobile-nav .nav-item i.active {
  color: var(--accent-color);
  transform: scale(1.2);
  transition: all 0.2s ease;
}



/* Hide on mobile, show on tablet+ */
@media (max-width: 767px) {
  .desktop-nav {
    display: none !important;
  }
}

/* AUTH OVERLAY */



.auth-overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.auth-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}

@media (max-width: 767px) {
  .auth-card {
    width: 90%;
  }
}

.auth-card h2 {
	text-align: center;
	margin-bottom: 1.5rem;
	font-weight: 600;
}

.form-control {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-accent {
	background-color: var(--accent-color);
	border: none;
	border-radius: 12px;
	color: white;
	font-weight: 600;
	padding: 0.8rem;
	width: 100%;
	transition: background 0.2s ease;
}

.btn-accent:hover {
	background-color: var(--accent-color-hover);
}

.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color-hover);
}

.btn-primary:hover {
  background-color: var(--accent-color-hover);
  border-color: var(--bg-color);
}

.oauth-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-top: 1rem;
}

.oauth-btn {
    border-radius: var(--radius-md);
    padding: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border: 1px solid var(--border);
    background-color: var(--surface);
    transition: background-color 0.15s ease;
}

.oauth-btn img {
    width: 18px;
    height: 18px;
}

.oauth-btn:hover {
    background-color: var(--surface-muted);
}

.switch-text {
	text-align: center;
	margin-top: 1.2rem;
}

.switch-text a {
	color: var(--accent-color);
	font-weight: 600;
	text-decoration: none;
}

@media (max-width: 767px) {
  #user-recipe-grid {
    padding: 0 0 90px 0;
  }

  #recipe-page-view {
    padding: 0 0 90px 0;
  }

  #edit-recipe-view {
    padding: 0 0 90px 0;
  }

  #meal-plan-view {
    padding-bottom: 90px;
  }
}

@media (max-width: 767px) {
  #filter-recipes-grid {
    padding: 0 0 90px 0;
  }
}

@media (min-width: 768px){
  #browse-recipes-view {
    padding-top: 90px;
  }

  #user-page-view {
    padding-top: 90px;
  }

  #recipe-page-view {
    padding-top: 90px;
  }

  #edit-recipe-view {
    padding-top: 90px;
  }

  #admin-dashboard-view {
    padding-top: 90px;
  }
}

#login-button,
#signup-button {
  margin-top: 15px;
}

#recipe-nav {
  padding: 10px;
}

.show>.btn-primary.dropdown-toggle {
  background-color: var(--accent-color);
  border-color: var(--accent-color-hover);
}

.btn-primary:focus {
  background-color: var(--accent-color);
  border-color: var(--accent-color-hover);
}

.card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #f3f3f3;
  background-image: url('https://placehold.co/300x300?text=No+Image+Available');
  background-position: center;
  background-repeat: no-repeat;
}

#home-page-grid,
#filter-recipes-grid,
#user-recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 16px;
  justify-items: center;
}

#recipe-page-view {
    max-width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

@media (min-width: 768px){
  #browse-recipes-view {
    padding-top: 90px;
  }

  #user-page-view {
    padding-top: 90px;
  }

  #recipe-page-view {
    padding-top: 90px;
  }
}

@media (max-width: 767px) {
  #user-recipe-grid {
    padding: 0 0 90px 0;
  }

  #recipe-page-view {
    padding: 0 0 90px 0;
  }

  #edit-recipe-view {
    padding: 0 0 90px 0;
  }

  /* Hide on-page post/import buttons on mobile — use the floating + nav button instead (#133) */
  #post-recipe-button,
  #import-recipe-button {
    display: none !important;
  }
}

.recipe-hero-section {
    position: relative;
    height: 70vh;
    display: flex;
    justify-content: center;
    min-height: 500px;
    overflow: hidden;
    background: var(--ink);
    margin-bottom: 48px;
}

.recipe-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-hero-section:hover .recipe-hero-image {
    transform: scale(1.02);
}

.recipe-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.recipe-header-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 24px;
    background: transparent;
    border: none;
}

.recipe-glass-button {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px;
    color: white !important;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.recipe-header-glass {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px;
  padding: 12px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.recipe-glass-button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    color: white !important;
}

.recipe-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 32px;
    z-index: 10;
}

.recipe-hero-title {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 0 0 24px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    animation: fadeInUp 0.8s ease;
}

.recipe-meta-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.recipe-meta-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

.recipe-view-content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 32px 48px;
}

.recipe-view-content-container h4 {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    margin-top: 32px;
    margin-bottom: 16px;
}

.recipe-view-content-container p,
.recipe-view-content-container ul,
.recipe-view-content-container ol {
    font-size: 18px;
    line-height: 1.8;
    color: var(--ink-muted);
}

.recipe-view-content-container ul li,
.recipe-view-content-container ol li {
    margin-bottom: 8px;
}

.dropdown-menu {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lg);
}

.dropdown-menu .btn {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
    background: transparent;
    border: none;
    color: var(--ink);
}

.dropdown-menu .btn:hover {
    background: var(--surface-muted);
}

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

@media (max-width: 768px) {
    .recipe-hero-section {
        height: 60vh;
        min-height: 400px;
    }

    .recipe-hero-title {
        font-size: 36px;
    }

    .recipe-hero-content {
        padding: 32px 24px;
    }

    .recipe-view-content-container {
        padding: 0 24px 32px;
    }

    .recipe-view-content-container h4 {
        font-size: 24px;
    }
}

/* =====================
   LANDING PAGE
   ===================== */

/* Header */
.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    background: var(--nav-bg);
    backdrop-filter: saturate(1.2) blur(var(--nav-blur));
    -webkit-backdrop-filter: saturate(1.2) blur(var(--nav-blur));
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.landing-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--accent-color);
    letter-spacing: -0.01em;
}

.landing-header-login {
    background: none;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.landing-header-login:hover {
    background: var(--accent-color);
    color: white;
}

/* Hero */
.landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3.5rem 1.5rem 3rem;
}

.landing-hero-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.25rem;
    line-height: 1;
}

.landing-hero-title {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    max-width: 580px;
}

.landing-hero-tagline {
    font-size: 1.1rem;
    color: var(--ink-muted);
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: 2rem;
}

/* CTA buttons */
.landing-cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
}

.landing-cta-primary {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    width: 100%;
}

.landing-cta-secondary {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.landing-cta-secondary:hover {
    color: var(--bg-color);
}

/* Features */
.landing-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.landing-feature-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landing-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.landing-feature-icon {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-bottom: 0.75rem;
}

.landing-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.landing-feature-desc {
    font-size: 0.97rem;
    color: var(--ink-muted);
    line-height: 1.6;
    margin: 0;
}

/* Bottom CTA */
.landing-bottom-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    background: var(--surface-muted);
    margin-top: 1rem;
    border-top: 1px solid var(--border);
}

.landing-bottom-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
}

/* Desktop overrides (768px+) */
@media (min-width: 768px) {
    .landing-header {
        padding: 1rem 3rem;
    }

    .landing-hero {
        padding: 5rem 2rem 4rem;
    }

    .landing-hero-title {
        font-size: 3.6rem;
    }

    .landing-hero-tagline {
        font-size: 1.2rem;
    }

    .landing-cta-group {
        flex-direction: row;
        max-width: none;
        width: auto;
        gap: 1rem;
    }

    .landing-cta-primary {
        width: auto;
        white-space: nowrap;
    }

    .landing-features {
        flex-direction: row;
        align-items: stretch;
        padding: 3rem 2rem;
    }

    .landing-feature-card {
        flex: 1;
    }

    .landing-bottom-title {
        font-size: 2rem;
    }
}

/* Modern Modal Styling */
.modern-modal {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.modern-modal .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 24px 28px 20px;
    background: var(--surface-muted);
    border-radius: 12px 12px 0 0;
}

.modern-modal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.modern-modal .modal-body {
    padding: 28px;
}

.modern-modal .modal-footer {
    border-top: 1px solid var(--border);
    padding: 20px 28px;
    background: var(--surface-muted);
    border-radius: 0 0 12px 12px;
}

/* Modern Button Styling */
.modern-btn-secondary {
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--ink);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.modern-btn-secondary:hover {
    background: var(--surface-muted);
    border-color: var(--ink-muted);
    color: var(--ink);
}

.modern-btn-primary {
    background: var(--brand-primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(80, 200, 120, 0.25);
    transition: all 0.2s ease;
}

.modern-btn-primary:hover {
    background: var(--brand-primary-hover);
    box-shadow: 0 6px 14px rgba(80, 200, 120, 0.3);
    transform: translateY(-1px);
}

.modern-btn-primary:active {
    transform: translateY(0);
}

.modern-modal input[type="text"],
.modern-modal textarea {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.modern-modal input[type="text"]:focus,
.modern-modal textarea:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

/* ============================================================
   MODERN REFRESH — emerald branding, mobile-first polish
   Appended last so these rules win on specificity ties.
   ============================================================ */

/* Headings: display font for h1–h3, tighter tracking everywhere */
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    letter-spacing: -0.02em;
}
h4, h5 {
    color: var(--ink);
    letter-spacing: -0.01em;
}

/* Links default to emerald */
a {
    color: var(--brand-primary);
}
a:hover {
    color: var(--brand-primary-hover);
}

/* Focus rings — consistent emerald halo */
.form-control:focus,
.btn:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Buttons — unify radius and hover lift */
.btn-accent,
.btn-primary,
.modern-btn-primary,
.landing-cta-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.btn-accent:hover,
.btn-primary:hover,
.modern-btn-primary:hover,
.landing-cta-primary:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
}

/* Recipe cards — editorial image-zoom hover */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.25s ease;
    background: var(--surface);
    position: relative;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card:hover .card-img-top {
    transform: scale(1.04);
}
.card-img-top {
    border-radius: 0;
    aspect-ratio: 4 / 3;
    transition: transform 0.35s ease;
}
/* card title uses display font */
.card-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
}
@media (min-width: 768px) {
    .card-img-top {
        aspect-ratio: 1 / 1;
    }
}

/* Recipe tag chips — softer emerald fill on hover/selected */
.recipe-tag-chip:hover {
    border-color: var(--brand-primary);
    background: color-mix(in srgb, var(--brand-primary-soft) 35%, white);
    color: var(--brand-primary-dark);
}
.recipe-tag-chip.selected {
    border-color: var(--brand-primary);
    background: var(--brand-primary);
    color: #fff;
}
.recipe-tag-badge {
    background: color-mix(in srgb, var(--brand-primary-soft) 40%, white);
    color: var(--brand-primary-dark);
    border: 1px solid color-mix(in srgb, var(--brand-primary-soft) 60%, white);
}

/* Navigation — better active state, safe-area, subtle ring */
.desktop-nav,
.mobile-nav {
    background: var(--nav-bg);
    backdrop-filter: saturate(1.2) blur(var(--nav-blur));
    -webkit-backdrop-filter: saturate(1.2) blur(var(--nav-blur));
    border: 1px solid var(--border);
}

.mobile-nav {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.mobile-nav .nav-item i {
    color: var(--ink-muted);
}
.mobile-nav .nav-item i.active {
    color: var(--brand-primary);
}

.nav-add-btn {
    background: var(--brand-primary);
}
.nav-add-btn:hover {
    background: var(--brand-primary-hover);
}

.desktop-nav .brand {
    color: var(--brand-primary);
    letter-spacing: -0.01em;
}
.desktop-nav .nav-link.active {
    color: var(--brand-primary);
}

/* Recipe hero — slightly shorter on mobile, cleaner meta chips */
@media (max-width: 767px) {
    .recipe-hero-section {
        height: 52vh;
        min-height: 340px;
        margin-bottom: 24px;
    }
    .recipe-hero-content {
        padding: 24px 20px;
    }
    .recipe-hero-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem);
        margin-bottom: 16px;
    }
    .recipe-view-content-container {
        padding: 0 20px 120px;
    }
}

/* Recipe content — fluid padding, readable measure */
@media (min-width: 768px) {
    .recipe-view-content-container {
        padding: 0 clamp(24px, 4vw, 48px) 64px;
    }
}

/* Landing hero — warm editorial gradient mesh */
.landing-hero {
    position: relative;
    background:
        radial-gradient(70% 60% at 20% 0%, rgba(80, 200, 120, 0.18) 0%, transparent 65%),
        radial-gradient(50% 40% at 85% 15%, rgba(0, 255, 127, 0.08) 0%, transparent 60%),
        radial-gradient(60% 50% at 55% 100%, rgba(250, 248, 244, 0.9) 0%, transparent 70%);
}
.landing-hero-icon {
    color: var(--brand-primary);
}
.landing-hero-title {
    letter-spacing: -0.025em;
}
.landing-feature-icon {
    color: var(--brand-primary);
}
.landing-feature-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.landing-header-login {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.landing-header-login:hover {
    background: var(--brand-primary);
    color: #fff;
}
.landing-brand {
    color: var(--brand-primary);
}

/* Touch target floor — accessibility */
@media (max-width: 767px) {
    .btn,
    .nav-item,
    .recipe-tag-chip {
        min-height: 44px;
    }
}

/* ── Dark mode enhancements ────────────────────────────────────────────── */
body.dark-mode .nav-add-btn {
    box-shadow: 0 6px 18px rgba(80, 200, 120, 0.45);
}
body.dark-mode .nav-add-btn:hover {
    box-shadow: 0 10px 28px rgba(80, 200, 120, 0.6);
}
body.dark-mode .browse-filter-panel {
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}
body.dark-mode .landing-header {
    background: rgba(15, 19, 21, 0.85);
}

/* ── Landing footer — use variables ───────────────────────────────────── */
.landing-footer {
    color: var(--ink-muted);
    border-top: 1px solid var(--border);
}
.landing-footer a {
    color: var(--brand-primary-dark);
}

/* ── Recipe card image wrapper & overlay badges ──────────────────────── */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-time-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.card-tag-chip {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(80, 200, 120, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
    letter-spacing: 0.03em;
    pointer-events: none;
}

/* ── Dietary conflict badge (#198) ──────────────────────────────────────── */

.card-diet-conflict-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    pointer-events: none;
}

/* ── Recipe Collections (#192) ───────────────────────────────────────────── */

#saved-collection-chipbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 0 14px;
    align-items: center;
}

.collection-chip {
    border: 1.5px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 14px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    line-height: 1.4;
}

.collection-chip:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.collection-chip.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

.collection-chip-new {
    border-style: dashed;
    color: var(--ink-muted);
}

.collection-chip-new:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
    background: color-mix(in srgb, var(--brand-primary-soft) 25%, white);
}

.card-cook-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(245, 158, 11, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.03em;
    pointer-events: none;
}

/* Auth branding */
.auth-brand-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}
.auth-brand-tagline {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin-bottom: 1.5rem;
}

/* ── Servings Stepper (#190) ────────────────────────────────────────────── */
.servings-stepper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 6px;
}
.servings-stepper-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    line-height: 1;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    border-color: var(--border);
    color: var(--ink);
    flex-shrink: 0;
}
.servings-stepper-btn:hover:not(:disabled) {
    background: var(--brand-primary-soft);
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
}
.servings-stepper-count {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 1.5ch;
    text-align: center;
    color: var(--ink);
}
.servings-stepper-label {
    font-size: 0.95rem;
    color: var(--ink-muted);
}

/* ── Card rating display (#189) ─────────────────────────────────────────── */
.card-rating {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    gap: 2px;
}

/* ── Ingredient Substitutions (#195) ────────────────────────────────────── */
.ingredients-heading-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

/* Toggle pill next to the Ingredients heading */
.subs-toggle-btn {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--ink-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
    line-height: 1.4;
}
.subs-toggle-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
}
.subs-toggle-btn[aria-pressed="true"] {
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
    background: color-mix(in srgb, var(--brand-primary-soft) 30%, white);
}

.ingredient-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ingredient-text {
    flex: 1 1 auto;
}

/* Sub buttons hidden by default — revealed when toggle is active */
.ingredient-sub-btn {
    display: none;
    font-size: 0.72rem;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary-dark);
    background: transparent;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.6;
    transition: background 0.15s ease, color 0.15s ease;
}
#recipe-page-ingredients.subs-visible .ingredient-sub-btn {
    display: inline-block;
}
.ingredient-sub-btn:hover:not(:disabled) {
    background: var(--brand-primary-soft);
}
.ingredient-sub-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.ingredient-subs-panel {
    margin: 6px 0 2px 0;
    padding: 8px 12px;
    background: var(--surface-ink);
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.875rem;
}
.ingredient-sub-item {
    margin-bottom: 4px;
    line-height: 1.4;
}
.ingredient-sub-item:last-child { margin-bottom: 0; }
.ingredient-sub-error {
    color: #dc3545;
    margin: 0;
    font-size: 0.85rem;
}

/* ── Shopping List (#191) ───────────────────────────────────────────────────── */
#shopping-list-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    box-shadow: var(--shadow-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
#shopping-list-fab:hover {
    background: var(--brand-primary-dark);
    transform: scale(1.06);
}
.sl-fab-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

#shopping-list-panel {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sl-sheet {
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
}
.sl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sl-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink);
}
.sl-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 20px;
}
.sl-empty {
    color: var(--ink-muted);
    font-size: 0.95rem;
    text-align: center;
    margin-top: 1rem;
}
.sl-recipe-section {
    margin-bottom: 1.25rem;
}
.sl-recipe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.sl-recipe-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}
.sl-remove-btn {
    color: var(--ink-muted);
    font-size: 1rem;
    line-height: 1;
    padding: 0 6px;
    border: none;
    background: none;
}
.sl-remove-btn:hover { color: #dc3545; }
.sl-ingredient-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.5;
}
.sl-ingredient-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    border-radius: 4px;
}
.sl-ingredient-row.sl-dragging {
    background: color-mix(in srgb, var(--brand-primary-soft) 30%, white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 2;
    position: relative;
    cursor: grabbing;
}
.sl-ingredient-checked .sl-ingredient-text {
    text-decoration: line-through;
    color: var(--ink-muted);
}
.sl-ingredient-check {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}
.sl-ingredient-text {
    flex: 1 1 auto;
    outline: none;
    padding: 2px 4px;
    border-radius: 3px;
    min-height: 1.4em;
    word-break: break-word;
}
.sl-ingredient-text:focus {
    background: color-mix(in srgb, var(--brand-primary-soft) 20%, white);
    box-shadow: inset 0 0 0 1px var(--brand-primary);
}
.sl-item-remove-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--ink-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 6px;
    cursor: pointer;
}
.sl-item-remove-btn:hover { color: #dc3545; }
.sl-drag-handle {
    flex-shrink: 0;
    color: var(--ink-muted);
    cursor: grab;
    touch-action: none;
    user-select: none;
    display: inline-flex;
    align-items: center;
    padding: 0 2px;
    font-size: 1rem;
}
.sl-drag-handle:active { cursor: grabbing; }
.sl-recipe-section.sl-dragging {
    background: color-mix(in srgb, var(--brand-primary-soft) 20%, white);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 2;
    position: relative;
    cursor: grabbing;
    border-radius: 6px;
}
.sl-add-item-row {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding: 0 2px;
}
.sl-custom-add-row {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.sl-add-item-input {
    flex: 1 1 auto;
    font-size: 0.875rem;
}
.sl-add-item-btn {
    flex-shrink: 0;
    font-size: 0.8rem;
    white-space: nowrap;
}
.sl-footer {
    display: flex;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sl-action-btn {
    flex: 1;
    font-size: 0.875rem;
}

/* ── Meal Plan (#197) ────────────────────────────────────────────────────── */

.meal-plan-table {
    border-collapse: collapse;
    min-width: 700px;
    width: 100%;
    table-layout: fixed;
}

.meal-plan-day-header,
.meal-plan-meal-header {
    padding: 6px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.meal-plan-meal-header {
    text-align: left;
    width: 80px;
    background: var(--surface-muted);
}

.meal-plan-day-header.meal-plan-today {
    color: var(--brand-primary-dark);
}

.meal-plan-day-name { display: block; }
.meal-plan-day-date { display: block; font-weight: 400; font-size: 0.72rem; }

.meal-plan-cell {
    border: 1px solid var(--border);
    padding: 6px;
    vertical-align: top;
    min-height: 80px;
    width: calc((100% - 80px) / 7);
}

.meal-plan-add-btn {
    width: 100%;
    min-height: 72px;
    background: var(--surface-muted);
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--ink-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.meal-plan-add-btn:hover {
    background: color-mix(in srgb, var(--brand-primary-soft) 20%, white);
    border-color: var(--brand-primary);
    color: var(--brand-primary-dark);
}

.meal-plan-filled-cell {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: color-mix(in srgb, var(--brand-primary-soft) 25%, white);
    border: 1px solid var(--border);
    min-height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 6px;
}

.meal-plan-cell-img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
    display: block;
}

.meal-plan-cell-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-primary-dark);
    text-align: center;
    padding: 4px 20px 0 4px;
    word-break: break-word;
    line-height: 1.3;
}

.meal-plan-remove-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 53, 69, 0.8);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.meal-plan-remove-btn:hover { background: var(--danger); }

.meal-plan-picker-list {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meal-plan-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.meal-plan-picker-item:hover {
    background: color-mix(in srgb, var(--brand-primary-soft) 20%, white);
    border-color: var(--brand-primary);
}

.meal-plan-picker-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .meal-plan-table { min-width: unset; }
    .meal-plan-table thead { display: none; }
    .meal-plan-table tbody, .meal-plan-table tr { display: block; }
    .meal-plan-meal-header { display: block; width: 100%; margin-top: 12px; border-bottom: 1px solid var(--border); }
    .meal-plan-cell { display: block; width: 100%; border: none; border-bottom: 1px solid var(--border); }
}
