@layer sections {
/* ── Week notes & quick meals ───────────────────────────── */

/* Note chip (inside recipe card and quick meal card) */
.week-note-chip {
  background: var(--amber-bg);
  border-left: 2px solid var(--amber-accent);
  border-radius: 0 5px 5px 0;
  padding: 5px 8px;
  margin-top: 6px;
  cursor: pointer;
}
.week-note-chip-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--amber-fg);
  margin-bottom: 2px;
}
.week-note-chip-text {
  font-size: 11px;
  color: oklch(38% 0.05 75);
  font-style: italic;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ghost "✎ note" button, appears on hover */
.week-note-ghost-btn {
  display: none;
  font-size: 10px;
  color: var(--amber-fg);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  line-height: 1.4;
  margin-top: 4px;
  transition: background var(--t-fast);
}
.week-note-ghost-btn:hover { background: oklch(93% 0.04 82); }
.week-recipe-card:hover .week-note-ghost-btn { display: inline-block; }

/* Wrap for meal pill + ghost note btn */
.week-recipe-meta { display: flex; flex-direction: column; gap: 2px; }

/* Quick meal card */
.week-quick-meal-card {
  background: oklch(98% 0.022 85) !important;
  border: 1px dashed oklch(85% 0.05 75) !important;
  box-shadow: none !important;
}
.week-quick-meal-body {
  padding: 8px 8px 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.week-quick-meal-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--amber-accent);
  margin-bottom: 1px;
}
.week-quick-meal-name {
  font-style: italic;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

/* Quick-add row in day picker */
.day-picker-quick-add {
  border-bottom: 1px solid var(--border);
  padding: 4px 8px;
  background: oklch(98% 0.022 85);
}
.day-picker-quick-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 5px;
  text-align: left;
}
.day-picker-quick-add-btn:hover { background: oklch(95% 0.032 82); }
.day-picker-quick-add-icon {
  width: 34px;
  height: 28px;
  background: var(--amber-bg);
  border: 1px dashed oklch(85% 0.05 75);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--amber-accent);
  flex-shrink: 0;
}
.day-picker-quick-add-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.day-picker-quick-add-sub {
  font-size: 10px;
  color: var(--amber-fg);
}
.day-picker-empty {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--faint);
  font-style: italic;
  text-align: center;
}

/* Floating "Add new recipe" CTA at the bottom of the day-picker popup */
.day-picker-fab-wrap {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.day-picker-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: var(--sage-fg);
  background: var(--sage-bg);
  border: 1px solid var(--sage-dot);
  border-radius: var(--r);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 6px oklch(var(--shadow-color) / 0.06);
  transition: transform 0.08s ease, box-shadow var(--t) ease;
}
.day-picker-fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px oklch(var(--shadow-color) / 0.1);
}

/* Week note modal */
.week-modal-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(var(--shadow-color) / 0.3);
  z-index: 400;
}
.week-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 40px oklch(var(--shadow-color) / 0.18);
  z-index: 401;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: modalPop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.week-note-modal-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--amber-fg);
  display: flex;
  align-items: center;
  gap: 4px;
}
.week-note-modal-day { color: var(--muted); font-weight: 400; }
.week-note-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.week-note-modal-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.week-note-textarea {
  width: 100%;
  min-height: 96px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: oklch(38% 0.05 75);
  resize: vertical;
  line-height: 1.5;
  box-sizing: border-box;
}
.week-note-textarea:focus {
  outline: none;
  border-color: var(--amber-accent);
}
.week-note-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--faint);
}
.week-note-char-count { color: var(--muted); }
.week-note-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.week-note-modal-actions { display: flex; gap: 8px; align-items: center; }
.week-note-remove-btn {
  cursor: pointer;
  font-size: 12px;
  color: var(--rose-fg, oklch(55% 0.15 15));
  padding: 0;
}
.week-note-remove-btn:hover { text-decoration: underline; }
.week-note-modal-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: -4px;
}
.week-note-modal-field-label--optional { margin-top: 4px; }
.optional-tag {
  font-weight: 400;
  color: var(--faint);
}
.week-quick-meal-name-input {
  width: 100%;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: 14px;
  font-style: italic;
  color: var(--text);
  box-sizing: border-box;
}
.week-quick-meal-name-input:focus {
  outline: none;
  border-color: var(--amber-accent);
}

/* Recipe detail week context banner */
.recipe-week-banner {
  display: flex;
  align-items: stretch;
  background: oklch(97.5% 0.022 85);
  border: 1px solid var(--amber-border);
  border-radius: var(--r);
  margin: 10px 0 0;
  overflow: hidden;
  gap: 12px;
  padding: 10px 14px 10px 0;
}
.recipe-week-banner-rule {
  width: 3px;
  background: var(--amber-accent);
  flex-shrink: 0;
  border-radius: 0 3px 3px 0;
}
.recipe-week-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.recipe-week-banner-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.recipe-week-banner-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--amber-fg);
}
.recipe-week-banner-middle { flex: 1; min-width: 0; }
.recipe-week-banner-note {
  font-size: 13px;
  font-style: italic;
  color: oklch(38% 0.05 75);
  line-height: 1.5;
}
.recipe-week-banner-note--hint {
  color: var(--faint);
  font-style: italic;
}
.recipe-week-banner-right { flex-shrink: 0; }
.btn-outline--sm {
  font-size: 11px;
  padding: 4px 10px;
}

/* "Planned" pill replacing "Add to Week" CTA */
.btn-planned-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid var(--amber-border);
  background: var(--amber-bg);
  color: var(--amber-fg);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-planned-pill:hover { background: oklch(93% 0.04 82); }
}
