/* ═══ Wochenplan Web — Apple-Inspired Premium Design ═══ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Warm neutrals */
  --bg: #f5f3f0;
  --bg-elevated: #ffffff;
  --bg-secondary: #faf9f7;
  --bg-tertiary: #f0eeeb;

  /* Text hierarchy */
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #9a9a9a;
  --text-inverse: #ffffff;

  /* Accent — warm sage */
  --accent: #2d7a5f;
  --accent-light: #e8f4ee;
  --accent-dark: #1d5a43;

  /* Semantic */
  --blue: #3a7bd5;
  --blue-light: #edf3fc;
  --orange: #e8853d;
  --orange-light: #fef3e8;
  --red: #d94040;
  --red-light: #fdeaea;

  /* Surfaces */
  --border: rgba(0,0,0,0.06);
  --border-strong: rgba(0,0,0,0.1);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);

  /* Radii */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  /* Type */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Staggered Page Load Animation ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
main .container > * {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
main .container > *:nth-child(1) { animation-delay: 0.05s; }
main .container > *:nth-child(2) { animation-delay: 0.1s; }
main .container > *:nth-child(3) { animation-delay: 0.15s; }
main .container > *:nth-child(4) { animation-delay: 0.2s; }
main .container > *:nth-child(5) { animation-delay: 0.25s; }
main .container > *:nth-child(6) { animation-delay: 0.3s; }
main .container > *:nth-child(7) { animation-delay: 0.32s; }
main .container > *:nth-child(n+8) { animation-delay: 0.34s; }

/* ── Layout ── */
.container { max-width: 720px; margin: 0 auto; padding: 0 var(--space-md); }

/* ── Header — Frosted Glass ── */
header {
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--text-primary);
}
header .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
header .meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Navigation Tabs — Pill Style ── */
nav.tabs {
  display: flex;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a {
  flex-shrink: 0;
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 100px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}
nav.tabs a:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
nav.tabs a.active {
  color: var(--text-inverse);
  background: var(--text-primary);
}

/* ── Main Content ── */
main { padding: var(--space-lg) 0 var(--space-2xl); }

/* ── Cards ── */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 14px var(--space-md);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  letter-spacing: -0.01em;
}
.card-header:hover { background: var(--bg-secondary); }
.card-body { padding: 0 var(--space-md) var(--space-md); }

/* ── Badges ── */
.badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge-kcal { background: var(--accent-light); color: var(--accent-dark); }
.badge-training { background: var(--accent-light); color: var(--accent); }
.badge-rest { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ── Collapsible ── */
.collapsible .card-body { display: none; }
.collapsible.open .card-body { display: block; }
.card-header .chevron {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}
.collapsible.open .card-header .chevron { transform: rotate(180deg); }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
thead th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-strong);
  background: transparent;
}
tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--bg-secondary); }

/* Meal links */
td a, .card-body a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
td a:hover, .card-body a:hover { text-decoration: underline; }

/* Numeric columns */
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* ── Macro Summary ── */
.macro-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}
.macro-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 100px;
  font-weight: 600;
}
.macro-pill.kcal { background: var(--blue-light); color: var(--blue); }
.macro-pill.protein { background: var(--accent-light); color: var(--accent); }
.macro-pill.training { background: var(--orange-light); color: var(--orange); }

