/* /layout/backecke_detail_styles.css 
   backecke – detail styles (aus art_detail_app2.php extrahiert)
   Scope: #maincontent & .recipe-sheet
   HINWEIS: Globales body-Override wurde bewusst entfernt, um das Hauptlayout (backecke_main_styles.css) nicht zu überschreiben.
*/
body { background:#fff !important; }

#maincontent .quicklinks-scroll{ font-family: 'Inter'; }

#maincontent .recipe-sheet .recipe-head,
#maincontent .recipe-sheet .section-card,
#maincontent .recipe-sheet .stat-variant{
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-left: clamp(.2rem, .6vw, .75rem);
  padding-right: clamp(.2rem, .6vw, .75rem);
}
#maincontent .recipe-sheet .vote-card,
#maincontent .recipe-sheet .metric-box{ background: none; border:none; }
#maincontent .recipe-sheet .section-card .border-top{ border-top:1px dashed rgba(0,0,0,.08) !important; }

#maincontent .recipe-head {
  background: transparent;
  border-radius:1.25rem;
  padding:1.25rem 1.25rem .75rem;
  box-shadow:none;
  border: 0;
}
#maincontent .recipe-head .display-title{
  font-weight:900; letter-spacing:.2px;
  font-size: clamp(2rem, 2.6vw + 1rem, 3.2rem);
  margin: .15rem 0 .65rem 0; line-height:1.05;
}
#maincontent .recipe-breadcrumb .breadcrumb{ --bs-breadcrumb-divider: "›"; margin:0; }
#maincontent .meta-badges{ display:flex; flex-wrap:wrap; gap:.5rem .6rem; }
#maincontent .meta-badges .badge{
  display:inline-flex; align-items:center; gap:.45rem;
  background:rgba(255,255,255,.8);
  color:#444; font-weight:700;
  border:1px solid rgba(0,0,0,.06);
  padding:.6rem .9rem; border-radius:999px; font-size:0.85rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.04);
  backdrop-filter: blur(2px);
}
#maincontent .meta-badges .bi{ color: var(--bs-primary); }

#maincontent .media-wrap{
  position:relative; border-radius:0.6rem;
  overflow:hidden; margin-top: .75rem;
  box-shadow: 3px 3px 14px rgba(0,0,0,0.24);
  border: 1px solid rgb(0 0 0 / 13%);
}
#maincontent .media-kenburns{ position: relative; width:100%; height: clamp(280px, 44vh, 620px); overflow:hidden; }
#maincontent .media-kenburns img{
  position:absolute; inset:-3%;
  width:106%; height:106%; object-fit:cover;
  transform: scale(1.06);
  animation: kb-slow 22s ease-in-out infinite alternate; will-change: transform;
}

/* ============================================
   Portrait-Hero (Detailansicht)
   - mind. 25% höher als breit (PHP: media-wrap--portrait)
   - max. 500px hoch
   - Breite im Verhältnis zum Bild (per max-width in PHP)
   ============================================ */

#maincontent .media-wrap--portrait{
  /* Portrait: gleiche Optik wie Standardbild, aber in der Breite begrenzt – linksbündig */
  /* keine auto-Margins mehr → linksbündig */
}

/* Bühne: Höhe wird über padding-top (inline) gesteuert */
#maincontent .media-wrap--portrait .media-kenburns{
  height:auto !important;   /* überschreibt clamp(...) */
  overflow:hidden;
}

/* Bild: Portrait → object-fit: contain, leichter Zoom für Ken-Burns */
#maincontent .media-wrap--portrait .media-kenburns img{
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  transform: scale(1.03);   /* leicht eingezoomt, damit Bewegung bleibt */
}


@keyframes kb-slow {
  0%   { transform: scale(1.06) translate3d(0,0,0); }
  50%  { transform: scale(1.10) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.08) translate3d(1.5%, 1%, 0); }
}
#maincontent .media-gradient{
  position:absolute; inset:0; pointer-events:none;
  background: radial-gradient(1200px 50% at 50% -10%, rgba(0,0,0,.35), transparent 60%),
              linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.35) 100%);
  background: none !important;
}
#maincontent .zoom-fab{
  position:absolute; right:.85rem; bottom:.85rem; z-index:2;
  display:inline-flex; align-items:center; gap:.5rem;
  border-radius:999px; padding:.5rem .85rem; font-weight:700;
  border:1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
}
#maincontent .photo-credit{
  position:absolute; left:.95rem; bottom:.9rem; z-index:2;
  color:#fff; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  font-weight:600; letter-spacing:.2px;
}

#maincontent .quick-actions{
  display:flex; flex-wrap:wrap; gap:.6rem .6rem;
  padding: .85rem 1rem 1.1rem;
}
#maincontent .quick-actions .btn{
  border-radius: 999px !important;
  padding: .55rem 1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
  will-change: transform;
}
#maincontent .quick-actions .btn-outline-secondary{
  background:#fff;
  border-color: rgba(0,0,0,.12);
}
#maincontent .quick-actions .btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.06); }

/* Hover-Stil für "PDF | Drucken" und "Merken" */
#maincontent .quick-actions .btn-outline-secondary:hover,
#maincontent .quick-actions .btn-outline-secondary:focus{
  background: #666666;
  color: #ffffff;
  border-color: #444444;
  text-decoration:none;
}

