/* RESET */

/* ================== WEBFONTS ================== */

/* Cooper Black Regular */
@font-face {
  font-family: 'Cooper Black';
  src: url('../fonts/cooper-black/COOPBL.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Verdana Pro Regular */
@font-face {
  font-family: 'Verdana Pro';
  src: url('../fonts/verdana-pro-cond/VerdanaPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Verdana Pro Bold */
@font-face {
  font-family: 'Verdana Pro';
  src: url('../fonts/verdana-pro-cond/VerdanaPro-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* PF Reminder Pro Bold (für Schritt-Zahlen) */
@font-face {
  font-family: 'PF Reminder Pro';
  src: url('../fonts/pf-reminder-pro-bold/PF Reminder Pro Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================ */

/* Basis-Text */
body, p, li, input, textarea {
  font-family: 'Verdana Pro', Verdana, sans-serif;
  font-weight: 400; 
}

/* Überschriften: nur h1 und h2 in Cooper Black */
h1, h2 {
  font-family: 'Cooper Black', Georgia, serif;
  font-weight: 400; 
}

/* Alle kleineren Überschriften (h3–h6) in Verdana Pro Bold */
h3, h4, h5, h6 {
  font-family: 'Verdana Pro', Verdana, sans-serif;
  font-weight: 700; 
}

/* Buttons / wichtige Controls in Verdana Pro Bold */
button, .btn, .cookmode-btn, .copy-btn {
  font-family: 'Verdana Pro', Verdana, sans-serif;
  font-weight: 700; 
}

:root{
  /* Basis-Schriftgröße global steuerbar */
  --base-font-size: 16px;
  --cook-font-size: var(--base-font-size);
}

/* Browser-Basis auf Variable setzen */
html{ font-size: var(--base-font-size); }

html.cook-zoom{
  font-size: var(--cook-font-size, var(--base-font-size));
}

/* (Legacy) Floating-Widget – wird aktuell nicht verwendet */
.fontsize-controls{
  position: fixed;
  right: 20px;
  bottom: 95px;            
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  padding: 8px 10px;
}

.fontsize-controls button{
  background: var(--btn-bg);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  font: inherit;
  font-weight: 700;
}

.fontsize-controls button:hover{
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.fontsize-controls .fs-indicator{
  min-width: 3.6ch;
  text-align: center;
  font-weight: 700;
}

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

body {
  background: #f9f9f9;
  color: #000;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 20px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.08);
  z-index: 10;
}

header h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

header h1 a {
  text-decoration: none;
  color: inherit;
}

/* NAV */
nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
}

nav a {
  text-decoration: none;
  font-size: 18px;
  color: #000;
  transition: .2s ease;
}

nav a:hover {
  transform: scale(1.07);
  color: #6a6a6a;
}

nav a.active {
  color: var(--btn-primary);
  font-weight: 700;          
  border-bottom: 3px solid var(--btn-primary);
  padding-bottom: 4px;
}

nav a.active:hover { color: var(--btn-primary-hover); }

/* STARTSEITE */
.welcome-page {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  text-align: center;
}

/* Nur Startseite (welcome-page): 2x2 Grid */
.welcome-page .grid {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  gap: 24px;
}

.welcome-page .recipe-card {
  max-width: none; /* Karten füllen die Spalte */
}

/* Mobil bleibt einspaltig */
@media (max-width: 600px) {
  .welcome-page .grid {
    grid-template-columns: 1fr;
    max-width: 340px;
  }
}

.welcome-container {
  max-width: 800px;
}

.welcome-container h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.welcome-container p {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* REZEPTSEITE WRAPPER */
.recipe-page {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 40px 20px;
}

.recipe-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.recipe-container h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.recipe-container h3 {
  font-size: 1.3rem;
  margin: 5px 0 5px;
  text-align: left;
}

.recipe-container h4 {
  font-size: 1rem;
  margin: 10px 0;
  text-align: left;
}

.recipe-container p { 
  margin: 0 0 12px;
  line-height: 1.6;
}
.recipe-container p:last-child {
  margin-bottom: 0;
}

/* HERO */
.hero-image {
  width: 100%;
  aspect-ratio: 1 / 1;      
  object-fit: cover;        
  object-position: center;  
  border-radius: 8px;
  margin: 20px 0;
}

/* INTRO */
.recipe-intro {
  text-align: center;
  font-style: italic;
  margin: 15px 0 22px;
  color: #444;
  line-height: 1.6;
}

/* META – dezente Pillen */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  max-width: 640px;
  margin: 0 auto 22px;
  font-size: .95rem;
  color: #444;
  text-align: center;
}

.meta-grid div {
  background: #f2f2f2;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03) inset;
}

.meta-grid strong {
  color: #222;
}

/* BUTTON DESIGN (einheitlich, borderless) */
:root{
   --base-font-size: 16px;
  --cook-font-size: var(--base-font-size);

  --btn-radius: 10px;
  --btn-shadow: 0 2px 6px rgba(0,0,0,.08);
  --btn-bg: #efefef;
  --btn-bg-hover: #e6e6e6;

  /* Primärfarbe – wird per Season-Klasse überschrieben */
  --btn-primary: #FFB412;
  --btn-primary-hover: #ffca4a;
}

button {
  font-family: inherit;
}

/* Portionen/Copy – sekundäre Buttons */
.portion-control {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: left;
  margin: 18px 0 20px;
}

.portion-control button {
  background: var(--btn-bg);
  color: #111;
  border: none;
  border-radius: var(--btn-radius);
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: transform .06s ease, background .15s ease;
}

.portion-control button:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.portion-control button:active {
  transform: translateY(0);
}

.copy-btn {
  background: var(--btn-bg);
  color: #111;
  border: none;
  border-radius: var(--btn-radius);
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: background .15s ease, transform .06s ease;
}

.copy-btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

/* Kochmodus – primärer Button */
.cookmode-btn {
  background: var(--btn-primary);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1.15rem;
  cursor: pointer;
  margin: 26px auto 32px;
  display: block;
  box-shadow: var(--btn-shadow);
  transition: transform .06s ease, background .15s ease;
}

.cookmode-btn:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
}

.cookmode-btn:active {
  transform: translateY(0);
}

/* ZUTATENLISTE */
#zutaten {
  list-style: none;
  padding-left: 0;
  margin: 0 auto 20px;
  text-align: left;
}

#zutaten li {
  margin-bottom: 8px;
  font-size: 1rem;
  padding-left: 25px;
  padding-right: 25px;
}

/* ZUTATEN | UTENSILIEN nebeneinander */
.ingredients-wrap {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}

.ingredients-wrap h3 {
  margin-top: 0;
}

.utensils-col {
  text-align: left;
}

.ingredients-col ul,
.utensils-col ul {
  list-style: none;
  padding-left: 0;
  margin-left: 1.2em;
  text-align: left;
}

.ingredients-col li,
.utensils-col li {
  margin-bottom: 0.3em;
  padding-right: 25px;
}

/* RESPONSIVE zwei Spalten */
@media (max-width: 860px) {
  .ingredients-wrap {
    grid-template-columns: 1fr;
  }
}

/* ZUBEREITUNG – stabiles Grid */
#zubereitung {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
  counter-reset: step;
  text-align: left;
  align-items: stretch;
  margin-bottom: 50px;
}

#zubereitung li {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 12px;
  list-style: none;
  font-size: 1rem;
  color: #000;
  background: #fff;
}

/* >>>>>>>>>> NEU: Schritt-Zahlen im Kochbuch-Stil (ohne Kreis) <<<<<<<<<< */
#zubereitung li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  width: auto;
  height: auto;
  background: none;         
  border-radius: 0;
  color: var(--btn-primary); 
  font-family: 'PF Reminder Pro', 'Verdana Pro', Verdana, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;       
  line-height: 1;
  margin-top: 2px;        
  text-align: left;
}

#zubereitung .step-text {
  min-width: 0;
}

#zubereitung li,
#zubereitung li * {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Zahl + Einheit zusammenhalten */
.scaled {
  display: inline;
  white-space: nowrap;
}

/* MODALS (Kochmodus & Done) */
.modal.fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  justify-content: center;
  align-items: flex-start;
  z-index: 999;
}

