/* ==========================================================
   FridgeJam Stylesheet — Cozy Pillowy Bold-Border Design
   Adapted from the MoodJar & CodingJam Track4 Showcase
   ========================================================== */

/* --- Design Tokens (Cozy Pillowy Bold-Border Sage & Cream) --- */
:root {
  /* Default Theme: Morning Sun (Sage & Cream) */
  --bg-sage: #B5D3B8;               /* Sage green background from screenshot */
  --bg-warm: #FAF7F0;               /* Rich eggshell cream surface */
  --glass-bg: #FAF7F0;              /* Cards styled with rich eggshell cream */
  --glass-border: #25283D;          /* Bold dark outline stroke */
  --glass-shadow: 0 8px 0 #25283D;
  --glass-shadow-hover: 0 12px 0 #25283D;

  /* Accents */
  --accent-copper: #E8927A;         /* Rose pink accent from progress bar */
  --accent-gold: #F2C078;           /* Honey warm gold */
  --accent-lavender: #C7BDE8;       /* Lavender highlight */
  --accent-sage: #98D8AA;           /* Mint tag green */
  --accent-rose: #F3A0B4;           /* Warm rose */
  --accent-apple: #D95B4E;          /* Warning red */

  /* Text - Slate colors locked for legibility */
  --text-primary: #25283D;         /* High-contrast dark charcoal text */
  --text-secondary: #4A4E69;       /* Medium slate-brown text */
  --text-muted: #8E8D9C;           /* Soft gray-brown details */
  --text-on-accent: #FFFFFF;

  /* Typography */
  --font-display: 'Lora', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Custom inputs & elements */
  --input-bg: #FFFFFF;
  --input-border: #25283D;
  --chef-btn-bg: #FFFFFF;
  --chef-btn-border: #25283D;
  --bio-bg: #FFFFFF;
  --jar-bg: rgba(255, 255, 255, 0.45);
  --jar-border: #25283D;
  --ingredient-li-bg: #FFFFFF;
  --ingredient-li-border: #25283D;
  --step-num-bg: #FFFFFF;
  --step-num-border: #25283D;

  /* Floating Radii */
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  
  --transition-gentle: all 0.3s ease;
  --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Dark Theme: Twilight Hearth Overrides --- */
body.dark-theme {
  --bg-base: #0F1322;               /* Midnight cozy dark blue background */
  --bg-warm: #181C30;               /* Dark navy card surface */
  --glass-bg: #181C30;              /* Cards styled with dark slate navy */
  --glass-border: rgba(255, 255, 255, 0.35); /* High contrast border for seeability in dark mode */
  --glass-shadow: 0 8px 0 rgba(0, 0, 0, 0.4);
  --glass-shadow-hover: 0 12px 0 rgba(0, 0, 0, 0.5);

  /* Highlights */
  --accent-copper: #FFA885;
  --accent-gold: #FFD49A;
  --accent-lavender: #D8B4FE;
  --accent-sage: #A7F3D0;
  --accent-rose: #FBCFE8;
  --accent-apple: #EF4444;

  /* Dark theme text */
  --text-primary: #FAF9F6;          /* Creamy white for high visibility */
  --text-secondary: #D1D5DB;        /* Light gray */
  --text-muted: #B2C0D6;            /* Uplifted twilight steel blue gray for high contrast */
  --text-on-accent: #0F1322;

  /* Custom inputs & elements */
  --input-bg: #0F1322;
  --input-border: rgba(255, 255, 255, 0.35);
  --chef-btn-bg: #0F1322;
  --chef-btn-border: rgba(255, 255, 255, 0.35);
  --bio-bg: #0F1322;
  --jar-bg: rgba(255, 255, 255, 0.05);
  --jar-border: rgba(255, 255, 255, 0.35);
  --ingredient-li-bg: #0F1322;
  --ingredient-li-border: rgba(255, 255, 255, 0.2);
  --step-num-bg: #0F1322;
  --step-num-border: rgba(255, 255, 255, 0.3);
}

/* --- Dark Theme Typography & Writing Enhancements --- */
body.dark-theme .form-group label,
body.dark-theme .chef-selection-group label {
  color: #B2C0D6; /* Gorgeous bright twilight blue label text */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.dark-theme .app-footer {
  color: #7A89A6; /* Brightened footer text for clear visibility */
  border-top-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme #ingredients-input.thought-input::placeholder {
  color: #7282A0; /* Cozy and highly readable cool twilight placeholder */
  opacity: 0.75;
}

body.dark-theme .placeholder-tag {
  color: #8D9CB0; /* Clear and clean contrast for empty tag helper text */
}

/* --- Resets & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100vw;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  background-color: var(--bg-sage);
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.7) 1.8px, transparent 2.2px);
  background-size: 80px 80px, 120px 120px;
  background-position: 0 0, 40px 40px;
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  transition: background-color 0.5s ease, color 0.3s ease;
}

body.dark-theme {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1.8px, transparent 2.2px);
}

/* --- Decorative Floating SVG Daisies (Screenshot style) --- */
.bg-deco-flower {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  animation: float-slow 8s ease-in-out infinite alternate;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.flower-top-left {
  top: 12%;
  left: 8%;
}

.flower-bottom-right {
  bottom: 12%;
  right: 8%;
  animation-delay: 2.5s;
}

@keyframes float-slow {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(15deg) scale(1.05); }
}

/* --- Background Layer: Sunrays (Kept for depth) --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sunray {
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform-origin: top center;
  animation: ray-pulse 8s ease-in-out infinite alternate;
}

.sunray-1 { height: 70vh; top: -5%; left: 20%; transform: rotate(-22deg); opacity: 0.3; }
.sunray-2 { height: 55vh; top: -5%; left: 35%; transform: rotate(-15deg); opacity: 0.2; animation-delay: 3s; }
.sunray-3 { height: 60vh; top: -5%; left: 50%; transform: rotate(-8deg); opacity: 0.15; animation-delay: 5s; }

@keyframes ray-pulse { 0% { opacity: 0.1; transform: scaleX(0.7) rotate(-15deg); } 100% { opacity: 0.3; transform: scaleX(1.3) rotate(-15deg); } }

/* --- App Container --- */
.app-container {
  width: 100%;
  max-width: 880px;
  padding: 36px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  z-index: 1;
  position: relative;
}

/* --- Header & Title --- */
.app-header {
  text-align: center;
  margin-bottom: 8px;
  width: 100%;
}

.theme-toggle-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  width: 100%;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--chef-btn-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 4px 0 var(--glass-border);
  transition: var(--transition-spring);
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--glass-border);
}

.theme-toggle-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.logo {
  font-family: var(--font-body);
  font-size: 2.6rem; /* Slightly larger for premium prominence */
  font-weight: 800; /* Extra bold for maximum clarity */
  letter-spacing: -0.01em; /* Snug modern spacing */
  margin-bottom: 8px;
  position: relative;
  display: inline-block;
  color: #25283D; /* Highly visible high-contrast signature charcoal instead of faded transparent gradient */
  text-shadow: 2px 2px 0px #FAF7F0, 4px 4px 0px var(--accent-lavender); /* Pillowy 3D shadow matching retro aesthetic */
  animation: title-float 6s ease-in-out infinite;
}

.logo span {
  font-weight: 800;
  color: var(--accent-copper); /* Highlight "jam" in our signature accent color for distinct branding */
}

.logo::before, .logo::after {
  content: '✦';
  position: absolute;
  -webkit-text-fill-color: var(--accent-lavender);
  font-size: 0.75rem;
  opacity: 0.6;
  animation: sparkle-pulse 3s ease-in-out infinite;
}

