/* ============================================================
   KOCHBUCH VARIANTE 3 — Editorial / Modern / Schwarz-Weiß
   Palette: Reines Weiß · Schwarz #111111 · Gelb #f5c800
   Fonts:   Cabinet Grotesk (Display) · Satoshi (Body)
   ============================================================ */

/* ========================
   TOKENS & PALETTE — Light
   ======================== */
:root,
[data-theme="light"] {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-hero: clamp(3rem,     2rem    + 4vw,    5.5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Palette: Light — Pure White + Black + Yellow */
  --color-bg:              #ffffff;
  --color-surface:         #f4f4f4;
  --color-surface-2:       #ebebeb;
  --color-surface-offset:  #e2e2e2;
  --color-border:          #d0d0d0;
  --color-divider:         #e0e0e0;

  --color-text:            #111111;
  --color-text-muted:      #555555;
  --color-text-faint:      #999999;
  --color-text-inverse:    #ffffff;

  /* Yellow accent — sole colour accent */
  --color-primary:         #f5c800;
  --color-primary-hover:   #e0b400;
  --color-primary-active:  #c9a100;
  --color-primary-highlight: #fdf4b8;
  --color-primary-muted:   #f9e370;

  /* Radius — sharp / editorial */
  --radius-sm:   0px;
  --radius-md:   4px;
  --radius-lg:   4px;
  --radius-xl:   4px;
  --radius-full: 4px;

  /* Shadows — subtle, geometric */
  --shadow-sm: 0 1px 0 rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 0 rgba(0,0,0,0.12), 0 6px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 3px 0 rgba(0,0,0,0.16), 0 16px 40px rgba(0,0,0,0.12);

  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body:    'Satoshi', 'Helvetica Neue', sans-serif;

  --content-default: 1080px;
  --header-h: 60px;
}

/* ========================
   PALETTE — Dark
   ======================== */
[data-theme="dark"] {
  --color-bg:              #0c0c0c;
  --color-surface:         #1a1a1a;
  --color-surface-2:       #222222;
  --color-surface-offset:  #2a2a2a;
  --color-border:          #333333;
  --color-divider:         #2e2e2e;

  --color-text:            #f0f0f0;
  --color-text-muted:      #999999;
  --color-text-faint:      #555555;
  --color-text-inverse:    #0c0c0c;

  /* Yellow stays the same in dark — it pops on black */
  --color-primary:         #f5c800;
  --color-primary-hover:   #e0b400;
  --color-primary-active:  #c9a100;
  --color-primary-highlight: #2a2500;
  --color-primary-muted:   #4a3f00;

  --shadow-sm: 0 1px 0 rgba(0,0,0,0.4),  0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 0 rgba(0,0,0,0.5),  0 6px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 3px 0 rgba(0,0,0,0.6), 0 16px 40px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:              #0c0c0c;
    --color-surface:         #1a1a1a;
    --color-surface-2:       #222222;
    --color-surface-offset:  #2a2a2a;
    --color-border:          #333333;
    --color-divider:         #2e2e2e;
    --color-text:            #f0f0f0;
    --color-text-muted:      #999999;
    --color-text-faint:      #555555;
    --color-text-inverse:    #0c0c0c;
    --color-primary:         #f5c800;
    --color-primary-hover:   #e0b400;
    --color-primary-active:  #c9a100;
    --color-primary-highlight: #2a2500;
    --color-primary-muted:   #4a3f00;
    --shadow-sm: 0 1px 0 rgba(0,0,0,0.4),  0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 2px 0 rgba(0,0,0,0.5),  0 6px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 3px 0 rgba(0,0,0,0.6), 0 16px 40px rgba(0,0,0,0.5);
  }
}

/* ========================
   BASE RESET
   ======================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 56px);
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.65;
  overflow-x: hidden;
}
img, svg  { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, select { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 { text-wrap: balance; line-height: 1.1; }
p, li, figcaption  { text-wrap: pretty; max-width: 72ch; }
button { cursor: pointer; background: none; border: none; }
a      { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
*, a, button, input, select {
  transition: color var(--transition), background var(--transition),
    border-color var(--transition), box-shadow var(--transition),
    opacity var(--transition), transform var(--transition);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================
   HEADER
   ======================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1e2a1e;
  border-bottom: 3px solid #3a6b3a;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-5);
  height: var(--header-h);
  gap: var(--space-4);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #e8f5e8;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  color: #7ec87e;
  flex-shrink: 0;
}
.logo:hover .logo-mark { color: #a8e6a8; }
.logo-text { color: #e8f5e8; }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.theme-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(126,200,126,0.35);
  color: #a8c8a8;
  background: none;
}
.theme-toggle:hover,
.menu-toggle:hover {
  border-color: #7ec87e;
  color: #e8f5e8;
  background: rgba(126,200,126,0.15);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  background: #172317;
  border-top: 1px solid rgba(126,200,126,0.2);
  padding: var(--space-4) var(--space-5);
}
.mobile-nav.open { display: block; }
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav .nav-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a8c8a8;
  border-left: 2px solid transparent;
}
.mobile-nav .nav-link:hover {
  color: #e8f5e8;
  border-left-color: #7ec87e;
  background: rgba(126,200,126,0.1);
}

/* ========================
   HERO
   ======================== */