.modal-inner {
  background: #fff;
  width: 90%;
  max-width: 800px;
  height: 80vh;
  margin: 40px auto;
  padding: 2rem; 
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.modal-inner h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

#modal-content {
  width: 100%;
  max-width: 600px;
  flex: 1;
  overflow-y: auto;
  margin-bottom: 70px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-buttons {
  position: absolute;
  bottom: 1.25rem; 
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: .9rem;     
}

.modal-buttons button {
  background: var(--btn-bg);
  color: #111;
  border: none;
  border-radius: var(--btn-radius);
  padding: .625rem .95rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: background .15s ease, transform .06s ease;
}

.modal-buttons button:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.modal-buttons button:active {
  transform: translateY(0);
}

/* Fortschrittskreis – rem-basiert */
#step-progress {
  position: relative;
  width: 7.5rem;  
  height: 7.5rem;
  margin-bottom: 1.25rem;
}

#step-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

#step-progress circle {
  fill: none;
  stroke-width: .5rem; 
}

#step-progress .bg { stroke: #eee; }

#step-progress .progress {
  stroke: var(--btn-primary); 
  stroke-linecap: round;
  stroke-dasharray: 314;   
  stroke-dashoffset: 314;
  transition: stroke-dashoffset .4s;
  opacity: 0;
}

