:root {
    --rezept-akzent: #a95035;
    --rezept-akzent-dunkel: #81351f;
    --rezept-hintergrund: tan;
    --rezept-karte: #ffffff;
    --rezept-text: #2e2925;
    --rezept-grau: #706861;
    --rezept-rand: #e5ddd4;
}

body {
    background: var(--rezept-hintergrund);
    color: var(--rezept-text);
}

.rezeptseite {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.zurueck-link {
    display: inline-block;
    margin-bottom: 1.75rem;
    color: var(--rezept-akzent-dunkel);
    font-weight: 700;
    text-decoration: none;
}

.zurueck-link:hover {
    text-decoration: underline;
}

.rezeptkopf {
    margin-bottom: 2rem;
    padding: 2.25rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #f4e8dd 100%);
    border: 1px solid var(--rezept-rand);
}

.rezept-kategorie {
    margin: 0 0 0.5rem;
    color: var(--rezept-akzent);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.rezeptkopf h1 {
    margin: 0;
    color: var(--rezept-akzent-dunkel);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
}

.rezept-beschreibung {
    max-width: 65ch;
    margin: 1rem 0 1.5rem;
    color: var(--rezept-grau);
    font-size: 1.1rem;
    line-height: 1.6;
}

.rezept-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rezept-meta span {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--rezept-rand);
    font-size: 0.9rem;
    font-weight: 700;
}

.rezept-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 2fr);
    gap: 2rem;
    align-items: start;
}

.zutaten-karte,
.zubereitung {
    padding: 1.75rem;
    border: 1px solid var(--rezept-rand);
    border-radius: 16px;
    background: var(--rezept-karte);
    box-shadow: 0 5px 18px rgb(70 45 28 / 7%);
}

.zutaten-karte {
    position: sticky;
    top: 1rem;
}

.zutaten-karte h2,
.zubereitung > h2 {
    margin-top: 0;
    color: var(--rezept-akzent-dunkel);
}

.portionen {
    margin: -0.4rem 0 1rem;
    color: var(--rezept-grau);
    font-size: 0.9rem;
}

.zutatenliste {
    margin: 0;
    padding: 0;
    list-style: none;
}

.zutatenliste li {
    padding: 0.65rem 0;
    border-bottom: 1px solid #eee8e2;
    line-height: 1.4;
}

.zutatenliste li:last-child {
    border-bottom: 0;
}

.schritt {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: #fcfaf8;
}

.schritt-nummer {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--rezept-akzent);
    color: #fff;
    font-weight: 800;
}

.schritt h3 {
    margin: 0 0 0.65rem;
    color: var(--rezept-text);
}

.schritt ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.6;
}

.schritt li + li {
    margin-top: 0.4rem;
}

.rezeptkopf-inhalt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
    gap: 2rem;
    align-items: center;
}

.rezeptkopf-text {
    min-width: 0;
}

.rezept-bild {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(46, 41, 37, 0.16);
}

/* Bildschirm-Darstellung (Desktop & Mobile) */
.print-button {
    display: inline-block; /* oder block, je nach deinem Layout */
    margin-top: 1.5rem; /* Abstand nach oben zu den Zutaten */
}

/* beim Drucken den .print-button und den .zurueck-link nicht mitdrucken. */
@media print {
    .print-button {
        display: none;
    }

    .zurueck-link {
        display: none;
    }
}

@media (max-width: 600px) {
    .rezeptseite {
        width: calc(100% - 1.25rem);
        max-width: 650px;
        padding-top: 1rem;
        box-sizing: border-box;
    }
    .rezeptkopf,
    .zutaten-karte,
    .zubereitung {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 1.25rem;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }
    .rezept-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
        width: 100%;
        min-width: 0;
    }
    .zutaten-karte {
        position: static;
    }
    .rezeptkopf-inhalt {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }
    .rezept-bild {
        display: block;
        width: 100%;
        max-width: 100%;
        max-height: 240px;
        object-fit: contain;
    }
    .zutaten-karte ul,
    .zubereitung ol,
    .zubereitung ul {
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }
    .rezept-notiz {
        color: #000;
        font-size: 0.95rem;
        margin-top: 1rem;
        line-height: 1.5;
    }
    /* Zubereitung: mobile Schritte */
    .schritt {
        display: grid;
        grid-template-columns: 2.4rem minmax(0, 1fr);
        column-gap: 0.75rem;
        row-gap: 0.5rem;
        width: 100%;
        min-width: 0;
        padding: 1rem;
        box-sizing: border-box;
    }
    
    /* Silbentrennung */
    .schritt h3,
    .schritt p,
    .schritt li,
    .schritt ul,
    .schritt ol {
        hyphens: auto;
        overflow-wrap: break-word;
        word-break: normal;
    }
    
    /* Nummer links neben der Überschrift */
    .schritt-nummer {
        grid-column: 1;
        grid-row: 1;
        width: 2.4rem;
        height: 2.25rem;
        margin: 0.1rem 0 0;
    }

    /* Überschrift rechts neben der Nummer  */
    .schritt h3 {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0;
        margin: 0;
        overflow-wrap: anywhere;
    }
   
    /*
     * Der Inhalt beginnt in einer neuen Zeile
     * und läuft über beide Spalten.
    */
    .schritt > *:not(.schritt-nummer):not(h3) {
        grid-column: 1 / -1;
        min-width: 0;
        margin: 0;
        overflow-wrap: anywhere;
    }
}