.logo::before {
  top: -2px;
  right: -18px;
  animation-delay: 0s;
}

.logo::after {
  bottom: 0px;
  left: -16px;
  animation-delay: 1.5s;
  font-size: 0.6rem;
}

@keyframes title-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes title-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes sparkle-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

.subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 440px;
  margin: 0 auto;
}

/* --- State Machine Panels & Cards --- */
.main-content {
  width: 100%;
  position: relative;
}

.state-card {
  display: none;
  background: var(--glass-bg);
  border: 2.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 32px;
  width: 100%;
  animation: slide-fade-in 0.65s var(--transition-gentle) forwards;
}

.state-card.active {
  display: block;
}

@keyframes slide-fade-in {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Panel Header */
.card-glass-header {
  text-align: center;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--glass-border);
  padding-bottom: 16px;
}

.card-glass-header h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-glass-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- STEP 1: Interactive Counter Inputs --- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.ingredients-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label, .chef-selection-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ingredient-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  position: relative;
}

#ingredients-input.thought-input {
  width: 100%;
  min-height: 96px;
  padding: 14px 18px;
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  resize: vertical;
  transition: var(--transition-gentle);
  box-shadow: 0 4px 0 var(--input-border);
}

#ingredients-input.thought-input:focus {
  outline: none;
  border-color: var(--input-border);
  background: var(--input-bg);
  box-shadow: 0 6px 0 var(--input-border);
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
  opacity: 0.8;
  transition: color 0.3s ease;
}

.char-count.warning {
  color: var(--accent-copper);
  font-weight: 500;
}

.char-count.danger {
  color: var(--accent-apple);
  font-weight: 600;
}

/* Selected Ingredient Tag Pool */
.ingredients-pool {
  background: var(--input-bg);
  border: 2px dashed var(--input-border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 80px;
  align-content: flex-start;
}

.placeholder-tag {
  color: var(--text-muted);
  font-size: 0.9rem;
  align-self: center;
  width: 100%;
  text-align: center;
  font-style: italic;
}

.ingredient-tag {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 0 var(--glass-border);
  animation: scale-in-tag 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transition: var(--transition-gentle);
}

.ingredient-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--glass-border);
}

.btn-tag-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-gentle);
}

.btn-tag-remove:hover {
  color: var(--accent-apple);
  transform: scale(1.2);
}

@keyframes scale-in-tag {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Chef Selection Picker --- */
.chef-selection-group {
  margin-bottom: 32px;
}

.chef-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.chef-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--chef-btn-border);
  background: var(--chef-btn-bg);
  box-shadow: 0 4px 0 var(--chef-btn-border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition-spring);
  outline: none;
}

.chef-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--chef-btn-border);
  background: var(--chef-btn-bg);
}

.chef-btn.selected, .chef-btn[aria-checked="true"] {
  background: var(--accent-copper);
  border-color: var(--chef-btn-border);
  box-shadow: 0 4px 0 var(--chef-btn-border);
  transform: translateY(0);
}

.chef-btn.selected .chef-name-label, .chef-btn[aria-checked="true"] .chef-name-label {
  color: var(--text-on-accent);
}

body.dark-theme .chef-btn:not(.selected) .chef-name-label {
  color: #FAF9F6; /* high contrast cream color for visibility */
  opacity: 0.85;
}

.chef-btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.chef-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.chef-name-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  line-height: 1;
}

/* Dynamic Chef Bio Glass Box */
.chef-bio-display {
  background: var(--bio-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: opacity 0.3s ease, transform 0.3s ease;
  will-change: transform, opacity;
}

.chef-bio-display.fade-in {
  animation: fade-in 0.4s var(--transition-gentle) forwards;
}

#chef-bio-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

#chef-bio-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--accent-copper);
  margin-bottom: 8px;
}

#chef-bio-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

/* --- Cook Dial Button --- */
.action-btn-container {
  display: flex;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  background: var(--accent-copper);
  color: #FAF7F0; /* Cream text */
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--glass-border);
  transition: var(--transition-spring);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--glass-border);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-primary:disabled {
  background: var(--text-muted);
  color: rgba(255,255,255,0.4);
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 0 var(--glass-border);
}

.btn-icon {
  font-size: 1.1rem;
  transition: transform 0.35s ease;
}

.btn-primary:hover .btn-icon {
  animation: spin-sizzle 3s linear infinite;
}

@keyframes spin-sizzle {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* --- STEP 2: Cooking Station Loading Screen --- */
.stove-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0 32px;
  width: 100%;
}

.simmering-bowl-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.skillet-svg {
  animation: skillet-shake 1.5s ease-in-out infinite alternate;
}

@keyframes skillet-shake {
  0% { transform: rotate(-2deg) translateY(0); }
  100% { transform: rotate(2deg) translateY(-4px); }
}

.steam-line {
  stroke-dasharray: 20;
  animation: steam-rise 2s linear infinite;
}

.steam-l1 { animation-delay: 0s; }
.steam-l2 { animation-delay: 0.6s; }
.steam-l3 { animation-delay: 1.2s; }

@keyframes steam-rise {
  0% { stroke-dashoffset: 20; opacity: 0; }
  50% { opacity: 0.8; }
  100% { stroke-dashoffset: -20; opacity: 0; }
}

.cook-dot {
  animation: dot-bounce 1s ease-in-out infinite alternate;
}

.dot-1 { animation-delay: 0s; }
.dot-2 { animation-delay: 0.3s; }
.dot-3 { animation-delay: 0.6s; }

@keyframes dot-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

/* Loading logs */
.cooking-status-box {
  width: 100%;
  max-width: 440px;
  text-align: center;
}

.loading-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 4px;
}

.loading-subtitle {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.progress-bar-container {
  width: 100%;
  height: 20px;
  background: var(--input-bg);
  border: 2px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 0 var(--glass-border);
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 15%;
  background: var(--accent-copper);
  border-radius: 20px;
  transition: width 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cooking-log {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* ═══════════════════════════════════════════
   ENTERTAINMENT ZONE
═══════════════════════════════════════════ */

.entertain-zone {
  width: 100%;
  max-width: 500px;
  margin: 16px auto 0;
  border: 2.5px solid #25283D;
  border-radius: 18px;
  background: #FFFDF8;
  box-shadow: 0 4px 0 #25283D;
  overflow: visible; /* never clip inner content */
  transition: opacity 0.4s ease;
}

[data-theme="dark"] .entertain-zone {
  background: #1E2238;
}

/* ── Preference Picker ── */
.ez-picker {
  padding: 20px 16px 16px;
}

.ez-picker-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #25283D;
  text-align: center;
  margin: 0 0 14px;
}

[data-theme="dark"] .ez-picker-label { color: #FAF7F0; }

.ez-picker-btns {
  display: flex;
  gap: 12px;
}

.ez-pick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 10px;
  background: #FAF7F0;
  border: 2.5px solid #25283D;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 0 #25283D;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="dark"] .ez-pick-btn { background: #22263F; }

.ez-pick-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 0 #25283D;
}

.ez-pick-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #25283D;
}

.ez-pick-icon { font-size: 2rem; line-height: 1; }

.ez-pick-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #25283D;
}

[data-theme="dark"] .ez-pick-name { color: #FAF7F0; }

.ez-pick-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Shared panel header ── */
.ez-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 8px;
  border-bottom: 2px solid #E8E3D8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #25283D;
}

[data-theme="dark"] .ez-panel-header {
  border-color: #2D3150;
  color: #FAF7F0;
}