#maincontent .section-card{ background:transparent; border-radius:1rem; border:0; box-shadow:none; padding: 1.2rem 1.2rem 1rem; }

#maincontent .ingredients-head{
  display:grid; grid-template-columns:auto 1fr; align-items:center; gap:.75rem;
}
@media (min-width: 1200px){ #maincontent .ingredients-head .servings-tools{ justify-self:center; } }
@media (max-width: 991.98px){
  #maincontent .ingredients-head{ grid-template-columns:1fr auto; }
  #maincontent .ingredients-head .servings-tools{ justify-self:end; }
}

#maincontent .ingredients-table.table{
  --bs-table-border-color: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-striped-color: inherit;
  margin-bottom:.25rem;
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.15rem);
}
#maincontent .ingredients-table :is(th, td){ border:0 !important; }
#maincontent .ingredients-table thead th{ color:#666; font-weight:700; }
#maincontent .ingredients-table td, #maincontent .ingredients-table th{ vertical-align: middle; }
#maincontent .ingredients-table td.qty{ width: 92px; font-weight:800; }
#maincontent .ingredients-table td.unit{ width: 80px; color:#666; }
#maincontent .ingredients-table tbody tr{ transition: background-color .15s ease; }
#maincontent .ingredients-table tbody tr:hover{ background: rgba(0,0,0,.025); }
#maincontent .ingredients-table .bi-info-circle-fill { color: #b5b5b5; display: none; } 

#maincontent .servings-tools{
  --h: 36px;
  display:inline-flex; align-items:center; gap:.35rem;
  border:1px solid rgba(0,0,0,.08);
  background:#fff; border-radius:999px;
  padding: .15rem .35rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
#maincontent .servings-tools .input-group-text{ border:0; padding:.1rem .5rem; background:transparent; font-weight:800; color:#555; }
#maincontent .servings-tools .btn{
  height:var(--h); width:var(--h); display:inline-flex; align-items:center; justify-content:center;
  border:0; background:#f7f7f7; border-radius:999px;
}
#maincontent .servings-tools .btn:active{ transform: translateY(1px); }
#maincontent .servings-tools .form-control{
  height:var(--h); width:68px; text-align:center; border:0; box-shadow:none; font-weight:900; padding:0 .25rem;
}
#maincontent .servings-tools .form-control:focus{ outline:none; box-shadow:none; }
#maincontent .servings-tools .unit-tail{ border:0; background:transparent; font-weight:800; color:#555; padding:.1rem .6rem; }

.variant-tag{ display:inline-block; font-weight:800; font-size:.75rem; background:#fff; border:1px solid #eee; padding:.2rem .5rem; border-radius:999px; color:#666; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.nutr-wrapper{ display:grid; gap:1rem; background: linear-gradient(180deg, #fff, #fbfbfb); width:100%; }
@media (min-width: 1200px){ .nutr-wrapper{ width:66%; } }
@media (min-width: 1400px){ .nutr-wrapper{ width:50%; } }

.nutr-card{ padding:1rem; }
.nutr-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:.75rem; }
@media (max-width: 575.98px){ .nutr-grid{ grid-template-columns: repeat(2,1fr); } }
.nutr-item{ text-align:center; }
.nutr-item .v{ font-weight:900; font-size:clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem); line-height:1.1; }
.nutr-item .l{ color:#6b7280; font-size:.9rem; }
.nutr-v1 .nutr-item{ padding:.8rem; background:#fff; border-radius:16px; }
.nutr-v1 .nutr-item i{ display:block; font-size:1.2rem; color:var(--bs-primary); margin-bottom:.35rem; }

.prep-steps .prep-list{ list-style:none; padding:0; margin:.35rem 0 0 0; }
.prep-steps .prep-item{ display:block; background:transparent; border:0; padding:.45rem 0; margin:0; }
.prep-steps .prep-text{ margin:0; line-height:1.65; font-size: clamp(1rem, 0.96rem + 0.5vw, 1.2rem); }

/* Strukturierte Zubereitungsschritte (Timeline-Style) */
.prep-steps .prep-step-list{
  list-style:none;
  padding:0;
  margin:1rem 0 0;
  counter-reset: prep-step;
}

.prep-steps .prep-step{
  position:relative;
  padding:1.1rem 0 1.1rem 2.75rem;
  border-top:1px solid rgba(0,0,0,0.04);
}

.prep-steps .prep-step:first-child{
  border-top:0;
}

/* Nummern-Badge (1, 2, 3, ...) links */
.prep-steps .prep-step::before{
  counter-increment: prep-step;
  content: counter(prep-step);
  position:absolute;
  left:0;
  top:1.1rem;
  width:1.9rem;
  height:1.9rem;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  font-size:.9rem;
  background:var(--bs-primary);
  color:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.12);
}

@media (max-width: 575.98px){
  .prep-steps .prep-step{
    padding-left:2.4rem;
  }
  .prep-steps .prep-step::before{
    width:1.6rem;
    height:1.6rem;
    font-size:.8rem;
  }
}

/* Kopfbereich: Label + Zeit-Badge */
.prep-steps .prep-step-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  margin-bottom:.25rem;
}