.hero {
  background: #111111;
  color: #ffffff;
  padding: clamp(var(--space-12), 10vw, var(--space-20)) var(--space-5)
           clamp(var(--space-16), 12vw, 7rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Subtle grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-default);
  margin: 0 auto;
}
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: var(--space-4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: var(--space-10);
  color: #ffffff;
}
/* Green highlight on "Lieblingsrezepte" */
.hero-highlight {
  display: inline-block;
  color: #7ec87e;
  position: relative;
}
.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 4px;
  background: #7ec87e;
}

/* SEARCH */
.search-wrap {
  max-width: 560px;
  margin: 0 auto;
}
.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.2);
  padding: var(--space-3) var(--space-5);
}
.search-box:focus-within {
  border-color: #f5c800;
  background: rgba(255,255,255,0.1);
}
.search-icon { color: rgba(255,255,255,0.45); flex-shrink: 0; }
#searchInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: #ffffff;
}
#searchInput::placeholder { color: rgba(255,255,255,0.4); }
#searchInput::-webkit-search-cancel-button { display: none; }
#searchInput::-ms-clear { display: none; }
.search-clear {
  color: rgba(255,255,255,0.45);
  padding: var(--space-1);
  flex-shrink: 0;
}
.search-clear:hover { color: #f5c800; }
.search-results-count {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  min-height: 1.4em;
}

/* ========================
   CATEGORY NAV
   ======================== */
.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-text);
}
.cat-nav-inner {
  display: flex;
  gap: 0;
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cat-nav-inner::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  padding: var(--space-4) var(--space-5);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  position: relative;
  top: 2px;
}
.cat-pill:hover {
  color: var(--color-text);
  border-bottom-color: #3a6b3a;
  background: rgba(58,107,58,0.06);
}
.cat-pill.active {
  color: #1e2a1e;
  background: #3a6b3a;
  border-bottom-color: #3a6b3a;
  top: 0;
  padding-top: calc(var(--space-4) + 2px);
}

/* ========================
   MAIN CONTENT
   ======================== */
.main-content {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: var(--space-12) var(--space-5) var(--space-20);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.recipe-section { scroll-margin-top: calc(var(--header-h) + 56px + var(--space-6)); }
.recipe-section.hidden { display: none; }

/* Section title — typographic, thick underline only */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 3px solid var(--color-text);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

/* RECIPE GRID */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

/* RECIPE CARD */
.recipe-card {
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}
.recipe-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color var(--transition);
  z-index: 1;
}
.recipe-card:hover::before {
  border-color: var(--color-primary);
}
.recipe-card:hover { background: var(--color-surface); }
.recipe-card:active { background: var(--color-surface-2); }

.card-thumb {
  aspect-ratio: 4/3;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
}
.card-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-4);
}
.card-thumb-placeholder svg { opacity: 0.25; }

.card-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-text);
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px var(--space-3);
  border-radius: 0;
}
[data-theme="dark"] .card-badge {
  background: var(--color-primary);
  color: #111111;
}

.card-body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.card-category {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text);
  line-height: 1.15;
}
.card-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.card-author {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  font-weight: 500;
}

/* Empty category */
.empty-category {
  grid-column: 1 / -1;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  padding: var(--space-12);
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-sm);
}

/* No results */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-20) var(--space-4);
  text-align: center;
  color: var(--color-text-faint);
}
.no-results p { font-size: var(--text-lg); max-width: none; font-family: var(--font-display); font-weight: 700; }
.no-results[hidden] { display: none; }

/* ========================
   MODAL
   ======================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 160ms ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--color-bg);
  border-top: 3px solid var(--color-primary);
  border-left: none;
  border-right: none;
  border-radius: 0;
  width: 100%;
  max-width: 720px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  position: relative;
  animation: slideUp 240ms cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: var(--space-6);
  }
  .modal-card {
    border: 2px solid var(--color-text);
    border-top: 3px solid var(--color-primary);
    max-height: 88dvh;
  }
}

.modal-close {
  position: sticky;
  top: var(--space-4);
  float: right;
  margin: var(--space-4) var(--space-4) calc(-1 * var(--space-8)) auto;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-text);
  background: var(--color-bg);
  color: var(--color-text);
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--color-text);
  color: var(--color-text-inverse);
}

.modal-body {
  padding: var(--space-6) var(--space-6) var(--space-12);
}

/* Modal recipe layout */
.modal-recipe-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-divider);
}
.modal-cat-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  font-family: var(--font-body);
}
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.0;
  margin-bottom: var(--space-3);
}
.modal-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.modal-author {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-faint);
}