.ez-switch-btn {
  background: none;
  border: 1.5px solid var(--text-muted);
  border-radius: 8px;
  padding: 3px 9px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ez-switch-btn:hover { color: var(--accent-copper); border-color: var(--accent-copper); }

/* ── Jokes ── */
.joke-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  min-height: 130px;
  justify-content: center;
}

.joke-setup {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #25283D;
  margin: 0;
  line-height: 1.4;
}

[data-theme="dark"] .joke-setup { color: #FAF7F0; }

.joke-punchline {
  font-size: 0.95rem;
  color: var(--accent-copper);
  font-weight: 600;
  margin: 0;
  animation: punchline-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes punchline-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.joke-reveal-btn,
.joke-next-btn {
  background: var(--accent-copper);
  color: #fff;
  border: 2px solid #25283D;
  border-radius: 10px;
  padding: 8px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #25283D;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.joke-reveal-btn:hover,
.joke-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #25283D;
}

/* ── Mini Game ── */
.game-score-bar {
  display: flex;
  justify-content: space-around;
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: #25283D;
  border-bottom: 2px solid #E8E3D8;
}

[data-theme="dark"] .game-score-bar {
  color: #FAF7F0;
  border-color: #2D3150;
}

.game-score-bar strong { color: var(--accent-copper); font-size: 1rem; }

.game-arena {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFDF8 0%, #F0EDE4 100%);
}

[data-theme="dark"] .game-arena {
  background: linear-gradient(180deg, #1E2238 0%, #252840 100%);
}

.game-item {
  position: absolute;
  top: -40px;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  animation: item-fall linear forwards;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1;
  user-select: none;
}

.game-item:hover { transform: scale(1.2); }

.game-item.caught {
  animation: item-catch 0.3s ease forwards;
}

@keyframes item-fall {
  0%   { top: -40px; opacity: 1; }
  100% { top: 230px; opacity: 0.4; }
}

@keyframes item-catch {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.6); opacity: 0.8; }
  100% { transform: scale(0);   opacity: 0; }
}

/* ── Ready Banner ── */
.ready-banner {
  margin: 12px;
  border: 2.5px solid #25283D;
  border-radius: 14px;
  background: linear-gradient(135deg, #FAF1D6 0%, #FFF8E8 100%);
  box-shadow: 0 4px 0 #25283D;
  animation: banner-slide-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

@keyframes banner-slide-in {
  0%   { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}

[data-theme="dark"] .ready-banner {
  background: linear-gradient(135deg, #2A2020 0%, #1E1A10 100%);
}

.ready-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 8px;
}

.ready-icon {
  font-size: 2.2rem;
  animation: ready-wiggle 0.6s ease infinite alternate;
  flex-shrink: 0;
}

@keyframes ready-wiggle {
  0%   { transform: rotate(-8deg) scale(1);   }
  100% { transform: rotate( 8deg) scale(1.1); }
}

.ready-text { flex: 1; min-width: 120px; }

.ready-text h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #25283D;
  margin: 0 0 2px;
}

[data-theme="dark"] .ready-text h3 { color: #FAF7F0; }

.ready-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.ready-btn {
  background: var(--accent-copper);
  color: #fff;
  border: 2px solid #25283D;
  border-radius: 10px;
  padding: 9px 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #25283D;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ready-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #25283D;
}

.ready-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* Two-button row inside the ready banner */
.ready-banner-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 14px;
}

.ready-banner-actions .ready-btn {
  flex: 1;
}

/* "Keep Playing" secondary button */
.ready-keep-btn {
  flex: 1;
  background: #FAF7F0;
  color: #25283D;
  border: 2px solid #25283D;
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 3px 0 #25283D;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

[data-theme="dark"] .ready-keep-btn {
  background: #22263F;
  color: #FAF7F0;
}

.ready-keep-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #25283D;
}

.ready-keep-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

/* Sticky reminder bar (shows after Keep Playing, appended to stove-station) */
.ready-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  margin: 12px auto 0;
  width: 100%;
  max-width: 500px;
  background: linear-gradient(90deg, #FAF1D6 0%, #FFF8E8 100%);
  border: 2px solid #25283D;
  border-radius: 12px;
  box-shadow: 0 3px 0 #25283D;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: #25283D;
  animation: banner-slide-in 0.35s ease;
  box-sizing: border-box;
}

[data-theme="dark"] .ready-reminder {
  background: linear-gradient(90deg, #2A2010 0%, #1E1A10 100%);
  color: #FAF7F0;
}

.ready-reminder-btn {
  flex-shrink: 0;
  background: var(--accent-copper);
  color: #fff;
  border: 1.5px solid #25283D;
  border-radius: 8px;
  padding: 4px 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 2px 0 #25283D;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ready-reminder-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #25283D;
}

/* ─── Drawer wider for bigger cards ─── */

/* --- STEP 3: Dining Room Plated Recipe Details (Cozy Single-Column) --- */

.recipe-container {
  max-width: 1160px;
  width: 95%;
  height: calc(100vh - 60px);
  max-height: 880px;
  min-height: 580px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 10;
}

/* Action Control Bar floating above card */
.recipe-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 4px;
}

.btn-action-back {
  background: #FAF7F0;
  border: 2.5px solid #25283D;
  border-radius: 12px;
  padding: 6px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: #25283D;
  cursor: pointer;
  box-shadow: 0 4px 0 #25283D;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-action-back:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #25283D;
}

.btn-action-back:active {
  transform: translateY(4px);
  box-shadow: none;
}

.recipe-action-right {
  display: flex;
  gap: 12px;
}

.btn-action-circle {
  background: #FAF7F0;
  border: 2.5px solid #25283D;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #25283D;
  cursor: pointer;
  box-shadow: 0 4px 0 #25283D;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 0;
}

.btn-action-circle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #25283D;
}

.btn-action-circle:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* Polaroid Food Frame (Cozy Standalone Card Style) */
.recipe-photo-header {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  max-height: 420px;
  flex-shrink: 0;          /* never let a flex parent compress this */
  border: 2.5px solid #25283D;
  border-radius: 20px;
  background: #ffffff;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 0 #25283D;
}

.dish-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  border-radius: 18px;     /* slightly less than container so edges align */
  display: block;
}

.dish-photo-fallback-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #ffffff 0%, #f0f4f8 100%);
  border-radius: 18px;
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
}

.fallback-food-icon {
  font-size: 3rem;
  margin-bottom: 6px;
  animation: bounce-slow 4s infinite ease-in-out;
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.fallback-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-copper);
  margin-bottom: 2px;
}

.fallback-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.chef-badge {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  background: rgba(250, 247, 240, 0.94);
  border: 2px solid #25283D;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #25283D;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  box-sizing: border-box;
  z-index: 10;
  box-shadow: 0 2px 0 #25283D;
  backdrop-filter: blur(4px);
}

/* Plated Recipe Column Panels */
.recipe-left-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  box-sizing: border-box;
  background: #FAF7F0;
  scrollbar-width: thin;
  scrollbar-color: #E2DFEB #FAF7F0;
}

.recipe-left-panel::-webkit-scrollbar {
  width: 8px;
}
.recipe-left-panel::-webkit-scrollbar-track {
  background: #FAF7F0;
}
.recipe-left-panel::-webkit-scrollbar-thumb {
  background-color: #E2DFEB;
  border-radius: 20px;
  border: 2px solid #FAF7F0;
}

.recipe-right-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 32px;
  overflow-y: auto;
  box-sizing: border-box;
  background: #FAF7F0;
  border-left: 2.5px solid #25283D;
  scrollbar-width: thin;
  scrollbar-color: #E2DFEB #FAF7F0;
}