#step-progress.show-progress .progress{
  opacity: 1;               
}

/* Zahl im Kreis */
#step-count{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1rem; /* skaliert mit cook-zoom */
}

/* TIMER (im Kochmodus unter Schritten mit data-timer) */
.timer-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: min(100%, 360px);
  margin: 12px auto 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: #f4f7f5;
  box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
}

.timer-panel .timer-display {
  /* skaliert jetzt sichtbar mit cook-zoom (rem) UND leicht mit viewport */
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #000000;
}

.timer-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;         
}

.timer-buttons button {
  background: var(--btn-bg);
  color: #111;
  border: none;
  border-radius: .625rem;    
  padding: .55rem 1rem;      
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  font: inherit;               
  font-weight: 600;
  line-height: 1.05;
  transition: transform .06s ease, background .15s ease;
}

.timer-buttons button:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.timer-buttons button:active { transform: translateY(0); }

/* optional: primäre Timer-Aktion (Start/Weiter) */
.timer-buttons .btn-primary { background: var(--btn-primary); color: #000; }
.timer-buttons .btn-primary:hover { background: var(--btn-primary-hover); }

/* Zustände (werden per JS gesetzt) */
.timer-panel.running .timer-display { color: #000000; }
.timer-panel.paused .timer-display {
  color: #000000;
  outline: 2px dashed var(--btn-primary);
  outline-offset: 4px;
}
.timer-panel.finished {
  background: #fa978a;
  color: #111;
  border-color: #eb6d5d;
}
.timer-panel.finished .timer-buttons button { background: #fff; color: #333; }

/* RELATED */
.related { margin-top: 40px; text-align: left; }
.related p {
  padding-left: 25px;
  padding-right: 25px;
  margin: 6px 0 75px;
  line-height: 1.6;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 15px;
  justify-items: stretch;
  align-items: stretch;
}
.related-grid .recipe-card { width: 100%; text-align: left; }
.related-grid .recipe-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
}
.related-grid .recipe-card h3 { font-size: .95rem; padding: 8px; text-align: center; }

/* KACHELÜBERSICHT */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  justify-content: center;
  padding: 40px 0;
  max-width: 960px;
  margin: 0 auto;
}
.grid h2 { 
  text-align: center; 
}

.recipe-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: .25s;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 280px;
}

.recipe-card img {
  width: 100%;
  aspect-ratio: 1 / 1;     
  object-fit: cover;       
  object-position: center; 
  display: block;
}

.recipe-card h3 {
  padding: 12px;
  font-size: 1rem;
  color: #000;
  text-align: center;
  font-weight: 700;
  background: #fff;
}
.recipe-card a { text-decoration: none; color: inherit; display: block; }
.recipe-card:hover { transform: translateY(-5px); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* RESPONSIVE GRID */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; max-width: 300px; }
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background: #333;
  color: #fff;
  margin-top: auto;
}