/* ── Training Cards ── */
.training-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.training-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.training-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.training-card.rest { border-left-color: var(--bg-tertiary); opacity: 0.6; }
.training-card.cardio { border-left-color: var(--accent); }
.training-card.recovery { border-left-color: var(--orange); }
.training-card h4 { font-size: 0.85rem; margin-bottom: 2px; font-weight: 700; }
.training-card .focus { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 6px; }
.training-card .duration { font-size: 0.72rem; color: var(--text-tertiary); font-weight: 600; }
.exercise-list { list-style: none; margin-top: 8px; }
.exercise-list li {
  font-size: 0.8rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.exercise-list li:last-child { border-bottom: none; }
.exercise-list .sets-reps {
  color: var(--text-tertiary);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}

/* ── Supplement Rows ── */
tr.supplement-row td {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  padding: 3px 12px;
  border-bottom: none;
  background: transparent !important;
}
tr.supplement-row:hover { background: transparent !important; }

.supplements-table th:first-child { width: 35%; }
.supplements-table .timing { color: var(--text-secondary); font-size: 0.8rem; }

/* ── Shopping List ── */
.price-inline {
  display: block;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}
.price-inline.price-low {
  color: var(--text-tertiary);
}
.cat-icon {
  margin-right: 4px;
  font-size: 1.05em;
}
.shopping-category h3 {
  font-size: 0.92rem;
  padding: 10px 0 8px;
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: none;
}
.shopping-category table { margin-top: 0; }
.shopping-category + .shopping-category { margin-top: 8px; }

.shopping-item input[type=checkbox] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
  border-radius: 6px;
}
.shopping-item.checked td {
  text-decoration: line-through;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.shopping-item.checked td:first-child { text-decoration: none; opacity: 1; }
.shopping-counter {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
}
.shopping-counter.all-done { background: var(--accent-light) !important; color: var(--accent) !important; }
.shopping-clear {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 3px 8px;
  line-height: 1;
  transition: all 0.2s;
}
.shopping-clear:hover { border-color: var(--red); color: var(--red); }

/* ── Cost Overview ── */
.cost-card { background: var(--bg-elevated); }
.cost-total { font-weight: 800; color: var(--accent-dark); font-size: 1rem; }

/* ── Recipe Page ── */
.recipe-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding: 12px 0 16px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.recipe-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 6px 14px;
  border-radius: 100px;
  font-weight: 500;
}
.ingredients-list { list-style: none; padding-left: 0; }
.ingredients-list li {
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ingredients-list li:last-child { border-bottom: none; }
.ingredients-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.steps-list { list-style: none; padding-left: 0; counter-reset: step; }
.steps-list li {
  padding: 14px 0 14px 44px;
  font-size: 0.88rem;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
  position: relative;
  counter-increment: step;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 14px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── Koch-Matrix ── */
.koch-matrix .col-day { width: 44px; }
.koch-matrix .col-meal { width: 64px; }
.koch-matrix .col-dish { min-width: 160px; }
.koch-matrix .col-who { width: 22%; font-size: 0.78rem; }
.koch-matrix td:nth-child(1) { font-weight: 700; white-space: nowrap; }
.koch-matrix td:nth-child(3) a { color: var(--accent); font-weight: 600; }
.koch-matrix .getrennt { color: var(--text-tertiary); font-style: italic; }

/* ── Meal-Prep Tips ── */
.tips-list { list-style: none; padding: 0; }
.tips-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before { content: "💡"; position: absolute; left: 0; }

/* ── Notes ── */
.notes {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 14px var(--space-md);
  font-size: 0.84rem;
  color: var(--accent-dark);
  margin-top: 12px;
  border: 1px solid rgba(45,122,95,0.12);
}

/* ── Week Navigation ── */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.week-nav h1 { flex: 1; text-align: center; }
.week-nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg-tertiary);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.week-nav-link:hover {
  background: var(--text-primary);
  color: var(--text-inverse);
}

/* ── Health Score Badges ── */
.health-scores-card { margin-bottom: var(--space-lg); }
.health-scores-card .card-header h2 { font-size: 0.95rem; margin: 0; font-weight: 700; }
.health-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.score-badge {
  text-align: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  min-width: 72px;
  transition: transform 0.2s;
}
.score-badge:hover { transform: scale(1.05); }
.score-emoji { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.score-value { font-size: 1.15rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.score-badge.overall { background: var(--accent-light); }
.score-badge.overall .score-value { color: var(--accent-dark); font-size: 1.3rem; }
.focus-areas {
  margin-top: 8px;
  padding: 0 var(--space-md) var(--space-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Recipe Search & Filter ── */
.recipe-search-wrapper {
  margin-bottom: var(--space-lg);
}
.search-bar {
  position: relative;
}
.search-bar .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  transition: color 0.2s;
}
.search-bar input:focus ~ .search-icon,
.search-bar:focus-within .search-icon {
  color: var(--accent);
}
.search-bar input {
  width: 100%;
  padding: 14px 22px 14px 48px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  outline: none;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-bar input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* Search meta line — status + reset */
.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 2px 0;
  min-height: 28px;
}
.filter-status {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 0.74rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1;
}
.filter-reset svg {
  flex-shrink: 0;
}
.filter-reset:hover {
  background: var(--red-light);
  color: var(--red);
}
.filter-reset.hidden { display: none; }

/* Tag pills — horizontal scroll, no visible scrollbar */
.tag-pills {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-sm) 0 var(--space-xs);
  margin: 0 -2px;
}
.tag-pills::-webkit-scrollbar { display: none; }
.tag-pill {
  flex-shrink: 0;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-light);
}
.tag-pill:active {
  transform: scale(0.97);
}
.tag-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.tag-pill .tag-count {
  font-weight: 400;
  opacity: 0.6;
  font-size: 0.72rem;
}
.tag-pill.active .tag-count { opacity: 0.8; }

/* ── Recipe Index — wider container ── */
.container:has(.recipe-grid) { max-width: 960px; }

/* ── Recipe Card Grid — Chefkoch-style ── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.recipe-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}
.recipe-card:hover {
  transform: scale(1.02);
}
.recipe-card:active {
  transform: scale(1.005);
}
.recipe-card.hidden { display: none; }

/* Card image */
.recipe-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Placeholder: emoji centered on gradient */
.recipe-card-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.recipe-card-emoji { font-size: 3rem; }

/* Card info below image */
.recipe-card-info {
  padding: 8px 2px;
}
.recipe-card-rating {
  font-size: 0.75rem;
  color: var(--orange, #e67e22);
  font-weight: 600;
  margin-bottom: 2px;
}
.recipe-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

/* ── Overview Grid ── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: var(--space-md);
}
.overview-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: var(--space-lg);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.overview-card:active { transform: translateY(-2px); }
.overview-card .icon { font-size: 2.2rem; margin-bottom: 10px; }
.overview-card h2 { font-size: 1.05rem; margin-bottom: 4px; font-weight: 700; letter-spacing: -0.02em; }
.overview-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }

/* ── iCal Downloads ── */
.ical-downloads {
  margin-top: var(--space-md);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ical-downloads .overview-card {
  flex: 1;
  min-width: 140px;
  padding: var(--space-md);
}
.ical-downloads .icon { font-size: 1.5rem !important; margin-bottom: 6px !important; }
.ical-downloads h2 { font-size: 0.88rem !important; }
.ical-downloads p { font-size: 0.76rem !important; }

/* ── Weekly Nutrition ── */
.weekly-nutrition { margin-top: var(--space-md); }
.weekly-nutrition .card-header { font-size: 0.85rem; }

/* ── Day Summary & Progress Ring ── */
.day-summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px 4px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.summary-item { font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 3.6deg), var(--bg-tertiary) 0);
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}
.progress-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg-elevated);
}