.recipe-right-panel::-webkit-scrollbar {
  width: 8px;
}
.recipe-right-panel::-webkit-scrollbar-track {
  background: #FAF7F0;
}
.recipe-right-panel::-webkit-scrollbar-thumb {
  background-color: #E2DFEB;
  border-radius: 20px;
  border: 2px solid #FAF7F0;
}

/* Empty placeholder class for backward compatibility */
.recipe-card-body {
  display: contents;
}

.recipe-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: #25283D;
  margin: 0;
}

.recipe-subtitle-desc {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: #6E6D7A;
  font-style: italic;
  line-height: 1.6;
  margin: -8px 0 0 0;
}

/* Stat badge pills */
.recipe-badge-row {
  display: flex;
  gap: 10px;
  margin-top: -8px;
  flex-wrap: wrap;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid #25283D;
  background-color: #E2DFEB; /* cozy soft lavender */
  color: #25283D;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-body);
}

/* Compact Nutrition Bar (Saves massive vertical space) */
.recipe-nutrition-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.nutrition-bar-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #25283D;
  text-transform: uppercase;
  margin-right: 2px;
}

.recipe-nutrition-bar .nutrition-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 10px;
  border: 2px solid #25283D;
  font-size: 0.74rem;
  font-weight: 600;
  color: #25283D;
  box-shadow: 0 2px 0 #25283D;
  transition: transform 0.1s ease;
  cursor: default;
}

.recipe-nutrition-bar .nutrition-pill:hover {
  transform: translateY(-1.5px);
}

.recipe-nutrition-bar .nutrition-pill:nth-child(2) { background-color: #FFF3E0; } /* Calories - Orange */
.recipe-nutrition-bar .nutrition-pill:nth-child(3) { background-color: #E8F5E9; } /* Protein - Green */
.recipe-nutrition-bar .nutrition-pill:nth-child(4) { background-color: #E3F2FD; } /* Carbs - Blue */
.recipe-nutrition-bar .nutrition-pill:nth-child(5) { background-color: #FCE4EC; } /* Fat - Pink */

/* Chef Narrative Speech Bubble */
.chef-narrative-bubble {
  position: relative;
  background: #FAF1D6; /* golden yellow */
  border: 2.5px solid #25283D;
  border-radius: 16px;
  padding: 10px 14px; /* Snugger padding (down from 18px 24px) */
  margin: 6px 0 2px 0; /* Snugger margins */
  box-shadow: 0 3px 0 #25283D;
  color: #4A4E69;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.84rem; /* Snugger font size */
  line-height: 1.45;
}

/* Small speech bubble tails pointing up */
.chef-narrative-bubble::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 32px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid #25283D;
}

.chef-narrative-bubble::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 32px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid #FAF1D6;
}

/* Overlapping double-dot eye avatar badge */
.bubble-avatar-badge {
  position: absolute;
  top: -14px;
  left: 16px;
  background: #FAF7F0;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* Row elements */
.recipe-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #25283D;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: lowercase;
}

.dot-bullet {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #25283D;
}

.dot-bullet.bullet-yellow {
  background-color: #F2C078;
}

.dot-bullet.bullet-purple {
  background-color: #C5BBE3;
}

/* Have vs Need Ingredient row list layout */
.ingredients-pills-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ingredient-row-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: #25283D;
  box-sizing: border-box;
  transition: transform 0.15s ease-out;
}

.ingredient-row-pill.have-style {
  border: 2px solid #25283D;
  background: #EEF6F0; /* clean light-green have surface */
}

.ingredient-row-pill.need-style {
  border: 2px dashed #25283D;
  background: #FAF7F0; /* cream need surface */
}

.ingredient-row-pill:hover {
  transform: scale(1.015);
}

.row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.row-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: lowercase;
  font-family: var(--font-body);
}

.row-badge.badge-have {
  border: 2px solid #25283D;
  background: #B5D3B8;
  color: #25283D;
}

.row-badge.badge-need {
  border: 2px dashed #25283D;
  background: none;
  color: #25283D;
}

/* Preparation Steps */
.cozy-steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  margin: 0;
  counter-reset: item;
}

.cozy-steps-list li {
  position: relative;
  padding-left: 42px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #4A4E69;
  line-height: 1.6;
}

.cozy-steps-list li::before {
  content: counter(item) "";
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FAF7F0;
  border: 2px solid #25283D;
  color: #25283D;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cozy Post-It tip yellow card */
.recipe-tip-container {
  background: #FEFCEB !important;
  border: 2.5px dashed #B48A3D !important;
  border-radius: var(--radius-md);
  padding: 10px 14px; /* Snugger padding (down from 20px) */
  box-shadow: 0 3px 0 #25283D;
  transform: rotate(-1deg);
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color: #25283D !important;
  margin: 4px 0;
  font-size: 0.8rem; /* Snugger text */
}

.recipe-tip-container:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 6px 0 #25283D;
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tip-icon {
  font-size: 1.1rem;
  color: #8C5E1A !important;
}

.tip-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #8C5E1A !important;
}

.tip-body {
  font-size: 0.9rem;
  color: #4A4E69 !important;
  line-height: 1.5;
  font-style: italic;
}

/* Overlay Reset button row */
.recipe-bottom-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.recipe-bottom-actions .btn-shake {
  padding: 14px 28px;
  background: #E8927A;
  border: 2.5px solid #25283D;
  border-radius: 20px;
  color: #FAF7F0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #25283D;
  transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.recipe-bottom-actions .btn-shake:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #25283D;
}

.recipe-bottom-actions .btn-shake:active {
  transform: translateY(4px);
  box-shadow: none;
}

/* Margin Ornaments float specs (Centered relative to sheet) */
.margin-deco {
  position: fixed;
  pointer-events: none;
  z-index: 5;
}

@keyframes float-slow-cloud {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.02); }
}

@keyframes float-slow-pencil {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-6px) rotate(43deg); }
}

@keyframes float-slow-star {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(5deg); }
}

@keyframes float-slow-sparkle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.08); }
}

.cloud-deco {
  top: 15%;
  left: calc(50% - 460px);
  animation: float-slow-cloud 6s ease-in-out infinite;
}

.pencil-deco {
  top: 12%;
  right: calc(50% - 450px);
  animation: float-slow-pencil 5s ease-in-out infinite;
}

.star-deco {
  bottom: 20%;
  left: calc(50% - 440px);
  animation: float-slow-star 5.5s ease-in-out infinite;
}

.sparkle-deco {
  bottom: 25%;
  right: calc(50% - 430px);
  animation: float-slow-sparkle 4.5s ease-in-out infinite;
}

@media (max-width: 1000px) {
  .margin-deco {
    display: none !important;
  }
}

/* --- Toast Notification (Pillowy Overlay) --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--glass-bg);
  border: 2.5px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: opacity 0.3s var(--transition-gentle);
}

.recipe-tip-container:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 6px 0 var(--glass-border);
}

.tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tip-icon {
  font-size: 1.1rem;
  color: #8C5E1A !important;
}

.tip-header h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #8C5E1A !important; /* Locked warm brown title */
}

.tip-body {
  font-size: 0.9rem;
  color: #4A4E69 !important; /* Locked slate-brown text */
  line-height: 1.5;
  font-style: italic;
}

/* --- Toast Notification (Pillowy Overlay) --- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--glass-shadow);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: opacity 0.3s var(--transition-gentle);
}

.toast.hidden {
  display: none !important;
  opacity: 0;
}

.toast-text {
  flex: 1;
}

.toast-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition-gentle);
}

.toast-dismiss:hover {
  color: var(--text-primary);
}

/* --- App Footer --- */
.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding-top: 16px;
  border-top: 2px solid var(--glass-border);
  width: 100%;
}