/* Section headers inside modal */
.ingredients-section,
.steps-section,
.tip-section,
.serves-section {
  margin-bottom: var(--space-8);
}
.ingredients-section h3,
.steps-section h3,
.tip-section h3 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.ingredients-section h3::before,
.steps-section h3::before,
.tip-section h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  flex-shrink: 0;
}

/* Ingredients table */
.ingredients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.ingredients-table tr {
  border-bottom: 1px solid var(--color-divider);
}
.ingredients-table tr:last-child { border-bottom: none; }
.ingredients-table td {
  padding: var(--space-3) var(--space-2);
  vertical-align: top;
}
.ingredients-table tr:nth-child(even) td {
  background: var(--color-surface);
}
.ingredients-table td:first-child { color: var(--color-text); }
.ingredients-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
  white-space: nowrap;
  padding-left: var(--space-4);
}

/* Steps */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.step-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-text);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 800;
  border-radius: 0;
}
[data-theme="dark"] .step-num {
  background: var(--color-primary);
  color: #111111;
}
.step-text {
  font-size: var(--text-base);
  color: var(--color-text);
  padding-top: 2px;
  max-width: none;
}

/* Tip */
.tip-box {
  background: var(--color-primary-highlight);
  border-left: 3px solid var(--color-primary);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-radius: 0;
}

/* Inline link-button in servesWith */
.serves-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: #3a6b3a;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-weight: 600;
}
.serves-link-btn:hover {
  color: #7ec87e;
}

/* Serves / side-note */
.serves-note {
  background: var(--color-surface);
  border-left: 3px solid var(--color-border);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ========================
   FOOTER
   ======================== */
.site-footer {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  border-top: 2px solid var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ========================
   PRINT BUTTON
   ======================== */
.modal-print-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-6);
  background: var(--color-text);
  color: var(--color-text-inverse);
  border: 2px solid var(--color-text);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.modal-print-btn:hover {
  background: var(--color-primary);
  color: #111111;
  border-color: var(--color-primary);
}
.modal-print-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-6);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 480px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .modal-body {
    padding: var(--space-5) var(--space-4) var(--space-12);
  }
  .modal-title {
    font-size: var(--text-xl);
  }
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
}

/* ========================
   PRINT STYLES — A4
   Schwarz/Weiß, Gelb sparsam
   ======================== */
@media print {
  /* Alles außer dem Druck-Container ausblenden */
  body > *:not(#printTarget) { display: none !important; }
  #printTarget { display: block !important; }

  #printTarget {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 11pt;
    color: #111111;
    background: #ffffff;
    line-height: 1.6;
    margin: 0;
    padding: 0;
  }

  .print-page {
    width: 210mm;
    min-height: 297mm;
    padding: 18mm 20mm 24mm 20mm;
    box-sizing: border-box;
    page-break-after: always;
  }

  .print-header {
    border-bottom: 3pt solid #111111;
    padding-bottom: 6mm;
    margin-bottom: 8mm;
  }
  .print-book-title {
    font-size: 7.5pt;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #999999;
    margin-bottom: 3mm;
    font-weight: bold;
  }
  .print-cat-tag {
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #888888;
    margin-bottom: 2mm;
  }
  .print-title {
    font-size: 28pt;
    font-weight: 900;
    color: #111111;
    line-height: 1.0;
    margin-bottom: 2mm;
    letter-spacing: -0.02em;
  }
  .print-subtitle {
    font-size: 12pt;
    color: #555555;
    margin-bottom: 1mm;
  }
  .print-author {
    font-size: 9pt;
    color: #999999;
  }

  .print-section-title {
    font-size: 7.5pt;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #111111;
    font-weight: bold;
    margin: 8mm 0 3mm 0;
    border-bottom: 1.5pt solid #111111;
    padding-bottom: 1.5mm;
    padding-left: 4mm;
    border-left: 4pt solid #f5c800;
  }

  .print-ingredients {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin-bottom: 2mm;
  }
  .print-ingredients tr {
    border-bottom: 0.5pt solid #dddddd;
  }
  .print-ingredients td {
    padding: 1.8mm 1mm;
    vertical-align: top;
  }
  .print-ingredients td:last-child {
    text-align: right;
    font-weight: bold;
    white-space: nowrap;
    padding-left: 8mm;
  }
  .print-ingredients tr:nth-child(even) td {
    background: #f8f8f8;
  }

  .print-steps { margin-bottom: 2mm; }
  .print-step {
    display: flex;
    gap: 4mm;
    margin-bottom: 3mm;
    align-items: flex-start;
  }
  .print-step-num {
    flex-shrink: 0;
    width: 6mm;
    height: 6mm;
    background: #111111;
    color: #ffffff;
    font-size: 7.5pt;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5mm;
  }
  .print-step-text {
    font-size: 10.5pt;
    line-height: 1.55;
  }

  .print-tip {
    border-left: 3pt solid #f5c800;
    padding: 3mm 4mm;
    margin-top: 5mm;
    background: #fdfbee;
    font-size: 10pt;
  }
  .print-tip-label {
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #111111;
    font-style: normal;
    display: block;
    margin-bottom: 1.5mm;
    font-weight: bold;
  }

  .print-serves {
    margin-top: 4mm;
    font-size: 9.5pt;
    color: #666666;
    border-top: 0.5pt solid #cccccc;
    padding-top: 3mm;
  }

  .print-footer {
    position: fixed;
    bottom: 12mm;
    left: 20mm;
    right: 20mm;
    display: flex;
    justify-content: space-between;
    font-size: 7.5pt;
    color: #bbbbbb;
    border-top: 0.5pt solid #eeeeee;
    padding-top: 2mm;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
}

/* Hidden print container (always in DOM, invisible on screen) */
#printTarget {
  display: none;
}