/* Modal-Listen ohne Punkte */
#modal-content ul { list-style: none; padding-left: 0; margin-left: 0; }

/* Done-Modal gleiche Transparenz wie Kochmodus */
#done-modal.modal.fullscreen { background: rgba(0,0,0,.6); }

/* NÄHRWERTE */
.nutrition-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}
.nutrition-table th,
.nutrition-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: .98rem;
}
.nutrition-table tr:nth-child(even) td,
.nutrition-table tr:nth-child(even) th { background: #fafafa; }
.nutrition-table th { width: 55%; color: #333; font-weight: 600; }
.nutrition-table td { text-align: right; color: #000; }
.nutrition-note { margin-top: 8px; color: #666; font-size: .9rem; }

/* Kochmodus-Schritte im Modal: keine Standard-Punkte */
#modal-content li { list-style: none !important; margin-left: 0; padding-left: 0; }
#modal-content li::before { content: none !important; }

/* Kochmodus-Portionen-Leiste (ohne Input) */
.cook-servings-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem 0;
}
.cook-servings-btn {
  border: none;
  border-radius: .6rem;
  padding: .45rem .8rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  cursor: pointer;
  font: inherit;
}
.cook-servings-text {
  display: inline-block;
  min-width: 9ch;
  text-align: center;
  font-weight: 600;
}

/* Back-to-Top Button */
#backToTop {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-size: 1.5rem;
  line-height: 1;
  background: var(--btn-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: background 0.2s ease, transform 0.1s ease;
}

#backToTop {
  padding-bottom: 5px;
}

#backToTop:hover { 
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
}

/* ========== Kochmodus: Schriftgrößen-Controls (integriert über dem Kreis) ========== */
.cook-fs-controls{
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 0.5rem 0.625rem;
  margin: 0 auto 10px;
  font-size: 1rem;
  line-height: 1;
}
.cook-fs-controls button{
  background: var(--btn-bg);
  color:#111; border:none; border-radius:10px;
  padding: .4rem .6rem; cursor:pointer; box-shadow: var(--btn-shadow);
  font: inherit; font-weight:700;
}
.cook-fs-controls button:hover{ background: var(--btn-bg-hover); transform: translateY(-1px); }
.cook-fs-controls .fs-indicator{ min-width:3.6ch; text-align:center; font-weight:700; }

/* Bei sehr schmalen Geräten etwas kompakter */
@media (max-width: 380px){
  .cook-fs-controls{ gap:.25rem; padding:.4rem .5rem; }
  .cook-fs-controls button{ padding:.35rem .5rem; }
}

/* ================= SEASON COLORS ================= */
body.fruehling {
  --btn-primary: #99bf9b;
  --btn-primary-hover: #82a684;
}

body.sommer {
  --btn-primary: #f3c027;
  --btn-primary-hover: #ffd94d;
}

body.herbst {
  --btn-primary: #ed6d28;
  --btn-primary-hover: #ff8145;
}

body.winter {
  --btn-primary: #c9e7f2;
  --btn-primary-hover: #b0d9e9;
}

/* ====== Sub-Rezepte (nur aktiv, wenn recipe.js subRecipes rendert) ====== */

/* Abstand zwischen Subrezept-Boxen */
.sub-recipe + .sub-recipe { margin-top: 40px; }

/* Subrezept-Titel (z. B. "Honig-Senf-Dressing") in Cooper Black */
.sub-recipe > h3 {
  font-family: 'Cooper Black', Georgia, serif;
  font-weight: 400;
  font-size: 2rem;       
  text-align: left;
  margin: 0 0 10px;
}

/* Danach: alle h3 im Subrezept (Zutaten, Utensilien, Zubereitung, Nährwerte) wie im Hauptrezept */
.sub-recipe h3:not(:first-child) {
  font-family: 'Verdana Pro', Verdana, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;       
  margin: 5px 0 5px;     
  text-align: left;
}

/* Zutaten-/Utensilien-Layout exakt wie beim Hauptrezept */
.sub-recipe .ingredients-wrap {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}
.sub-recipe .ingredients-col ul,
.sub-recipe .utensils-col ul { list-style: none; padding-left: 0; margin-left: 0; }
.sub-recipe .ingredients-col li,
.sub-recipe .utensils-col li {
  margin-bottom: 8px;
  font-size: 1rem;
  padding-left: 25px;
  padding-right: 25px;
}

/* Zubereitung wie #zubereitung */
.sub-recipe ol {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
  counter-reset: step;
  text-align: left;
  align-items: stretch;
  margin-bottom: 50px;     /* gleicher Abstand nach unten wie #zubereitung */
}
.sub-recipe ol li {
  width: 100%;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 12px;
  list-style: none;
  font-size: 1rem;
  color: #000;
  background: #fff;
}

/* >>>>>>>>>> NEU: Schritt-Zahlen im Kochbuch-Stil (ohne Kreis) für Subrezepte <<<<<<<<<< */
.sub-recipe ol li::before {
  counter-increment: step;
  content: counter(step);
  display: block;
  width: auto;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--btn-primary); 
  font-family: 'PF Reminder Pro', 'Verdana Pro', Verdana, sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  margin-top: 2px;
  text-align: left;
}