/* --- Responsive Details --- */
@media (max-width: 960px) {
  .app-container {
    padding: 20px 12px 40px; /* Snugger mobile padding preventing overflow scroll */
    gap: 24px;
    max-width: 100%;
  }

  .theme-toggle-container {
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 8px;
  }
  
  .theme-toggle-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .dashboard-layout > * {
    min-width: 0;
    max-width: 100%;
  }
  
  .ingredients-label-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }
  
  .chef-buttons {
    gap: 10px; /* tight snug gaps preventing card stretch */
    margin-bottom: 12px;
    width: 100%;
    justify-content: space-around;
  }
  
  .chef-btn {
    width: 62px; /* snugger buttons fitting all screens */
    height: 62px;
    gap: 2px;
    box-shadow: 0 3px 0 var(--chef-btn-border);
  }
  
  .chef-emoji {
    font-size: 1.22rem;
  }
  
  .chef-name-label {
    font-size: 0.65rem;
  }
  
  .recipe-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .recipe-presentation-panel {
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
  }
  
  .chef-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .state-card {
    padding: 16px 14px; /* Cozy snug mobile paddings */
    max-width: 100%;
  }
  
  .logo {
    font-size: 1.8rem;
    max-width: 100%;
  }

  .subtitle {
    font-size: 0.88rem;
    max-width: 92%;
    margin: 0 auto;
  }
  
  .card-glass-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    max-width: 100%;
  }

  .card-glass-header h2 {
    font-size: 1.25rem;
  }
  
  .card-glass-header p {
    font-size: 0.85rem;
  }

  .chef-bio-display {
    padding: 10px 14px;
  }
  
  #chef-bio-desc {
    font-size: 0.82rem;
  }
  
  .ingredients-list {
    grid-template-columns: 1fr;
  }
  
  .ingredient-input-wrapper {
    flex-direction: column;
  }
  
  #btn-add-ingredient {
    padding: 14px;
  }
}

@media (max-width: 360px) {
  .chef-btn {
    width: 54px;
    height: 54px;
  }
  .chef-emoji {
    font-size: 1rem;
  }
  .chef-name-label {
    font-size: 0.58rem;
  }
  .chef-buttons {
    gap: 6px;
  }
  .theme-toggle-btn {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
}

/* ==========================================================
   Leftovers Jar & Dashboard Layout
   ========================================================== */

/* Glass Windowsill Jar Nook */
.jar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: var(--glass-bg);
  border: 2.5px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 22px 16px;
  box-shadow: var(--glass-shadow);
  width: 100%;
}

.jar-windowsill {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  padding-bottom: 20px;
}

.windowsill-header {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.windowsill-header h3 {
  font-family: var(--font-display);
  font-size: 135%;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.windowsill-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Wooden Shelf Effect Under Jar Shadow */
.jar-windowsill::after {
  content: '';
  position: absolute;
  bottom: 0px;
  width: 100%;
  height: 14px;
  background: linear-gradient(to bottom, #d2a679, #996633);
  border-radius: 4px;
  box-shadow: 0 4px 0 var(--glass-border);
  border: 2px solid var(--glass-border);
}

/* Glass Jar Elements */
.jar-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
  --jar-width: 220px;
  --jar-height: 320px;
}

/* Cozy Cork Stopper */
.jar-cork {
  width: calc(var(--jar-width) * 0.52);
  height: 20px;
  background: linear-gradient(90deg, #A77C57 0%, #D8B28D 50%, #A77C57 100%);
  border: 2.5px solid var(--glass-border);
  border-bottom: none;
  border-radius: 8px 8px 3px 3px;
  z-index: 3;
  margin-bottom: -3px; /* sits perfectly nested on the rim */
  position: relative;
  box-shadow: inset 0 3px 6px rgba(255, 255, 255, 0.2), 0 2px 4px rgba(37, 40, 97, 0.1);
}

[data-theme="dark"] .jar-cork {
  background: linear-gradient(90deg, #604530 0%, #8E6D50 50%, #604530 100%);
}

.jar-rim {
  width: calc(var(--jar-width) * 0.62);
  height: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.6) 100%);
  border: 2.5px solid var(--glass-border);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  z-index: 2;
  box-shadow: inset 0 3px 5px rgba(255,255,255,0.8);
}

[data-theme="dark"] .jar-rim {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: inset 0 3px 5px rgba(255,255,255,0.1);
}

/* Red twill jar ribbon & bow */
.jar-thread {
  position: absolute;
  top: 14px; /* neck area */
  width: calc(var(--jar-width) * 0.58);
  height: 6px;
  background: #D95D5D; /* warm red string */
  border: 2px solid var(--glass-border);
  border-radius: 4px;
  z-index: 4;
}

.jar-thread::after {
  content: '🎀';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) scale(1.15);
  font-size: 1.1rem;
  z-index: 5;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.15));
}

[data-theme="dark"] .jar-thread {
  background: #A64444;
}

.jar-body {
  width: var(--jar-width);
  height: var(--jar-height);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.72) 0%, rgba(246, 243, 232, 0.45) 50%, rgba(212, 226, 240, 0.58) 100%);
  border: 2.5px solid var(--glass-border);
  border-top: none;
  border-radius: 12px 12px 64px 64px;
  box-shadow:
    inset 0 16px 28px rgba(255, 255, 255, 0.75),
    inset -14px 0 28px rgba(0, 0, 0, 0.03),
    inset 14px 0 28px rgba(255, 255, 255, 0.75),
    inset 0 -22px 45px rgba(37, 40, 61, 0.06),
    0 8px 0 var(--glass-border);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(1.5px);
}

[data-theme="dark"] .jar-body {
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, rgba(28, 32, 54, 0.45) 60%, rgba(13, 16, 32, 0.72) 100%);
  box-shadow:
    inset 0 16px 28px rgba(255, 255, 255, 0.12),
    inset -14px 0 28px rgba(0, 0, 0, 0.28),
    inset 14px 0 28px rgba(255, 255, 255, 0.12),
    inset 0 -22px 45px rgba(0, 0, 0, 0.35),
    0 8px 0 var(--glass-border);
}

/* Glass glare highlight overlays */
.jar-body::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 14px;
  width: 14px;
  height: calc(100% - 48px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.18) 100%);
  border-radius: 12px;
  z-index: 5;
  pointer-events: none;
}

.jar-body::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 14px;
  width: 8px;
  height: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  z-index: 5;
  pointer-events: none;
}

