/* Buffalo Kitchen — visual mockups
   Designed for "functionally usable" — not pixel-perfect, but feels like an app. */

:root {
  --bg: #fdfaf6;
  --surface: #ffffff;
  --surface-2: #f7f1e8;
  --ink: #2a2520;
  --ink-soft: #6b5d52;
  --ink-faint: #998a7d;
  --line: #ece5dc;
  --line-strong: #d8cdbf;
  --accent: #c8553d;          /* terracotta */
  --accent-soft: #fdebe6;
  --accent-deep: #9c3f2c;
  --sage: #5f8a4d;            /* in-season green */
  --sage-soft: #e8f0e2;
  --warn: #d68c2e;
  --warn-soft: #fdf3e3;
  --jonny: #3b6e8f;           /* slate blue */
  --mckayli: #a04f8e;          /* plum */
  --jorgen: #d68c2e;           /* amber */
  --alta: #2d8a7a;             /* teal */
  --safe: #5f8a4d;
  --try: #d68c2e;
  --stretch: #c8553d;
  --dessert: #c84a8e;          /* dessert pink */
  --r: 10px;
  --r-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(42, 37, 32, 0.04);
  --shadow: 0 2px 8px rgba(42, 37, 32, 0.06), 0 1px 2px rgba(42, 37, 32, 0.04);
  --shadow-lg: 0 8px 24px rgba(42, 37, 32, 0.08), 0 2px 6px rgba(42, 37, 32, 0.04);
}

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

html, body {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.4px; color: var(--ink); }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.2px; }
h3 { font-size: 16px; font-weight: 600; }

/* ============= LAYOUT ============= */

.app {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px 90px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 22px;
}
.sidebar .brand .logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar .brand .name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.2px;
}
.sidebar .brand .name small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0;
}

.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.sidebar nav a .ico { font-size: 16px; width: 22px; text-align: center; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar nav a.active {
  background: var(--accent);
  color: white;
}
.sidebar nav .group-label {
  padding: 18px 12px 6px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-faint);
  letter-spacing: 0.6px;
  font-weight: 600;
}

/* Bottom tab bar for mobile (hidden on desktop) */
.tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0));
  z-index: 50;
  box-shadow: 0 -2px 8px rgba(42, 37, 32, 0.04);
}
.tabbar nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px 4px;
  font-size: 10px;
  color: var(--ink-faint);
  font-weight: 600;
  letter-spacing: 0.2px;
}
.tabbar a .ico { font-size: 20px; }
.tabbar a.active { color: var(--accent); }

.main { padding: 28px 32px 60px; min-width: 0; }

/* ============= PAGE HEADER ============= */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.4px; }
.page-header .subtitle { color: var(--ink-soft); margin-top: 4px; font-size: 14px; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============= CARDS ============= */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}
a.card { color: inherit; display: block; }
a.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }

.card.feature {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--line-strong);
}

.card.outline { background: var(--surface); border-style: dashed; border-color: var(--line-strong); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}
.card-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.1px;
  color: var(--ink);
}
.card-meta { color: var(--ink-faint); font-size: 12px; }

.section { margin-bottom: 28px; }
.section-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.grid-7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5, .grid-7 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-5, .grid-7 { grid-template-columns: repeat(2, 1fr); }
}