.sub-recipe .step-text { min-width: 0; }
.sub-recipe ol li,
.sub-recipe ol li * { white-space: normal; word-break: normal; overflow-wrap: break-word; hyphens: auto; }

/* Nährwert-Tabelle & -Note wie im Hauptrezept */
.sub-recipe .nutrition-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}
.sub-recipe .nutrition-table th,
.sub-recipe .nutrition-table td { padding: 12px 14px; text-align: left; font-size: .98rem; }
.sub-recipe .nutrition-table tr:nth-child(even) td,
.sub-recipe .nutrition-table tr:nth-child(even) th { background: #fafafa; }
.sub-recipe .nutrition-table th { width: 55%; color: #333; font-weight: 600; }
.sub-recipe .nutrition-table td { text-align: right; color: #000; }


.step-image{
  display:block;
  width:50%;
  height:auto;
  margin-top:10px;
  border-radius:8px;
}



.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.feature img {
  width: 100px;
  height: auto;
  flex-shrink: 0;
}

.feature p {
  margin: 0;
  line-height: 1.4;
}


body {
  position: relative;
  margin: 0;
  padding: 0;
  background: url("/assets/img/startseite/startseite-bg.jpg") center center repeat;
  background-attachment: fixed;
  background-position: center;
  background-size: cover; 
}

body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.96); 
  z-index: -1;
}


/* Rezepttitel in der weißen Box – sicherer Umbruch */
#recipe-title{
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1.12;
  margin: 0 0 10px;
  overflow-wrap: anywhere;   
  word-break: break-word;    
  hyphens: auto;        
}



/* Kochmodus: nur Text über Variable skalieren */
.cookmode { --cook-scale: 1; }

/* Fließtext, Listen, Schritttexte */
.cookmode #modal-content :where(p, li, dd, dt, .step-text){
  font-size: calc(1rem * var(--cook-scale));
  line-height: 1.5;   /* bleibt gleich */
}

/* Überschriften im Kochmodus */
.cookmode #modal-content :where(h2, h3){
  font-size: calc(1.25rem * var(--cook-scale));
  line-height: 1.2;   /* bleibt konstant */
}

/* Zutaten- und Utensilien-Listen */
.cookmode #modal-content .ingredients-col li,
.cookmode #modal-content .utensils-col li{
  font-size: calc(1rem * var(--cook-scale));
}

/* NICHT skalieren: Buttons, Fortschrittsring, UI */
.cookmode :where(.cook-fs-controls, .modal-buttons button, #step-progress, .timer-buttons button){
  font-size: 1rem;
  transform: none;
}

/* Fließtext, Listen, Schritttexte UND Zutaten-Gruppen (h4) */
.cookmode #modal-content :where(p, li, dd, dt, .step-text, h4){
  font-size: calc(1rem * var(--cook-scale));
  line-height: 1.5;   /* fix, bleibt gleich */
}


/* H3 "Benötigte Utensilien" nur im Kochmodus verstecken */
.cookmode #modal-content .cook-hide { 
  display: none !important; 
}