/* ── Section headings ── */
h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ── Store badge ── */
.store-badge {
  font-size: 0.68rem;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 100px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── Info box (Rewe hint) ── */
.card[style*="fff8e1"] {
  background: var(--orange-light) !important;
  border-left-color: var(--orange) !important;
  border: 1px solid rgba(232,133,61,0.15) !important;
  border-left: 3px solid var(--orange) !important;
  border-radius: var(--radius-sm) !important;
}

/* ── Mobile polish ── */
@media (max-width: 599px) {
  .koch-matrix table { font-size: 0.76rem; }
  .koch-matrix td, .koch-matrix th { padding: 8px 6px; }
  .koch-matrix .col-who { font-size: 0.72rem; }
  .shopping-category td, .shopping-category th { padding: 8px 6px; font-size: 0.8rem; }
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .container { padding: 0 var(--space-lg); }
  header h1 { font-size: 1.5rem; }
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .training-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  table { font-size: 0.86rem; }
}

@media (min-width: 900px) {
  .container { max-width: 960px; }
  .overview-grid { grid-template-columns: repeat(4, 1fr); }
  .training-grid { grid-template-columns: repeat(3, 1fr); }
  .recipe-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ── Portions Control ── */
.portions-control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 var(--space-md);
}
.portions-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font);
  line-height: 1;
}
.portions-btn:hover:not(:disabled) {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.portions-btn:active:not(:disabled) { transform: scale(0.92); }
.portions-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.portions-value {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 100px;
  text-align: center;
  letter-spacing: -0.01em;
}
.portions-reset {
  font-family: var(--font);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 6px 14px;
  border: none;
  border-radius: 100px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  margin-left: var(--space-sm);
}
.portions-reset:hover { background: var(--accent-light); color: var(--accent-dark); }
.portions-reset.hidden { display: none; }
.orig-amount {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 400;
}

/* ── Cook Mode Button ── */
.cook-mode-btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: var(--space-md);
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  color: white;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: -0.01em;
}
.cook-mode-btn:hover {
  background: var(--accent-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.cook-mode-btn:active { transform: translateY(0); }

/* ── Cook Mode Overlay ── */
.cook-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cook-overlay[hidden] { display: none; }
.cook-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.cook-progress {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}
.cook-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.cook-close:hover { background: var(--red-light); color: var(--red); }
.cook-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cook-step-text {
  font-size: 1.25rem;
  line-height: 1.8;
  text-align: center;
  max-width: 600px;
  font-weight: 500;
}
.cook-content h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  text-align: center;
}
.cook-content .ingredients-list {
  max-width: 400px;
  margin: 0 auto;
}
.cook-done {
  text-align: center;
}
.cook-done-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-md);
}
.cook-done h3 { font-size: 1.5rem; }
.cook-timer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-light);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.cook-timer-bar[hidden] { display: none; }
#cook-timer-display {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-dark);
  min-width: 70px;
  text-align: center;
}
.cook-timer-btn {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 20px;
  border: none;
  border-radius: 100px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: all 0.2s;
}
.cook-timer-btn:hover { background: var(--accent-dark); }
.cook-nav {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.cook-nav-btn {
  flex: 1;
  padding: 14px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.cook-nav-btn:hover:not(:disabled) { background: var(--bg-secondary); }
.cook-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.cook-nav-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.cook-nav-primary:hover:not(:disabled) { background: var(--accent-dark); }

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --bg-elevated: #1e1e1e;
    --bg-secondary: #252525;
    --bg-tertiary: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #8e8e8e;
    --text-tertiary: #5e5e5e;
    --text-inverse: #121212;
    --accent: #4eca8b;
    --accent-light: rgba(78,202,139,0.12);
    --accent-dark: #7ee8b3;
    --blue: #6ea8f0;
    --blue-light: rgba(110,168,240,0.12);
    --orange: #f0a860;
    --orange-light: rgba(240,168,96,0.1);
    --red: #f06060;
    --red-light: rgba(240,96,96,0.1);
    --border: rgba(255,255,255,0.06);
    --border-strong: rgba(255,255,255,0.1);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.3);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.4);
  }
  header {
    background: rgba(30,30,30,0.8);
  }
  .score-badge { background: var(--bg-tertiary); }
}