/* ========================
   CARD — GETEILTE KLICKZONEN
   ======================== */

/* Die Karte selbst ist kein Button mehr – nur visueller Container */
.recipe-card {
  cursor: default;
}
.recipe-card:hover::before { border-color: transparent; }

/* Foto-Bereich: eigener Hover-State */
.card-thumb-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  cursor: zoom-in;
  aspect-ratio: 4/3;
  background: var(--color-surface);
}
.card-thumb-link img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter 200ms ease, transform 200ms ease;
  display: block;
}
.card-thumb-link:hover img {
  filter: grayscale(0%);
  transform: scale(1.03);
}
.card-thumb-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 0px solid var(--color-primary);
  transition: border-width 150ms ease;
  pointer-events: none;
}
.card-thumb-link:hover::after,
.card-thumb-link:focus-visible::after {
  border-width: 3px;
}

/* Foto-Indikator (Icon + Anzahl) */
.photo-indicator {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  padding: 4px 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 2px;
  pointer-events: none;
}
.photo-indicator svg { flex-shrink: 0; }

/* Placeholder (kein Bild) */
.card-thumb-placeholder-box {
  aspect-ratio: 4/3;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.card-thumb-placeholder-box svg { opacity: 0.2; }

/* Textbereich-Link → Rezept-Modal */
.card-body-link {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  flex: 1;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.card-body-link:hover {
  background: var(--color-surface);
}
.card-body-link:hover .card-title {
  color: var(--color-primary);
}

/* ========================
   LIGHTBOX / DIASHOW
   ======================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 180ms ease;
}
.lightbox-overlay[hidden] { display: none; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 10;
}
.lightbox-title-area {}
.lightbox-recipe-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  text-transform: uppercase;
}
.lightbox-counter {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.lightbox-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 160ms ease, border-color 160ms ease;
}
.lightbox-close-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

/* Image stage */
.lightbox-stage {
  position: relative;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox-img {
  max-width: min(90vw, 1000px);
  max-height: 72dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  animation: lbImgIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid rgba(255,255,255,0.08);
}
@keyframes lbImgIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* Arrows */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  z-index: 10;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.lightbox-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.45);
}
.lightbox-btn:active { transform: translateY(-50%) scale(0.95); }
.lightbox-btn--prev { left: var(--space-5); }
.lightbox-btn--next { right: var(--space-5); }
.lightbox-btn[disabled] { opacity: 0.2; pointer-events: none; }

/* Dot indicators */
.lightbox-dots {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  padding: var(--space-4) 0;
  z-index: 10;
}
.lightbox-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,0.3);
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.lightbox-dot.active {
  background: var(--color-primary);
  transform: scale(1.3);
}
.lightbox-dot:hover { background: rgba(255,255,255,0.6); }

/* "Zum Rezept"-Footer innerhalb Lightbox */
.lightbox-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: var(--space-6);
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  z-index: 10;
}
.lightbox-recipe-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #111111;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: background 160ms ease, transform 120ms ease;
}
.lightbox-recipe-btn:hover {
  background: #e0b400;
  transform: translateY(-1px);
}
.lightbox-recipe-btn:active { transform: translateY(0); }
.lightbox-recipe-btn svg { flex-shrink: 0; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .lightbox-img { max-height: 60dvh; max-width: 96vw; }
  .lightbox-btn { width: 40px; height: 40px; }
  .lightbox-btn--prev { left: var(--space-3); }
  .lightbox-btn--next { right: var(--space-3); }
  .lightbox-recipe-name { font-size: var(--text-base); }
}