.jar-contents {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 24px 16px;
  z-index: 2; /* elevated above glare underlay but below front glare if needed */
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* Beautiful Colorful Paper Slips */
.jar-slip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 2px solid var(--glass-border);
  border-left: 6px solid var(--slip-accent, var(--accent-copper));
  background: var(--slip-bg, #FFF0ED);
  font-size: 0.78rem;
  font-family: var(--font-body);
  color: #25283D !important; /* Locked charcoal text color for maximum seeability! */
  cursor: pointer;
  box-shadow: 0 3px 0 var(--glass-border);
  max-width: 92%;
  align-self: center;
  will-change: transform, opacity;
  animation: slip-drop 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.jar-slip:hover {
  transform: rotate(0deg) scale(1.05) !important;
  z-index: 10;
  box-shadow: 0 4px 0 var(--glass-border);
}

.slip-emoji {
  font-size: 1rem;
  flex-shrink: 0;
}

.slip-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Empty text in glass jar */
.jar-empty-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  opacity: 0.75;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.jar-empty-text.hidden {
  display: none !important;
  opacity: 0;
}

/* Shadow at the base of the jar */
.jar-shadow {
  width: calc(var(--jar-width) * 0.75);
  height: 12px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
  margin-top: 4px;
  border-radius: 50%;
  opacity: 0.85;
}

/* --- Leftovers Jar Animations --- */
@keyframes jar-shake {
  0%   { transform: rotate(0deg) translateX(0); }
  15%  { transform: rotate(-4deg) translateX(-8px); }
  30%  { transform: rotate(3deg) translateX(6px); }
  45%  { transform: rotate(-2deg) translateX(-4px); }
  60%  { transform: rotate(1.5deg) translateX(3px); }
  75%  { transform: rotate(-0.5deg) translateX(-1px); }
  100% { transform: rotate(0deg) translateX(0); }
}

.jar-container.shaking {
  animation: jar-shake 0.6s var(--transition-gentle) !important;
}

@keyframes slip-drop {
  0% { opacity: 0; transform: translateY(-40px) rotate(0deg) scale(0.8); }
  40% { opacity: 1; transform: translateY(4px) rotate(var(--slip-rotation, 2deg)) scale(1); }
  60% { transform: translateY(-3px) rotate(var(--slip-rotation, 2deg)) scale(1); }
  100% { transform: translateY(0) rotate(var(--slip-rotation, 2deg)) scale(1); }
}

/* ==========================================================
   Plated Recipe Modal Overlay (tactile pillowy styling)
   ========================================================== */

.card-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* no global page scroll on desktop */
  padding: 20px 24px;
  background-color: #C5BBE3; /* Cozy lavender background */
  background-image: radial-gradient(#ffffff 15%, transparent 16%);
  background-size: 24px 24px; /* sugar sprinkles pattern */
  transition: opacity 0.3s ease;
}

.card-overlay.hidden {
  display: none !important;
  opacity: 0;
}

.card-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: transparent; /* transparent clickable layer */
  z-index: 1;
}

.card-overlay-content {
  position: relative;
  width: 100%;
  height: 100%; /* fill the container frame height */
  display: grid;
  grid-template-columns: 1fr 1.15fr; /* gorgeous split! */
  background: #FAF7F0; /* Cream Eggshell */
  border: 2.5px solid #25283D; /* bold charcoal outline */
  border-radius: 32px;
  box-shadow: 0 8px 0 #25283D; /* pillowy tactile shadow */
  overflow: hidden;
  z-index: 10;
  animation: card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes card-enter {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Additional Responsive Tweaks for Modal Overlay */
@media (max-width: 900px) {
  .recipe-container {
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .card-overlay {
    display: block; /* enable vertical block scroll flow on mobile */
    overflow-y: auto;
    padding: 16px 10px; /* Snugger mobile padding (down from 40px 16px) preventing scattered layout */
  }
  
  .card-overlay-content {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-y: visible;
    border-radius: 20px; /* Cozy mob outline */
  }
  
  .recipe-left-panel {
    overflow-y: visible;
    padding: 12px; /* Snug padding */
    border-bottom: 2.5px solid #25283D;
    gap: 12px; /* Cozy stacked gap */
  }
  
  .recipe-right-panel {
    border-left: none;
    overflow-y: visible;
  }
  
  .recipe-photo-header {
    border-radius: 12px;   /* softer on mobile */
    aspect-ratio: 4 / 3;
    min-height: 240px;
    max-height: none;
    margin: 0;
    width: 100%;
    box-shadow: none;
    border: 2.5px solid #25283D;
    padding: 0;
  }
  
  .dish-photo, .dish-photo-fallback-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }
  
  .chef-badge {
    position: absolute;
    bottom: 28px;
    right: 28px;
    width: auto;
    margin-top: 0;
    box-shadow: 0 3px 0 #25283D;
  }
}

/* --- Generic Utility Classes --- */
.hidden {
  display: none !important;
}

/* --- Recipe Box Controls & Drawer --- */
.theme-toggle-container {
  gap: 12px;
}

.recipe-box-btn {
  background: #EEF6F0 !important; /* Soft green badge cream */
  border-color: #25283D !important;
}

.recipe-box-btn:hover {
  background: #FAF7F0 !important;
}

/* Dark Theme Overrides for Recipe Box Button to guarantee beautiful contrast & perfect theme symmetry */
body.dark-theme .recipe-box-btn {
  background: var(--chef-btn-bg) !important;
  border-color: var(--glass-border) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 4px 0 var(--glass-border) !important;
}

body.dark-theme .recipe-box-btn:hover {
  background: var(--glass-bg) !important;
  box-shadow: 0 6px 0 var(--glass-border) !important;
}

/* Backdrop */
.recipe-box-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(37, 40, 61, 0.4);
  backdrop-filter: blur(8px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.recipe-box-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Drawer */
.recipe-box-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 520px;
  max-width: 100%;
  height: 100vh;
  background: #FAF7F0;
  border-left: 3.5px solid #25283D;
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 0 rgba(37, 40, 61, 0.15);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
}

.recipe-box-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.recipe-box-drawer.resizing {
  transition: none !important;
  user-select: none;
}

body.resizing-drawer,
body.resizing-drawer * {
  cursor: ew-resize !important;
  user-select: none !important;
}

/* Drawer Resizing Handle */
.recipe-box-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 100%;
  cursor: ew-resize;
  z-index: 1000;
  transform: translateX(-50%); /* center it on the boundary border */
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
}

.recipe-box-resize-line {
  width: 4px;
  height: 60px;
  background: #25283D;
  border: 1px solid #FAF7F0;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.recipe-box-resize-handle:hover .recipe-box-resize-line,
.recipe-box-drawer.resizing .recipe-box-resize-line {
  opacity: 0.7;
  transform: scaleY(1.25);
}

.recipe-box-resize-handle:active .recipe-box-resize-line {
  opacity: 1;
  background: var(--accent-copper);
}

[data-theme="dark"] .recipe-box-resize-line {
  background: #FAF7F0;
  border-color: #25283D;
}

/* Dark theme support for drawer background */
[data-theme="dark"] .recipe-box-drawer {
  background: #181C30;
  border-left: 3.5px solid #25283D;
}

.recipe-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  padding-bottom: 12px;
}

.recipe-box-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #25283D;
  margin: 0;
}

[data-theme="dark"] .recipe-box-heading {
  color: #FAF7F0;
}

.recipe-box-close {
  background: #FAF7F0;
  border: 2px solid #25283D;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: #25283D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #25283D;
  transition: var(--transition-spring);
}

[data-theme="dark"] .recipe-box-close {
  background: #22263F;
  color: #FAF7F0;
  border-color: #25283D;
}

.recipe-box-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #25283D;
}

.recipe-box-close:active {
  transform: translateY(3px);
  box-shadow: none;
}

.recipe-box-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  margin-bottom: 16px;
}

.recipe-box-divider-line {
  flex: 1;
  height: 2px;
  background: #25283D;
}

[data-theme="dark"] .recipe-box-divider-line {
  background: var(--glass-border);
}

.recipe-box-divider-sun {
  font-size: 1.1rem;
  animation: spin-soft 20s linear infinite;
  display: inline-block;
}

.recipe-box-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 140px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Smooth scroll so accordion expansion feels natural */
  scroll-behavior: smooth;
}

/* Custom Scrollbar for Recipe Box */
.recipe-box-list::-webkit-scrollbar {
  width: 8px;
}
.recipe-box-list::-webkit-scrollbar-track {
  background: transparent;
}
.recipe-box-list::-webkit-scrollbar-thumb {
  background: #25283D;
  border-radius: 4px;
}