/* ============= BUTTONS ============= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
  color: var(--ink);
}
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-deep);
  color: white;
  border-color: var(--accent-deep);
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ============= CHIPS ============= */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  white-space: nowrap;
}
.chip-on { background: var(--accent); color: white; border-color: var(--accent); }
.chip-warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.chip-sage { background: var(--sage-soft); border-color: var(--sage); color: var(--sage); }
.chip-safe { color: var(--safe); border-color: var(--safe); background: var(--sage-soft); }
.chip-try { color: var(--try); border-color: var(--try); background: var(--warn-soft); }
.chip-stretch { color: var(--stretch); border-color: var(--stretch); background: var(--accent-soft); }
.chip-dessert { color: var(--dessert); border-color: var(--dessert); background: #fbe9f1; }
.chip-eatout { color: var(--mckayli); border-color: var(--mckayli); background: #f4e4ee; }

/* Quick-action buttons on recipe cards */
.quick-actions {
  display: flex;
  gap: 4px;
  padding: 6px 10px 10px;
  border-top: 1px solid var(--line-soft, var(--line));
}
.quick-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 6px 8px;
  font-size: 11px;
  gap: 3px;
}
.quick-actions .btn .ico { font-size: 13px; }

/* (Simple/Full mode toggle removed — every feature is always visible.) */

/* Real tab panels — hide all except the active one */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
/* Pill-style tab bar (visually distinct from underline tabs) */
.tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar a {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab-bar a:hover { color: var(--ink); border-color: var(--ink-soft); text-decoration: none; }
.tab-bar a.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.tab-bar a .count {
  background: rgba(255,255,255,0.25);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.tab-bar a:not(.active) .count {
  background: var(--surface-2);
  color: var(--ink-soft);
}

/* (.mode-toggle styles removed along with the toggle.) */

/* Queue card - sticky/highlighted */
.queue-card {
  background: linear-gradient(180deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--accent);
  border-radius: var(--r);
  padding: 14px;
}
.queue-card .card-title { color: var(--accent-deep); }

/* Family rating row on recipe-detail */
.rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft, var(--line));
}
.rating-row:last-child { border-bottom: none; }
.rating-row .who { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.rating-row .who .name { font-weight: 600; font-size: 13px; }
.rating-row .stars-input { letter-spacing: 2px; cursor: pointer; }
.rating-row .note { font-size: 12px; color: var(--ink-faint); flex: 1; min-width: 0; }

/* Numeric rating input + slider combo */
.rating-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.rating-input input[type=number] {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.rating-input input[type=range] {
  flex: 1;
  min-width: 100px;
  accent-color: var(--accent);
}
.rating-input .out-of {
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Wizard week strip — full meal stacks per day */
.wizard-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.wizard-week .wd {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
  font-size: 10px;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 90px;
}
.wizard-week .wd:hover { border-color: var(--line-strong); }
.wizard-week .wd.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.wizard-week .wd.active .wm { background: rgba(255,255,255,0.15); color: white; }
.wizard-week .wd .wdh { font-size: 10px; font-weight: 700; letter-spacing: 0.3px; }
.wizard-week .wd .wm {
  background: var(--surface);
  color: var(--ink);
  font-size: 9px;
  padding: 1px 3px;
  border-radius: 2px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wizard-week .wd .wm strong { font-weight: 700; opacity: 0.7; margin-right: 2px; }
.wizard-week .wd .wm.empty { background: transparent; color: var(--ink-faint); opacity: 0.45; font-style: italic; }

/* AI chat drawer (recipe-detail / ingredient detail) */
.ai-fab {
  position: fixed;
  bottom: 78px;  /* above mobile tab bar */
  right: 16px;
  z-index: 60;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-fab:hover { transform: translateY(-1px); }
@media (min-width: 801px) { .ai-fab { bottom: 24px; right: 24px; } }

.ai-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  z-index: 100;
  display: none;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(42, 37, 32, 0.12);
}
.ai-drawer.open { display: flex; }
.ai-drawer header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
}
.ai-drawer header h3 { font-size: 15px; font-weight: 700; }
.ai-drawer header .close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
}
.ai-drawer .messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-drawer .msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}
.ai-drawer .msg.user { align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 4px; }
.ai-drawer .msg.ai { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.ai-drawer .msg .label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: 3px;
}
.ai-drawer .composer {
  border-top: 1px solid var(--line);
  padding: 12px;
  display: flex;
  gap: 6px;
}
.ai-drawer .composer input {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
}
.ai-drawer .composer button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Print styles — single-page-friendly. Strips chrome and chip filters,
   prints only the active tab content (calendar / shopping list / etc.). */
@media print {
  /* Hide all app chrome */
  .sidebar, .tabbar, .tab-bar, nav.tabs,
  .page-header .actions,
  .ai-fab, .ai-drawer { display: none !important; }

  /* Show only the active tab panel */
  .tab-panel { display: none !important; }
  .tab-panel.active { display: block !important; }

  /* Inside the active panel: hide control buttons + filter chips, but keep
     section titles and the actual content (calendar/list/etc.). */
  .tab-panel.active .btn,
  .tab-panel.active .chip,
  .tab-panel.active .quick-actions,
  .tab-panel.active button { display: none !important; }
  .calendar a.day { pointer-events: none; }

  /* Note + body + layout */
  body { background: white; font-size: 11pt; }
  .app { display: block; max-width: none; }
  .main { padding: 0; }

  .card { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
  .recipe-card { break-inside: avoid; }
  .calendar { break-inside: avoid; }
  .calendar .day { min-height: 80px; }
  .week-day { min-height: 60px; }
  .note { display: none; }  /* the help notes are app chrome */
  .hero { background: white !important; color: #222 !important; border: 2px solid #222; }
  .hero h2, .hero .label, .hero .meta { color: #222 !important; }
  .hero .visual { display: none; }
  a { color: inherit; text-decoration: none; }
}

/* ============= AVATARS ============= */

.avatar {
  display: inline-flex;
  width: 26px; height: 26px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}
.avatar-sm { width: 18px; height: 18px; font-size: 9px; }
.avatar-jonny { background: var(--jonny); }
.avatar-mckayli { background: var(--mckayli); }
.avatar-jorgen { background: var(--jorgen); }
.avatar-alta { background: var(--alta); }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar:not(:first-child) { margin-left: -8px; border: 2px solid var(--surface); }

/* ============= TABS ============= */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 10px 16px;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============= LISTS ============= */

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.12s, background 0.12s;
}
a.list-row { color: inherit; }
a.list-row:hover { border-color: var(--line-strong); background: var(--surface-2); text-decoration: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .name { font-weight: 600; font-size: 14px; color: var(--ink); }
.list-row .meta { color: var(--ink-faint); font-size: 12px; margin-top: 2px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { background: var(--surface-2); font-weight: 700; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* ============= SPECIFIC ============= */

.placeholder {
  border: 2px dashed var(--line-strong);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 18px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.note {
  background: var(--warn-soft);
  border-left: 3px solid var(--warn);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-soft);
  margin: 16px 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.stars { color: #d4a017; letter-spacing: 1px; font-size: 14px; }

/* Recipe card with photo placeholder using emoji */
.recipe-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
  display: block;
  color: inherit;
}
.recipe-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.recipe-card .thumb {
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.recipe-card .thumb .badge {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.95);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.3px;
}
.recipe-card .body { padding: 12px 14px 6px; }
.recipe-card .body .title { font-weight: 700; margin-bottom: 4px; font-size: 14px; line-height: 1.3; color: var(--ink); }
.recipe-card .body .meta { font-size: 12px; color: var(--ink-faint); }
.recipe-card .footer {
  padding: 8px 14px 12px;
  display: flex; justify-content: space-between;
  font-size: 11px;
  color: var(--ink-faint);
}

/* hero card for "tonight" */
.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: white;
  border-radius: var(--r);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.hero .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.85;
  font-weight: 700;
}
.hero h2 { font-size: 24px; margin: 6px 0 4px; color: white; }
.hero .meta { opacity: 0.92; font-size: 13px; }
.hero .actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.25); color: white; backdrop-filter: blur(4px); }
.hero .btn:hover { background: rgba(255,255,255,0.28); }
.hero .btn-primary { background: white; color: var(--accent-deep); border-color: white; }
.hero .btn-primary:hover { background: rgba(255,255,255,0.92); color: var(--accent-deep); }
.hero .visual {
  position: absolute; right: -10px; bottom: -10px;
  font-size: 110px;
  opacity: 0.18;
  line-height: 1;
}

/* week strip */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.week-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.week-day.today { border-color: var(--accent); background: var(--accent-soft); }
.week-day .dow { font-size: 10px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.5px; }
.week-day .num { font-size: 16px; font-weight: 700; color: var(--ink); }
.week-day.today .num { color: var(--accent); }
.week-day .meal { font-size: 11px; color: var(--ink-soft); line-height: 1.3; }
.week-day .meal strong { color: var(--ink); display: block; font-size: 11px; }

/* full month calendar */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.calendar .dow {
  background: var(--surface-2);
  padding: 8px 10px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
  text-align: center;
  font-weight: 700;
}
.calendar .day {
  background: var(--surface);
  padding: 8px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.calendar .day .num { color: var(--ink-soft); font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.calendar a.day { color: var(--ink); text-decoration: none; }
.calendar a.day:hover { background: var(--accent-soft); border-color: var(--accent); }
.calendar .day.today { background: var(--accent-soft); }
.calendar .day.today .num { color: var(--accent); font-weight: 700; }
.calendar .day.other-month { background: var(--surface-2); }
.calendar .day.other-month .num { opacity: 0.45; }
.calendar .meal-chip {
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 3px 6px;
  font-size: 11px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.calendar .meal-chip .mt { font-weight: 700; opacity: 0.7; margin-right: 4px; font-size: 10px; }
.calendar .meal-chip.eat-out { background: #f3e3f3; color: var(--mckayli); }
.calendar .meal-chip.leftover { background: var(--surface-2); color: var(--ink-faint); font-style: italic; }

/* helpers */
.row { display: flex; align-items: center; gap: 8px; }
.row.gap-lg { gap: 16px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.muted { color: var(--ink-faint); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.text-warm { color: var(--accent); }
.text-sage { color: var(--sage); }

/* ============= MOBILE ============= */

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .tabbar { display: block; }
  .main { padding: 18px 14px 80px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .page-header h1 { font-size: 22px; }
  .page-header .actions { gap: 6px; }
  .page-header .actions .btn { flex: 1; justify-content: center; }
  .week-strip { grid-template-columns: repeat(7, minmax(70px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .calendar .day { min-height: 70px; padding: 4px; }
  .calendar .meal-chip { font-size: 10px; padding: 2px 4px; }
  .hero { padding: 18px; }
  .hero h2 { font-size: 20px; }
  .hero .visual { font-size: 80px; }
}