.prep-steps .prep-step-label{
  font-size:.85rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#6b7280;
}

.prep-steps .prep-step-time{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  font-size:.85rem;
  padding:.15rem .55rem;
  border-radius:999px;
  background:rgba(0,0,0,0.03);
  color:#4b5563;
}

/* Haupttext */
.prep-steps .prep-step-body{
  font-size:clamp(1rem, 0.96rem + 0.5vw, 1.2rem);
  line-height:1.65;
}

.prep-steps .prep-step-body p{
  margin-bottom:.5rem;
}

/* Tipp-Box */
.prep-steps .prep-step-tip{
  margin-top:.4rem;
  padding:.6rem .8rem;
  border-radius:10px;
  background:#fefce8;
  font-size:.9rem;
  color:#92400e;
  display:flex;
  align-items:flex-start;
  gap:.4rem;
}

.prep-steps .prep-step-tip i{
  margin-top:.1rem;
}

/* Medien-Galerie pro Schritt */
.prep-steps .prep-step-media{
  margin-top: .6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* Einzelnes Medien-Item pro Schritt (Bild oder Video) */
.prep-steps .prep-step-media-item{
  /* nicht zu groß – skaliert mit Viewportbreite */
  flex: 0 1 clamp(140px, 30vw, 260px);
  max-width: clamp(140px, 30vw, 260px);
}

/* Klickfläche für Bild-Zoom (Button ohne sichtbare Ränder) */
.prep-steps .step-media-zoom{
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

/* Bild selbst – abgerundet + leichter Schatten */
.prep-steps .step-media-zoom img{
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

/* Tastatur-Fokus klar sichtbar */
.prep-steps .step-media-zoom:focus-visible{
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Bildunterschrift */
.prep-steps .prep-step-media-item figcaption{
  margin-top: .15rem;
  font-size: .8rem;
  color: #6b7280;
}

/* Video-Link innerhalb eines Medien-Items */
.prep-steps .prep-step-media-video a{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .9rem;
}

.prep-steps .prep-step-media-video i{
  font-size: 1.1rem;
}

/* Auf sehr kleinen Displays zwei Bilder nebeneinander statt zu breit */
@media (max-width: 575.98px){
  .prep-steps .prep-step-media-item{
    flex-basis: min(48%, 220px);
    max-width: min(48%, 220px);
  }
}


.prep-metrics{ display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; align-items:stretch; margin-top:.35rem; }
.prep-metrics .metric-box{ background: none; box-shadow: none;  border: none; padding:.6rem .7rem; display:flex; flex-direction:column; justify-content:flex-start; flex: 0 1 300px; max-width:300px; min-height:110px; }
.progress.slim{ height: 10px; }

.vote-row { background: linear-gradient(180deg, #fff, #fbfbfb); position:relative; }
@media (min-width: 992px){
  .vote-row{ --divider-w: 50px; }
  .vote-row::after{
    content:""; position:absolute; top:0; bottom:0; left:50%; transform:translateX(-50%);
    width: var(--divider-w); background:#fff; pointer-events:none;
  }
  .vote-row > [class*="col-"]{ padding-left: calc(var(--bs-gutter-x) + var(--divider-w)/2); padding-right: calc(var(--bs-gutter-x) + var(--divider-w)/2); }
}
.vote-row > [class*="col-"]{ display:flex; }
.vote-card{ display:flex; flex-direction:column; border:1px solid rgba(0,0,0,.08); background:#fff; height:100%; }
.vote-card form{ display:flex; flex-direction:column; height:100%; }
.vote-card .btn-row{ margin-left:auto; }

.rating-picker{ display:inline-flex; align-items:center; gap:.35rem; user-select:none; }
.rating-picker .star{ cursor:pointer; line-height:1; font-size:1.5rem; color:#cbcbcb; transition: transform .08s ease, color .12s ease; }
.rating-picker .star:hover{ transform: scale(1.08); color:#FFDB5A; }
.rating-picker .star.active{ color:#FFC107; }

.rating-summary{ display:grid; grid-template-columns: 130px 1fr; gap:1rem; align-items:center; }
@media (max-width: 575.98px){ .rating-summary{ grid-template-columns: 1fr; } }
.avg-badge{ display:flex; flex-direction:column; align-items:center; justify-content:center; }
.avg-badge .avg-num{ font-size:2.4rem; font-weight:900; line-height:.9; }
.avg-badge .avg-stars{
  position:relative;
  display:inline-block;
  font-size:1.1rem;
  letter-spacing:.15rem;
  line-height:1;
}
.avg-badge .avg-stars .base{ color:#ddd; }               /* graue Grundsterne */
.avg-badge .avg-stars .fill{
  position:absolute; inset:0 auto 0 0;
  overflow:hidden; white-space:nowrap;
  width:var(--avg, 0%);                                  /* vom style="--avg: xx%" */
  color:#FFC107;                                         /* gelbe Füllsterne */
}

.avg-badge .total{ color:#666; font-size:.85rem; }

.dist-row{ display:flex; align-items:center; gap:.6rem; margin:.15rem 0; }
.dist-row .label{ width:22px; text-align:right; color:#777; font-weight:700; }
.dist-row .bar{ flex:1 1 auto; height:12px; border-radius:999px; background:#eee; overflow:hidden; }
.dist-row .bar > span{ display:block; height:100%; width:0%; background:linear-gradient(90deg, #d8f5d8, #a5d6a7); transition:width .35s ease; }
.dist-row .count{ width:60px; text-align:right; color:#777; font-variant-numeric: tabular-nums; }

:root{
  --st-blue:#5e8ef6;
  --st-blue-weak:#eaf1ff;
  --st-blue-border:#cfe0ff;
  --st-blue-grad-start:#a8c8ff;
}
.survey-block{  border-radius:.9rem; padding:1rem;  }
.survey-head{ display:flex; justify-content:space-between; align-items:center; gap:.75rem; margin-bottom:.5rem; }
.survey-head .variant-tag{ background:#f8f9ff; border-color:#e8edff; }
.survey-B .emoji{ font-size:1.5rem; cursor:pointer; filter: grayscale(1) opacity(.8); transition: transform .08s ease, filter .12s ease; }
.survey-B .emoji.active{ filter:none; transform: scale(1.05); }
.survey-B .picker{ display:flex; gap:.5rem; align-items:center; }
.survey-summary{ margin-top:.6rem; }
.survey-meter{
  position:relative; flex:1 1 auto; height:24px; background:#fff; border:1px solid var(--st-blue-border);
  border-radius:999px; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); overflow:hidden;
}
.survey-meter .fill{
  position:absolute; left:0; top:0; bottom:0; width:0%;
  background:linear-gradient(90deg, var(--st-blue-grad-start), var(--st-blue));
  border-radius:inherit; transition:width .35s ease;
}
.survey-meta{ display:flex; justify-content:space-between; align-items:center; margin-top:.35rem; color:#6b7280; font-size:.9rem; }
.survey-actions{ display:flex; gap:.5rem; align-items:center; margin-left:auto; }
.survey-actions .btn-cta{
  background:#f4f5f7; color:var(--bs-primary); border:1px solid #e6e6e6; box-shadow:none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  border-radius:999px; padding:.45rem .8rem; font-weight:800;
}
.survey-actions .btn-cta:hover{ background:#fff; border-color: var(--bs-primary); color: var(--bs-primary); transform: translateY(-1px); }

.btn-browse{
  border:2px solid var(--bs-secondary);
  color:var(--bs-secondary);
  background:#fff;
  border-radius:999px;
  padding:.55rem 1rem;
  font-weight:800; 
  transition: transform .12s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  display:inline-flex; align-items:center; gap:.4rem;
}
.btn-browse .bi{ vertical-align: -2px; }
.btn-browse:hover{ background:var(--bs-secondary); color:#fff; transform: translateY(-1px); text-decoration:none; }
.btn-browse-sm{ padding:.45rem .85rem; font-size:.92rem; }

.btn-browse.is-inverted{ background: var(--bs-secondary); color: #fff; border-color: var(--bs-secondary); }
.btn-browse.is-inverted:hover{ background: #fff; color: var(--bs-secondary); border-color: var(--bs-secondary); }

.nav-inline{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
.nav-inline .btn-group-inline{ display:flex; gap:.5rem; flex-wrap:wrap; margin-left:auto; }
@media (max-width: 575.98px){
  .nav-inline{ align-items:stretch; }
  .nav-inline .btn-group-inline{
    order:1; width:100%; display:flex; justify-content:space-between; gap:.5rem; flex-wrap:nowrap;
  }
  .nav-inline .btn-group-inline .btn{ flex:1 1 48%; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .nav-inline > .btn-browse.is-inverted{ order:2; align-self:flex-start; margin-top:.5rem; }
}

.btn-cta{
  --shadow: 0 8px 18px rgba(230,81,0,.22);
  border:0; border-radius:999px; padding:.55rem 1rem; font-weight:800; box-shadow: var(--shadow);
  background: linear-gradient(180deg, #FF9800 0%, #E65100 100%); color:#fff;
}
.btn-cta:hover{ filter:brightness(1.05); transform: translateY(-1px); color:#fff; }
.btn-cta:active{ transform: translateY(0); }
.btn-cta .bi{ vertical-align:-3px; }

.stat-group{ display:grid; gap:1rem; background:linear-gradient(180deg, #fff, #fbfbfb); }
.stat-variant{ background:transparent; border:0; border-radius:1rem; box-shadow:none; }
.kpi-tile{
  border-radius:1.25rem; padding:1rem; height:100%;
  display:flex; flex-direction:column; justify-content:center; text-align:center;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(1px);
}
.kpi-tile .kpi-icon{ font-size:1.4rem; color:var(--bs-primary); }
.kpi-tile .kpi-value{ font-weight:800; font-size:1.6rem; line-height:1; margin-top:.25rem; }
.kpi-tile .kpi-sub{ color:#6b7280; font-size:.9rem; }
.kpi-tile .kpi-badge{ display:inline-block; margin-top:.4rem; padding:.15rem .5rem; border-radius:999px; background:#f8f8f8; border:1px solid #eee; font-weight:700; font-size:.85rem; }

/* Inter Variable Font – lokal geladen */
@font-face{
  font-family: "Inter";
  src: url("/media/fonts/inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Inter";
  src: url("/media/fonts/inter/InterVariable-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

#maincontent{
  --ff-inter: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#maincontent .display-title,
#maincontent .section-card h2,
#maincontent .stat-variant h2,
#maincontent .vote-card h3,
#maincontent .survey-block h3,
#maincontent .meta-badges .badge,
#maincontent .ingredients-table,
#maincontent .prep-text,
#maincontent .servings-tools,
#maincontent .quick-actions .btn,
#maincontent .kpi-tile{
  font-family: var(--ff-inter) !important;
  letter-spacing: 0;
}

/* Reveal-on-scroll helper (gleicht main) */
[data-reveal]{ opacity:0; transform: translateY(24px) scale(.99); transition: opacity .7s ease, transform .7s ease; }
.reveal-show{ opacity:1; transform: translateY(0) scale(1); }

/* --- Vote Danke! größer + prominent --- */
#maincontent #RezVotenDanke,
#maincontent #studentSurvey .survey-thanks{
  animation: vote-pop .28s ease-out;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem) !important;
  font-weight: 900;
  color: var(--bs-primary);
  letter-spacing: .2px;
}
@keyframes vote-pop {
  0%{ transform: scale(.9); opacity:.6; }
  100%{ transform: scale(1); opacity:1; }
}

/* ============================================================
   Tiny-Image Modus (Bilder <400px Breite ODER <300px Höhe)
   -> linksbündig, Rahmen liegt direkt am Bild (kein Innenabstand)
   ============================================================ */

#maincontent .media-wrap--tiny{
  display: inline-block;          /* shrink-wrap auf Bildbreite */
  vertical-align: top;
  line-height: 0;                 /* verhindert 1–2px Bottom-Gap bei <img> */
  width: auto;                    /* keine Füllbreite */
  max-width: clamp(240px, 36vw, 440px);
  margin: 1rem 0 0 0;             /* linksbündig */
  padding: 0;                     /* WICHTIG: kein Innenabstand */
  background: #fff;               /* optional */
  border: 1px solid rgba(0,0,0,.08);
  border-radius: .75rem;  
  box-shadow: 1px 3px 9px rgba(0,0,0,.16);
  overflow: hidden;
}

/* Bühne im Tiny-Modus: keine feste Höhe, keinerlei Padding/Animation */
#maincontent .media-wrap--tiny .media-kenburns{
  width: auto;
  height: auto !important;        /* überschreibt clamp(...) */
  overflow: visible;
  padding: 0 !important;          /* WICHTIG: kein Innenabstand */
  animation: none !important;
}

/* Bild: natürliche Größe, linksbündig, nicht gestreckt, kein Transform */
#maincontent .media-wrap--tiny .media-kenburns img{
  position: static !important;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;               /* Sicherheitslimit */
  margin: 0;
  object-fit: contain;
  transform: none !important;
  animation: none !important;
  image-rendering: auto;
}

/* Overlays/Buttons im Tiny-Modus aus */
#maincontent .media-wrap--tiny .media-gradient{ display: none !important; }
#maincontent .media-wrap--tiny .zoom-fab{ display: none !important; }

/* Credit im Tiny-Modus ausblenden, damit der Rahmen direkt am Bild liegt */
#maincontent .media-wrap--tiny .photo-credit{ font-size: smaller; bottom:7px; left:7px; }

/* Nur Normalbilder (nicht tiny, nicht Portrait) nutzen die fixe Höhe */
#maincontent .media-wrap:not(.media-wrap--tiny):not(.media-wrap--portrait) .media-kenburns{
  height: clamp(280px, 44vh, 620px);
}

/* ------------------------------------------------------------
   OPTIONAL: Wenn du lieber den Rahmen fix lässt und das Bild
   die Rahmenbreite vollständig ausfüllen soll, gib zusätzlich
   die Klasse .media-fill auf den Wrapper.
   ------------------------------------------------------------ */
#maincontent .media-wrap--tiny.media-fill{
  display: block;                 /* füllt die Zeile, linksbündig */
  max-width: clamp(260px, 40vw, 520px);
}
#maincontent .media-wrap--tiny.media-fill .media-kenburns img{
  width: 100%;                    /* Bild füllt den Rahmen */
  height: auto;
}
/* ===================== C3-D3 STUDENTENVOTING – ADD STYLES ===================== */
:root{
  --st-icon-neutral: #6c7583;
  --st-bar-no:  #c5cbd3;   /* etwas dunkler */
  --st-bar-mid: #bdc6d7;   /* etwas dunkler */
  --st-bar-yes: #b1cfc0;   /* etwas dunkler */
}

/* Segmented Button-Gruppe */
.segmented{ display:flex; gap:.5rem; flex-wrap:wrap; }
.btn-choice{
  --btn-bd: rgba(0,0,0,.20);
  border-color: var(--btn-bd);
  border-radius: 999px;
  font-weight: 700;
  padding: .4rem .85rem;
  background:#fff;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease, transform .12s ease;
}
.btn-choice i{ color: var(--st-icon-neutral); }
.btn-choice:hover,
.btn-choice:focus{
  background:#d9dde1;               /* dunkleres Grau auf Hover */
  color:#212529;
  border-color:#c2c8ce;
  text-decoration:none;
}
.btn-choice.active{
  background:#e6e9ed;               /* dezente Füllung aktiv */
  color:#1f2937;
  border-color:#bcc3ca;
}
.btn-choice.active i{ color: inherit; }

/* Dist-Liste (3 Mikro-Balken) */
.st-dist-list{ display:grid; gap:.5rem; }
.st-dist-item{ display:flex; align-items:center; gap:.6rem; }
.st-dist-label{ min-width: 140px; color:#6c757d; font-weight:600; display:flex; align-items:center; }
.st-dist-label i{ color: var(--st-icon-neutral); }
.st-dist-val{ width:58px; text-align:right; color:#6c757d; font-variant-numeric: tabular-nums; }

/* Balkenfarben (Füllung etwas dunkler, BG bleibt Bootstrap) */
.progress.slim{ height: .6rem; }
.progress-bar.st-bar-no  { background: var(--st-bar-no); }
.progress-bar.st-bar-mid { background: var(--st-bar-mid); }
.progress-bar.st-bar-yes { background: var(--st-bar-yes); }

/* Stimmenzeile harmonisieren */
.votes-line{ font-size:.9rem; color:#6c757d; }

/* ============================================================================ */
/* kleines haptisches Feedback bei „Bitte anmelden“ */
@keyframes be-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX( 2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX( 4px); }
}
.btn-choice.shake { animation: be-shake .45s ease; }

.quick-actions #favBtn.is-favorite {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
}

/* Quick-Actions als Anker für absolut positioniertes Feedback */
#maincontent .quick-actions{
  position: relative;
}

/* Fav-Feedback: schwebt ÜBER den Buttons, nimmt keinen Platz im Layout ein */
#maincontent #favFeedback{
  position: absolute;
  left: 35%;
  bottom: 100%;
  margin-bottom: .45rem;

  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  z-index: 20;

  display: inline-block;
  max-width: min(560px, 96%);
  padding: .35rem .9rem;
  border-radius: 999px;

  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);

  font-weight: 700;
  color: #444;

  transition: opacity .25s ease, transform .25s ease;
}

/* Sichtbar (Fade-In) */
#maincontent #favFeedback.is-show{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Optional: Status-Farben */
#maincontent #favFeedback.is-ok{
  background: rgba(240, 253, 244, .96);
  border-color: rgba(25,135,84,.25);
  color: #0f5132;
}
#maincontent #favFeedback.is-error{
  background: rgba(255, 245, 245, .96);
  border-color: rgba(220,53,69,.25);
  color: #842029;
}

/* Reduced Motion: kein Slide */
@media (prefers-reduced-motion: reduce){
  #maincontent #favFeedback{
    transition: opacity .15s ease;
    transform: translate(-50%, 0);
  }
  #maincontent #favFeedback.is-show{
    transform: translate(-50%, 0);
  }
}


/* Zutaten-Galerie – Bilder aus Zutaten-Wiki */
.ingredients-gallery-block {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.ingredients-gallery-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.ingredients-gallery-block-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ingredients-gallery-block-title i {
  font-size: 1.2rem;
}

.ingredients-gallery-block-sub {
  font-size: .8rem;
  color: #6c757d;
}

/* einfache Galerie-Wrapper (eine Variante) */
.ingredients-gallery {
  display: block;
}

.ingredients-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

/* Basiszustand: noch NICHT sichtbar / noch KEINE Animation */
.ingredients-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  cursor: pointer;
  --i: 0;
  opacity: 0;
  transform: translateY(18px);
}

/* Animation NUR wenn der Abschnitt via data-reveal → .reveal-show sichtbar wurde */
.ingredients-gallery-block.reveal-show .ingredients-thumb {
  animation: ingredientThumbIn .55s cubic-bezier(.2,.7,.3,1) forwards;
  animation-delay: calc(var(--i) * 70ms);
}

@keyframes ingredientThumbIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Reduced Motion: Animation komplett deaktivieren, Thumbs sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  .ingredients-thumb,
  .ingredients-gallery-block.reveal-show .ingredients-thumb {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.ingredients-thumb-img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  background: #f3f4f6;
  box-shadow: 0 4px 12px rgba(15,23,42,.12);
  transition: transform .16s ease-out, box-shadow .16s ease-out;
}

.ingredients-thumb-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ingredients-thumb-label {
  margin-top: .4rem;
  font-size: .75rem;
  text-align: center;
  max-width: 5.5rem;
  color: #495057;
  line-height: 1.25;
}

.ingredients-thumb:hover .ingredients-thumb-img,
.ingredients-thumb:focus-visible .ingredients-thumb-img {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(15,23,42,.18);
}

@media (max-width: 575.98px) {
  .ingredients-thumb-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .ingredients-thumb-label {
    max-width: 4.5rem;
  }
}

/* ============================================================
   Koch-/Backmodus (Arbeitsmodus) – Vollbild-Overlay
   ============================================================ */

html.cookmode-open,
body.cookmode-open{
  overflow: hidden;
}

.cookmode-overlay{
  position: fixed;
  inset: 0;
  z-index: 1060; /* über Inhalt, unter globalen Offcanvas falls vorhanden */
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.cookmode-overlay.is-visible{
  display: flex;
}

.cookmode-shell{
  width: 100%;
  max-width: 1600px;
  margin: auto;
  max-height: 100vh;
  background: #020617;
  color: #e5e7eb;
  border-radius: 1.4rem;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--ff-inter, system-ui, -apple-system, "Segoe UI", sans-serif);
}

@media (min-width: 768px){
  .cookmode-shell{
    padding: 1.35rem 1.5rem 1.3rem;
  }
}

.cookmode-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.cookmode-header-main{
  min-width: 0;
}

.cookmode-pill{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: rgba(248,250,252,.06);
  border: 1px solid rgba(148,163,184,.5);
  color: #e5e7eb;
}

.cookmode-title{
  margin: .35rem 0 .25rem;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1.1;
}

.cookmode-subline{
  margin: 0;
  font-size: .9rem;
  color: #9ca3af;
}

.cookmode-header-actions{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.cookmode-indicator{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(15,23,42,.8);
  border: 1px solid rgba(148,163,184,.65);
  font-size: .8rem;
  color: #e5e7eb;
}

.cookmode-indicator i{
  font-size: 1rem;
}

.cookmode-close-btn{
  border-radius: 999px;
}

/* Hauptlayout im Overlay: links Zutaten, rechts Schritte */
.cookmode-layout{
  flex: 1 1 auto;
  overflow: auto;
  margin-top: .4rem;
  padding-top: .35rem;
  padding-bottom: .5rem;
}

.cookmode-layout{
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px){
  .cookmode-layout{
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  }
}

.cookmode-block{
  min-width: 0;
}

.cookmode-block-title{
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: 0 0 .6rem;
}

.cookmode-block-title small{
  font-weight: 500;
  font-size: .8rem;
  color: #9ca3af;
}

.cookmode-block-title i{
  color: #f97316;
}

/* Zutaten im Kochmodus */
.cookmode-ingredients-table-wrap{
  border-radius: 1rem;
  background: radial-gradient(circle at top left, rgb(18 30 67 / 45%), rgba(15, 23, 42, .96));
  padding: .6rem .65rem;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.9);
}

.cookmode-ingredients-table{
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(1.05rem, 0.95rem + 0.6vw, 1.25rem);
}

.cookmode-ingredients-table tr + tr{
  border-top: 1px solid rgba(15,23,42,.65);
}

.cookmode-ingredients-table td{
  padding: .22rem .1rem;
  vertical-align: top;
}

.cookmode-ingredients-table td.cm-qty{
  width: 90px;
  font-weight: 800;
  text-align: right;
  padding-right: .4rem;
}

.cookmode-ingredients-table td.cm-unit{
  width: 70px;
  color: #d1d5db;
  padding-right: .4rem;
}

.cookmode-ingredients-table td.cm-name{
  color: #e5e7eb;
}

/* Links im Kochmodus neutral hell */
.cookmode-ingredients-table a{
  color: #e5e7eb;
}
.cookmode-ingredients-table a:hover{
  text-decoration: underline;
}
.cookmode-ingredients-table .bi-info-circle-fill {
   display:none;

}
/* Schritte im Kochmodus */
.cookmode-step-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.cookmode-step{
  padding: .65rem .8rem;
  border-radius: 1rem;
  background: radial-gradient(circle at top, rgb(74 81 85 / 16%), rgba(15, 23, 42, .98));
  border: 1px solid rgb(83 83 83 / 60%)
}

.cookmode-step-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}

.cookmode-step-number{
  font-size: .85rem;
  font-weight: 700;
  color: #3d629b
}

.cookmode-step-time{
  font-size: .85rem;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.cookmode-step-body{
  font-size: clamp(1.1rem, 0.95rem + 0.9vw, 1.35rem);
  line-height: 1.7;
}

.cookmode-step-body p{
  margin-bottom: .4rem;
}

.cookmode-step-tip{
  margin-top: .4rem;
  font-size: .95rem;
  line-height: 1.6;
  border-radius: .75rem;
  padding: .5rem .6rem;  
  color: #e5e7eb;
}

/* Footer im Overlay */
.cookmode-footer{
  padding-top: .55rem;
  border-top: 1px solid rgba(15,23,42,.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .8rem;
  color: #9ca3af;
}

.cookmode-footer .btn{
  border-radius: 999px;
}

.cookmode-footer-hint{
  text-align: right;
}

@media (max-width: 767.98px){
  .cookmode-header{
    flex-direction: column;
    align-items: flex-start;
  }
  .cookmode-header-actions{
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  .cookmode-footer{
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .cookmode-footer-hint{
    text-align: left;
  }
}

/* Bilder im Kochmodus – dezente Thumbnails je Schritt */
.cookmode-step-media{ 
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.cookmode-step-media-item{
  flex: 0 0 auto;
}

.cookmode-step-media-zoom{
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.cookmode-step-media-zoom img{
  display: block;
  width: 72px;
  height: 72px;
  border-radius: .75rem;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0,0,0,.55);
}

.cookmode-step-media-zoom:focus-visible{
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

@media (min-width: 768px){
  .cookmode-step-media-zoom img{
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 575.98px){
  .cookmode-step-media{
    gap: .3rem;
  }
  .cookmode-step-media-zoom img{
    width: 64px;
    height: 64px;
  }
}

/* Keywords / Tags als "Pills" */
#maincontent .tags-list{
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .5rem;
  margin: .35rem 0 0;
  padding: 0;
}

#maincontent .tags-list .tag-pill{
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: .35rem .7rem;

  background: rgba(0,0,0,.04);          /* hellgrau, dezent */
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;                  /* pill */
  box-shadow: 0 2px 6px rgba(0,0,0,.06); /* minimal-schatten */

  color: #4b5563;
  font-weight: 700;
  font-size: .85rem;
  text-decoration: none;

  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease, border-color .12s ease;
}

#maincontent .tags-list .tag-pill:hover{
  background: rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
  text-decoration: none;
}

#maincontent .tags-list .tag-pill:active{
  transform: translateY(0);
}

#maincontent .tags-list .tag-pill:focus-visible{
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   prep4 – Zubereitung (dezente Cards, warmes Hellgelb -> Weiß, markierbar)
   Einbau: backecke_detail_styles.css
   Abhängigkeiten: Bootstrap 5 + Bootstrap Icons (bei dir bereits geladen)
   ========================================================================== */

.prep4{
  --r: .95rem;
  --b: rgba(0,0,0,.075);

  /* Warmes Farbschema */
  --warm-a: #fff6d9;   /* sehr helles Gelb */
  --warm-b: #ffffff;

  /* Akzent sehr dezent (warm orange) */
  --accent: 245, 154, 59;

  --shadow: 0 .18rem .85rem rgba(0,0,0,.055);
  --shadow-active: 0 .28rem 1.05rem rgba(0,0,0,.08);
}

.prep4-titlebar{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:.75rem;
  flex-wrap:wrap;
  margin-bottom:.8rem;
}

.prep4-hint{
  margin:0;
  color: var(--bs-secondary-color);
  font-size:.95rem;
}

.prep4-list{ list-style:none; padding:0; margin:0; }

/* LI-Wrapper als dezente Kachel */
.prep4-item{
  padding: 0;                 /* bewusst clean */
  margin: 15px;
  border-radius: var(--r);
  box-shadow: 0 .18rem .44rem rgba(0,0,0,.055);
  background-color: #ffe19112; /* super dezent */
  overflow: hidden;            /* damit Markierungsleiste sauber wirkt */
}

/* Card-Inhalt */
.prep4-card{
  position:relative;
  border: 1px solid transparent; /* damit Hover-Border sichtbar wird */
  border-radius: var(--r);
  overflow:hidden;
 
  /* background: linear-gradient(135deg, var(--warm-a) 0%, var(--warm-b) 55%); */

  transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease, filter .12s ease;
}

.prep4-card:hover,
.prep4-card:focus-within{
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  border-color: rgba(var(--accent), .22);
  filter: saturate(1.03);
}

.prep4-card.is-active{
  box-shadow: var(--shadow-active);
  /* border-color: rgba(var(--accent), .35); */
  transform:none;
}

.prep4-card.is-active::before{
  content:"";
  position:absolute;
  left:0;
  top:.65rem;
  bottom:.65rem;
  width:.28rem;
  border-radius:.35rem;
  background: rgba(var(--accent), .85);
}

/* Klickfläche */
.prep4-btn{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  cursor:pointer;
  padding: 1rem 1rem .9rem 1rem;
  color:inherit;
}

.prep4-btn:focus-visible{
  outline:0;
  box-shadow: 0 0 0 .22rem rgba(var(--accent), .18);
  border-radius: calc(var(--r) - .05rem);
}

.prep4-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
}

/* Schritt-Nummer (nur 1,2,3...) */
.prep4-step{
  font-size: 1.422em;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--bs-secondary-color);
}

/* Zeit */
.prep4-time{
  font-size:.86rem;
  color: var(--bs-secondary-color);
  border:1px solid rgba(0,0,0,.09);
  border-radius:999px;
  padding:.18rem .55rem;
  white-space:nowrap;
  background: rgba(255,255,255,.55);
  font-weight:600;
}

/* Text */
.prep4-text{
  font-size: 1.30rem;
  line-height: 1.55;
  color: rgba(0,0,0,.86);
  font-weight: 500;
  margin-top:.55rem;
}

/* Falls body_html aus Admin <p> etc. enthält, Margins beruhigen */
.prep4-text p{ margin:0; }

/* Tipp */
.prep4-tip{
  margin-top: .65rem;
  padding-top: .55rem;
  border-top: 1px dashed rgba(0,0,0,.10);
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  color: rgba(0,0,0,.60);
  font-size: .93rem;
  line-height: 1.45;
}
.prep4-tip i{
  opacity:.7;
  margin-top:.06rem;
  flex:0 0 auto;
}
.prep4-tip p{ margin:0; }

/* Check rechts */
.prep4-check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.75rem;
  height:1.75rem;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.65);
  color: rgba(0,0,0,.45);
  opacity:0;
  transform: scale(.96);
  transition: opacity .12s ease, transform .12s ease, color .12s ease, border-color .12s ease;
  margin-left:.4rem;
}
.prep4-card.is-active .prep4-check{
  opacity:1;
  transform: scale(1);
  color: rgba(var(--accent), .95);
  border-color: rgba(var(--accent), .30);
}