/* Empty State */
.recipe-box-empty {
  text-align: center;
  padding: 48px 16px;
  font-family: var(--font-body);
  color: #25283D;
  font-weight: 600;
}

[data-theme="dark"] .recipe-box-empty {
  color: #FAF7F0;
}

.recipe-box-empty .empty-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 8px;
}

/* Recipe Box Card */
.recipe-box-card {
  background: #FAF7F0;
  border: 2.5px solid #25283D;
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: 0 4px 0 #25283D;
  transition: var(--transition-spring);
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

[data-theme="dark"] .recipe-box-card {
  background: #22263F;
}

.recipe-box-card:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 8px 0 #25283D;
}

.recipe-box-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #25283D;
}

.recipe-box-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  border: 2px solid #25283D;
  object-fit: cover;
  background: #B5D3B8;
  flex-shrink: 0;
}

.recipe-box-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recipe-box-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #25283D;
  margin: 0;
  line-height: 1.25;
}

[data-theme="dark"] .recipe-box-card-title {
  color: #FAF7F0;
}

.recipe-box-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.recipe-box-card-chef-badge {
  background: #FAF1D6;
  border: 1.5px solid #25283D;
  border-radius: 12px;
  padding: 1px 6px;
  font-weight: 700;
  color: #25283D;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.recipe-box-card-delete {
  background: #E8927A;
  border: 1.5px solid #25283D;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 0 #25283D;
  transition: var(--transition-spring);
  color: #25283D;
  font-size: 0.85rem;
  padding: 0;
  flex-shrink: 0;
}

.recipe-box-card-delete:hover {
  transform: scale(1.1) translateY(-1px);
  background: #FF6B6B;
  box-shadow: 0 3px 0 #25283D;
}

.recipe-box-card-delete:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* ── Accordion wrapper ── */
.recipe-box-item {
  display: flex;
  flex-direction: column;
  border: 2.5px solid #25283D;
  border-radius: var(--radius-sm);
  /* No overflow:hidden here — lets expand panel grow and list scroll */
  box-shadow: 0 4px 0 #25283D;
  transition: box-shadow 0.2s ease;
}

.recipe-box-item .recipe-box-card {
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  box-shadow: none;
  margin: 0;
  transition: background 0.15s ease;
}

.recipe-box-item .recipe-box-card:hover {
  transform: none;
  box-shadow: none;
  background: #F0EDE4;
}

[data-theme="dark"] .recipe-box-item .recipe-box-card:hover {
  background: #2A2F50;
}

/* Chevron indicator */
.recipe-box-card-chevron {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-right: 4px;
  user-select: none;
}

.rbe-open .recipe-box-card-chevron {
  transform: rotate(180deg);
}

/* ── Expandable panel ── */
.recipe-box-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: #FFFDF8;
  border-top: 0 solid #25283D;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

[data-theme="dark"] .recipe-box-expand {
  background: #1E2238;
}

/* .rbe-open is no longer used — JS sets inline styles directly */

.rbe-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero image in expand panel */
.rbe-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #25283D;
}

/* Section title */
.rbe-section-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-copper);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Ingredients list */
.rbe-ingredients-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rbe-ingredient {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #25283D;
  padding: 4px 8px;
  border-radius: 6px;
}

[data-theme="dark"] .rbe-ingredient {
  color: #FAF7F0;
}

.rbe-have {
  background: rgba(92, 160, 98, 0.12);
}

.rbe-need {
  background: rgba(232, 146, 122, 0.12);
}

.rbe-ing-dot {
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Steps list */
.rbe-steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rbe-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #25283D;
  line-height: 1.45;
}

[data-theme="dark"] .rbe-step {
  color: #FAF7F0;
}

.rbe-step-num {
  background: var(--accent-copper);
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Cook This CTA */
.rbe-cook-btn {
  background: var(--accent-copper);
  color: #fff;
  border: 2px solid #25283D;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #25283D;
  transition: var(--transition-spring);
  text-align: center;
  width: 100%;
  margin-top: 4px;
}

.rbe-cook-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 #25283D;
}

.rbe-cook-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

@media (max-width: 500px) {
  .recipe-box-drawer {
    width: 100%;
    border-left: none;
  }
}

/* --- Fridge Photo Scanner & Glassmorphic Scanner Overlay --- */
.scan-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.btn-scan-photo {
  background: #FAF7F0; /* cozy eggshell */
  border: 2px solid #25283D;
  border-radius: 12px;
  padding: 5px 14px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: #25283D;
  cursor: pointer;
  box-shadow: 0 3px 0 #25283D;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-scan-photo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 #25283D;
}

.btn-scan-photo:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #25283D;
}

body.dark-theme .btn-scan-photo {
  background: #181C30;
  border-color: rgba(255, 255, 255, 0.35);
  color: #FAF9F6;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
}

body.dark-theme .btn-scan-photo:hover {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}

body.dark-theme .btn-scan-photo:active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.scan-overlay {
  position: fixed;
  inset: 0;
  background: rgba(37, 40, 61, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fade-in 0.3s ease;
}

.scan-overlay-content {
  background: #FAF7F0; /* Cream surface */
  border: 3px solid #25283D;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 12px 0 #25283D;
  max-width: 400px;
  width: 90%;
  position: relative;
  overflow: hidden;
}

body.dark-theme .scan-overlay-content {
  background: #181C30;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.5);
  color: #FAF9F6;
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #E8927A, transparent);
  animation: laser-scan 2s linear infinite;
}

@keyframes laser-scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

.scan-spinner {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: inline-block;
  animation: spin-pulse 1.5s ease-in-out infinite alternate;
}

@keyframes spin-pulse {
  0% { transform: scale(1) rotate(-10deg); }
  100% { transform: scale(1.2) rotate(10deg); }
}


/* --- Dedicated PDF Cookbook Template Styling (Hidden on Screen via Container) --- */
.pdf-print-template {
  display: flex;
  width: 10.4in; /* exact dimensions for landscape letter with 0.3in margins */
  height: 7.9in;
  padding: 0.3in;
  box-sizing: border-box;
  background-color: #FAF7F0;
  font-family: 'Outfit', sans-serif;
  color: #25283D;
  border: 4.5px solid #25283D;
  border-radius: 24px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}

.pdf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.pdf-title {
  font-family: 'Lora', serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 0;
  color: #25283D;
}

.pdf-chef-byline {
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #E2DFEB;
  border: 2.2px solid #25283D;
  padding: 4px 10px;
  border-radius: 12px;
}

.pdf-card-divider {
  border-top: 3px solid #25283D;
  margin: 6px 0 10px 0;
  width: 100%;
}

.pdf-card-body {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 16px;
  flex-grow: 1;
  overflow: hidden;
  width: 100%;
  text-align: left;
}

.pdf-left-column, .pdf-right-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-photo-wrapper {
  width: 100%;
  height: 2.3in;
  border: 2.5px solid #25283D;
  border-radius: 16px;
  overflow: hidden;
  background-color: #ffffff;
  padding: 6px;
  box-sizing: border-box;
}

.pdf-photo {
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.pdf-narrative-box {
  background-color: #FAF1D6;
  border: 2px solid #25283D;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.35;
  color: #4A4E69;
}

.pdf-narrative-box p {
  margin: 0;
}

.pdf-tip-box {
  background-color: #FEFCEB;
  border: 2px dashed #B48A3D;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.7rem;
  color: #25283D;
}

.pdf-tip-box strong {
  color: #8C5E1A;
}

.pdf-tip-box p {
  margin: 2px 0 0 0;
  font-style: italic;
  line-height: 1.35;
}

.pdf-stats-row {
  display: flex;
  gap: 8px;
}

.pdf-stat-pill {
  font-size: 0.7rem;
  font-weight: 600;
  border: 2px solid #25283D;
  padding: 2px 8px;
  border-radius: 8px;
  background-color: #E3F2FD;
}

.pdf-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-section-title {
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
  border-bottom: 2.2px solid #25283D;
  padding-bottom: 1px;
  text-transform: uppercase;
  color: #25283D;
}

.pdf-ingredients-list, .pdf-steps-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: #25283D;
  list-style-position: outside;
}

.pdf-ingredients-list li, .pdf-steps-list li {
  margin-bottom: 2px;
  padding-left: 2px;
}

.pdf-steps-list {
  padding-left: 20px;
}

.pdf-nutrition-row {
  border: 2px solid #25283D;
  border-radius: 12px;
  background-color: #F8F5F2;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdf-nutrition-row strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-nutrition-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pdf-nutrition-pill {
  font-size: 0.68rem;
  font-weight: 600;
  border: 1.5px solid #25283D;
  padding: 2px 6px;
  border-radius: 8px;
}

.pdf-nutrition-pill.calories-pill { background-color: #FFF3E0; }
.pdf-nutrition-pill.protein-pill { background-color: #E8F5E9; }
.pdf-nutrition-pill.carbs-pill { background-color: #E3F2FD; }
.pdf-nutrition-pill.fat-pill { background-color: #FCE4EC; }

.pdf-card-footer {
  text-align: center;
  font-size: 0.68rem;
  color: #6E6D7A;
  border-top: 2px dashed #25283D;
  padding-top: 5px;
  margin-top: 5px;
  width: 100%;
}

/* ==========================================================
   NEW FEATURES: Voice Input, Shopping List, Meal Planner
   ========================================================== */

/* --- Voice Input Button --- */
.btn-voice-input.listening {
  background: var(--accent-rose) !important;
  animation: pulse-mic 1.2s ease-in-out infinite;
}

@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 4px 0 var(--glass-border); }
  50%       { box-shadow: 0 4px 0 var(--glass-border), 0 0 0 7px rgba(243, 160, 180, 0.3); }
}

/* --- Shopping List Modal --- */
.shopping-list-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shopping-list-modal.hidden { display: none; }

.shopping-list-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 40, 61, 0.55);
  backdrop-filter: blur(4px);
}

.shopping-list-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-warm);
  border: 2.5px solid var(--glass-border);
  box-shadow: 6px 6px 0 var(--glass-border);
  border-radius: var(--radius-lg);
  width: min(420px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shopping-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 2px solid var(--glass-border);
}

