main.cookbook{max-width:1100px;padding:24px}
.cookbook a{color:#3d603a}
.cookbook-brand{font-size:30px;font-weight:750;text-decoration:none}
.cookbook h1{font-size:clamp(28px,4vw,44px);line-height:1.15;margin:26px 0 12px}
.recipe-summary{color:#70766b;font-size:18px;line-height:1.6}
.recipe-meta{display:flex;gap:20px;flex-wrap:wrap;color:#66715c;margin:16px 0}
.recipe-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:20px}
.recipe-card{border:1px solid #e5e6db;background:white;border-radius:16px;overflow:hidden}
.recipe-card a{display:block;text-decoration:none;color:inherit}
.recipe-card img,.recipe-placeholder{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.recipe-placeholder{display:grid;place-items:center;font-size:60px;background:#eeeee5}
.recipe-card-text{padding:18px}
.recipe-card h2{margin:0 0 10px}
.recipe-card p{line-height:1.5;overflow-wrap:anywhere}
.recipe-hero{width:100%;max-height:580px;object-fit:contain;background:#eeeee5;border-radius:20px;display:block}
.recipe-thumbnails{display:flex;gap:10px;overflow-x:auto;padding:12px 0}
.recipe-thumbnail{flex:0 0 82px;padding:3px;background:white;border:2px solid transparent;border-radius:10px}
.recipe-thumbnail[aria-pressed=true]{border-color:#3d603a}
.recipe-thumbnail img{width:72px;height:60px;object-fit:cover;display:block;border-radius:6px}
.recipe-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:20px;margin-top:20px}
.recipe-panel{background:white;border:1px solid #e5e6db;border-radius:18px;padding:24px;min-width:0}
.recipe-panel h2{margin:0 0 20px}
.recipe-ingredients{padding-left:22px;margin:0}
.recipe-ingredients li{padding:7px 0;line-height:1.5;overflow-wrap:anywhere}
.recipe-steps{padding-left:26px;margin:0}
.recipe-steps li{padding:0 0 20px 8px;line-height:1.7}
.recipe-steps li::marker{color:#3d603a;font-weight:750}
.recipe-steps li div{white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:700px){main.cookbook{padding:16px}.recipe-columns{grid-template-columns:1fr}.recipe-panel{padding:20px}}

/* Оглавление кулинарной книги */
.recipe-contents{display:grid;gap:12px;margin-top:22px}
.recipe-entry{background:#fff;border:1px solid #e5e6db;border-radius:15px;overflow:hidden}
.cookbook .recipe-entry-link{display:flex;align-items:center;justify-content:space-between;
gap:22px;padding:18px;text-decoration:none;color:inherit}
.recipe-entry-link:hover{background:#fafbf7}
.recipe-entry-link:focus-visible{outline:3px solid #3d603a;outline-offset:-3px}
.recipe-entry-text{flex:1;min-width:0}
.recipe-entry h2{margin:0 0 9px;font-size:22px;overflow-wrap:anywhere}
.recipe-entry-ingredients{margin:0;color:#70766b;font-size:14px;line-height:1.5;
display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.recipe-entry .recipe-meta{margin:12px 0 0;font-size:14px;gap:18px}
.recipe-entry-photo,.recipe-entry-placeholder{flex:0 0 140px;width:140px;height:105px;
border-radius:10px;object-fit:cover}
.recipe-entry-placeholder{display:grid;place-items:center;background:#eeeee5;font-size:35px}
@media(max-width:600px){
.cookbook .recipe-entry-link{gap:12px;padding:14px}
.recipe-entry-photo,.recipe-entry-placeholder{flex-basis:90px;width:90px;height:90px}
.recipe-entry h2{font-size:18px}
.recipe-entry-ingredients{font-size:13px}
.recipe-entry .recipe-meta{gap:8px 14px;font-size:13px}
}

/* Разделы оглавления */
.recipe-category{margin-top:32px}
.cookbook .recipe-category-title{font-size:27px;margin:0 0 8px;scroll-margin-top:24px}
.recipe-category-subtitle{color:#70766b;line-height:1.6;margin:0;white-space:pre-line;overflow-wrap:anywhere}
.recipe-category .recipe-contents{margin-top:16px}
.recipe-category-nav{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}
.recipe-category-nav a{padding:9px 16px;border:1px solid #c9d3c2;border-radius:20px;
text-decoration:none;background:#fff}
.recipe-category-nav a:hover{background:#edf2e8}
.recipe-entry h3{margin:0 0 9px;font-size:22px;overflow-wrap:anywhere}
@media(max-width:600px){.recipe-entry h3{font-size:18px}}

/* Фильтрация рецептов */
.recipe-category[hidden]{display:none}
.recipe-category-nav button{padding:9px 16px;border:1px solid #c9d3c2;
border-radius:20px;background:#fff;color:#3d603a;font:inherit;cursor:pointer}
.recipe-category-nav button[aria-pressed=true]{background:#3d603a;color:#fff;border-color:#3d603a}
.recipe-category-nav button:focus-visible{outline:3px solid #8ca47d;outline-offset:3px}

/* Приготовление без автоматической нумерации */
.cookbook .recipe-steps{list-style:none;padding-left:0}
.cookbook .recipe-steps li{padding-left:0}

/* Ингредиенты без маркеров */
.cookbook .recipe-ingredients{list-style:none;padding-left:0}

/* Оформление текста из редактора рецептов */
.recipe-rich{font:16px system-ui;line-height:1.7;overflow-wrap:anywhere}
.recipe-rich p{margin:0 0 14px}
.recipe-rich p:last-child{margin-bottom:0}
.recipe-rich font[size="2"]{font-size:14px}
.recipe-rich font[size="3"]{font-size:16px}
.recipe-rich font[size="4"]{font-size:18px}
.recipe-rich font[size="5"]{font-size:20px}
.recipe-rich font[size="6"]{font-size:24px}

/* Перенос текста рецепта по границам слов */
.cookbook .recipe-rich,
.cookbook .recipe-rich *,
.cookbook .recipe-steps li div,
.cookbook .recipe-ingredients li{
    word-break:normal;
    overflow-wrap:break-word;
    hyphens:none;
    line-break:auto;
}

.cookbook .recipe-discussion{
display:inline-block;background:#3d603a;color:#fff;
padding:13px 20px;border-radius:10px;text-decoration:none;
font-weight:600;margin-top:12px
}
.cookbook .recipe-discussion:hover{background:#304d2e}

/* Кнопка обсуждения под рецептом */
.recipe-discussion-row{display:flex;justify-content:flex-end;margin:24px 0 12px}
.cookbook .recipe-discussion{
display:inline-flex;align-items:center;justify-content:center;gap:10px;
margin:0;padding:14px 22px;border:1px solid #3d603a;border-radius:14px;
font:600 16px/1.3 system-ui,-apple-system,Arial,sans-serif;
background:#3d603a;color:#fff;text-decoration:none;
box-shadow:0 3px 8px #292a2212;transition:background .15s ease
}
.recipe-discussion svg{flex-shrink:0}
.cookbook .recipe-discussion:hover{background:#304d2e}
.cookbook .recipe-discussion:focus-visible{outline:3px solid #8ca47d;outline-offset:4px}
@media(max-width:600px){
.recipe-discussion-row{justify-content:center}
.cookbook .recipe-discussion{width:100%}
}

/* Возврат на главную из кулинарной книги */
.cookbook .cookbook-navigation{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}
.cookbook .cookbook-navigation>a.cookbook-home-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-left:auto;
    padding:12px 18px;
    border:1px solid #3d603a;
    border-radius:12px;
    background:#3d603a;
    color:#fff;
    font:600 15px/1.2 system-ui,-apple-system,Arial,sans-serif;
    text-indent:0;
    white-space:nowrap;
    text-decoration:none;
}
.cookbook .cookbook-navigation>a.cookbook-home-link:hover{
    background:#304d2e;
}
.cookbook .cookbook-navigation>a.cookbook-home-link:focus-visible{
    outline:3px solid #8ca47d;
    outline-offset:3px;
}

/* Расположение текста на баннере кулинарной книги */
.cookbook > header{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
}
.cookbook > header .cookbook-brand{
    position:absolute;
    top:27%;
    left:39%;
    width:53%;
    display:block;
    margin:0;
    text-align:center;
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(18px,2.8vw,32px);
    font-weight:700;
    font-style:italic;
    line-height:1.2;
    letter-spacing:.3px;
    color:#342014;
    text-decoration:none;
    text-shadow:0 1px 1px #ffffff59;
}
@media(max-width:600px){
    .cookbook > header .cookbook-brand{
        top:25%;
        font-size:clamp(12px,3.5vw,20px);
        letter-spacing:0;
    }
    .cookbook > header p{
        top:62%;
        left:39%;
        width:53%;
        font-size:clamp(8px,2.1vw,11px);
        line-height:1.3;
        letter-spacing:0;
    }
}