.shopping-list-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.shopping-list-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.shopping-list-close:hover { background: var(--accent-rose); color: #fff; }

.shopping-list-subtitle {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  padding: 10px 20px 6px;
}

.shopping-list-items {
  list-style: none;
  margin: 0;
  padding: 0 20px 12px;
  overflow-y: auto;
  flex: 1;
}

.shopping-item {
  border-bottom: 1.5px solid rgba(37, 40, 61, 0.1);
  padding: 8px 0;
}

.shopping-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
}

.shopping-item-check {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-sage);
  cursor: pointer;
  flex-shrink: 0;
}

.shopping-item-check:checked + .shopping-item-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.shopping-all-good {
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--text-secondary);
  padding: 16px 0;
  text-align: center;
  list-style: none;
}

.shopping-list-footer {
  padding: 12px 20px 18px;
  border-top: 2px solid var(--glass-border);
}

.shopping-list-copy-btn {
  width: 100%;
  padding: 10px 16px;
  background: var(--accent-gold);
  border: 2.5px solid var(--glass-border);
  box-shadow: 3px 3px 0 var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-spring);
}
.shopping-list-copy-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--glass-border);
}

/* --- Meal Planner Overlay --- */
.meal-planner-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.meal-planner-overlay.hidden { display: none; }

.meal-planner-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 40, 61, 0.6);
  backdrop-filter: blur(6px);
}

.meal-planner-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-warm);
  border: 2.5px solid var(--glass-border);
  box-shadow: 8px 8px 0 var(--glass-border);
  border-radius: var(--radius-lg);
  width: min(1000px, 96vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meal-planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 24px 14px;
  border-bottom: 2.5px solid var(--glass-border);
}

.meal-planner-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.meal-planner-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mp-suggest-btn {
  padding: 8px 16px;
  background: var(--accent-lavender);
  border: 2.5px solid var(--glass-border);
  box-shadow: 3px 3px 0 var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-spring);
}
.mp-suggest-btn:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--glass-border);
}
.mp-suggest-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.mp-clear-btn {
  padding: 8px 14px;
  background: none;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-gentle);
}
.mp-clear-btn:hover { background: var(--accent-rose); color: #fff; border-color: var(--accent-rose); }

.meal-planner-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s;
  line-height: 1;
}
.meal-planner-close:hover { background: var(--accent-rose); color: #fff; }

.meal-planner-hint {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  padding: 8px 24px 0;
}

.meal-planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  padding: 16px 20px 24px;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 720px) {
  .meal-planner-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.meal-planner-day-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 180px;
}

.mp-day-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  text-align: center;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--glass-border);
}

.mp-meal-card {
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  box-shadow: 3px 3px 0 var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.mp-meal-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-bottom: 2px solid var(--glass-border);
}

.mp-meal-emoji {
  font-size: 2rem;
  text-align: center;
  padding: 12px 0 4px;
}

.mp-meal-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.mp-meal-title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.mp-meal-desc {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-meal-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  margin-top: auto;
}

.mp-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(37, 40, 61, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.mp-meal-card:hover .mp-remove-btn { opacity: 1; }

.mp-empty-slot {
  border: 2.5px dashed rgba(37, 40, 61, 0.3);
  border-radius: var(--radius-md);
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-add-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 16px 8px;
  border-radius: var(--radius-md);
  transition: background 0.2s;
  width: 100%;
}
.mp-add-btn:hover { background: rgba(181, 211, 184, 0.25); }

.mp-add-icon {
  font-size: 1.6rem;
  color: var(--text-muted);
  line-height: 1;
}

.mp-add-text {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Meal Day Picker --- */
.meal-day-picker {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.meal-day-picker.hidden { display: none; }

.meal-day-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 40, 61, 0.4);
}

.meal-day-picker-panel {
  position: relative;
  z-index: 1;
  background: var(--bg-warm);
  border: 2.5px solid var(--glass-border);
  box-shadow: 6px 6px 0 var(--glass-border);
  border-radius: var(--radius-lg);
  width: min(380px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meal-day-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 2px solid var(--glass-border);
}

.meal-day-picker-header h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.meal-day-picker-close {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 6px;
  border-radius: 6px;
}
.meal-day-picker-close:hover { background: var(--accent-rose); color: #fff; }

.meal-day-picker-list {
  overflow-y: auto;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mp-picker-empty {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
}

.mp-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  text-align: left;
  transition: var(--transition-gentle);
}
.mp-picker-item:hover {
  background: var(--accent-sage);
  transform: translateX(3px);
}

.mp-picker-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--glass-border);
  flex-shrink: 0;
}

.mp-picker-emoji { font-size: 1.4rem; flex-shrink: 0; }
.mp-picker-name { font-weight: 600; }

/* Dark theme adjustments */
body.dark-theme .mp-remove-btn { background: rgba(250, 249, 246, 0.15); }
body.dark-theme .mp-empty-slot { border-color: rgba(255, 255, 255, 0.2); }
body.dark-theme .shopping-item { border-color: rgba(255, 255, 255, 0.1); }
