/* Страница рецепта. Шапка, путеводитель, реклама и подвал —
   из design-v11.css; здесь только сам рецепт. Его разметка пришла из базы как есть (классы Bootstrap, <center>, таблицы
   «совет» и «лирическое отступление») — меняем только вид, ни одного тега. */

.r11-spread { margin-top: clamp(20px, 3vw, 36px); }
.r11-recipe { max-width: 42rem; }   /* строка Literata 19 px — не длиннее 70 знаков */

/* ——— хлебные крошки ——— */
.r11 .breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .45em; margin: 0; padding: 0; list-style: none; font-size: .9375rem; color: var(--muted); }
.r11 .breadcrumb-item + .breadcrumb-item::before { content: "›"; margin-right: .45em; }
.r11 .breadcrumb a { display: inline-flex; align-items: center; min-height: 36px; color: var(--muted); }
.r11 .breadcrumb a:hover { color: var(--bright); }

/* ——— тело рецепта: одна колонка книжного шрифта ——— */
.r11-body { font: 400 1.1875rem/1.65 var(--display); color: var(--ink); overflow-wrap: break-word; }
.r11-body [itemtype$="/Recipe"] { display: flex; flex-direction: column; align-items: flex-start; }
.r11-body [itemtype$="/Recipe"] > * { max-width: 100%; }
/* фото готового блюда — сразу под названием (в разметке оно после описания); переносы строк между блоками — отступами */
.r11-body [itemtype$="/Recipe"] > center:first-of-type { order: -2; align-self: stretch; }
.r11-body [itemtype$="/Recipe"] > img.pb-4 { order: -1; }
.r11-body [itemtype$="/Recipe"] > br, .r11-body p:empty, .r11-body #more { display: none; }
.r11-body center { display: block; text-align: left; }
.r11-body p { margin: 0 0 .9em; }
.r11-body b, .r11-body strong { font-weight: 650; }
.r11-body big { font-size: inherit; }
.r11-body img { height: auto; max-width: 100%; }
.r11-body iframe { max-width: 100%; }
.r11-body a { overflow-wrap: anywhere; }

/* название; значки «авторский рецепт» и «распечатать» в нём — маленькие, печать — удобная кнопка */
.r11-body h1 { margin: 10px 0 0; font: 480 clamp(1.875rem, 1.2rem + 2.4vw, 2.75rem)/1.14 var(--display); letter-spacing: -.02em; color: var(--cherry); text-wrap: balance; }
.r11-body h1 a { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; min-width: 44px; min-height: 44px; border-radius: 3px; }
.r11-body h1 a:hover { background: var(--apricot-l); }
.r11-body h1 img { display: inline-block; width: auto; height: 26px; }
/* колпак и печать (значки набора, ниже) — вместе с последним словом: переносятся только с ним, в одной строке; слово, которому
   со значками не хватает строки телефона («"мономолекулярное"»), переносится внутри (по слогам, где браузер умеет), а значки
   остаются при его конце */
.r11-body h1 .r-nowrap { display: inline-flex; align-items: last baseline; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.r11-body h1 .r-icon { width: 28px; height: 28px; }

/* фото готового блюда — в белом паспарту с лёгким наклоном, как рецепт дня на главной; своего размера, не больше */
.r11-body img.pb-4 { margin: 28px 0 30px 6px; rotate: -1.4deg; }

/* описание — вводный абзац крупнее; без «Читать весь текст»: текст виден целиком */
.r11-body #full_description { font-size: 1.25rem; line-height: 1.6; }
.r11-body [itemtype$="/Recipe"] > center > b { display: block; margin-top: 14px; font: 400 .9375rem/1.55 var(--text); color: var(--muted); }
.r11-body [itemtype$="/Recipe"] > center > b a { color: var(--chestnut); }
/* у рецептов посетителей: «Рецепт прислала …» и описание внутри списка */
.r11-body [itemtype$="/Recipe"] > center > h5 { margin: 12px 0 0; font: 400 1rem/1.5 var(--text); color: var(--muted); }
.r11-body .head2 { color: var(--ink); font-weight: 600; }
.r11-body ul.ingredients > center { margin-top: 10px; font-size: 1.25rem; line-height: 1.6; }

/* совет и лирическое отступление (таблица «картинка-подпись | текст») — врезкой с медовой линейкой */
.r11-body table { display: block; max-width: 100%; overflow-x: auto; }
.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) { width: auto; margin: 18px 0 26px; padding: 2px 0 2px 18px; border-left: 3px solid var(--honey); overflow: visible; }
.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) :is(tbody, tr, td) { display: block; padding: 0; }
.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) td > br:first-child { display: none; }
.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) td img { margin-bottom: 6px; }
.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) p { margin: 0; font-size: 1.0625rem; }
.r11-body table:has(img[src*="/image/lir.gif"]) p { font-style: italic; color: var(--muted); }

/* состав: заголовок как разделы главной, подзаголовки «Тесто», «Крем» строчными, продукты — строками с волоском */
.r11-body h4, .r11-body [itemprop="recipeInstructions"]::before { margin: 34px 0 6px; font: 520 clamp(1.625rem, 1.25rem + 1.3vw, 2.125rem)/1.15 var(--display); letter-spacing: -.015em; color: var(--cherry); }
/* «СОСТАВ» (так в 3140 рецептах) — «Состав»; подзаголовки состава буквы не меняют: в них бывают названия
   («ЗАВАРНОЙ КРЕМ "ШАРЛОТТ"» строчными стал бы «крем "шарлотт"») — заглавные просто мельче и с разрядкой */
.r11-body h4 { text-transform: lowercase; }
.r11-body h4::first-letter { text-transform: uppercase; }
.r11-body h4 ~ h5 { margin: 22px 0 2px; font: 650 .9375rem/1.35 var(--text); letter-spacing: .03em; color: var(--cherry); }
.r11-body ul.ingredients { align-self: stretch; margin: 0; padding: 0; list-style: none; font-variant-numeric: lining-nums; }
.r11-body .ingredients li { position: relative; padding: 9px 0 9px 24px; border-bottom: 1px solid var(--line); line-height: 1.45; }
.r11-body .ingredients li::before { content: ""; position: absolute; left: 3px; top: calc(9px + .62em); width: 8px; height: 8px; border-radius: 50%; background: var(--honey); }
.r11-body :is(center, .r-kalor) a[href*="/kkal/"] { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font: 500 1rem/1.3 var(--text); }
.r11-body :is(center, .r-kalor) a[href*="/kkal/"] b { font-weight: 500; }

/* приготовление: заголовок добавлен оформлением (в разметке его нет), шаги — текст и фото своего размера */
.r11-body [itemprop="recipeInstructions"] { align-self: stretch; margin-top: 8px; }
.r11-body [itemprop="recipeInstructions"]::before { content: "Приготовление"; display: block; margin-bottom: 14px; }
.r11-body [itemprop="recipeInstructions"] p.mt-4 { margin-top: 1.4em; }
.r11-body [itemprop="recipeInstructions"] img { margin: 22px 0 6px; }
.r11-body [itemprop="recipeInstructions"] p > b:first-child { color: var(--cherry); }

/* ——— рецепт по полям (lib/RecipeView.class.php; так строит рецепт рабочий сайт с 21.11.2026). Разметка — как у рабочего
   сайта, меняем только вид. Значки одним набором (/data/img/notes/*.png) — маской цветом заголовков; совет, «это интересно»,
   постный вариант и лирическое отступление — врезкой с медовой линейкой, как совет и отступление прежней вёрстки выше ——— */
.r11-body .r-icon { display: inline-block; flex: none; width: 24px; height: 24px; background: var(--cherry); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.r11-body .r-icon--sovet { --i: url(/data/img/notes/sovet.png); }
.r11-body .r-icon--rekl { --i: url(/data/img/notes/rekl.png); }
.r11-body .r-icon--lir { --i: url(/data/img/notes/lir.png); }
.r11-body .r-icon--lent { --i: url(/data/img/notes/lent.png); }
.r11-body .r-icon--avt { --i: url(/data/img/notes/avt.png); }
.r11-body .r-icon--printer { --i: url(/data/img/notes/printer.png); }
.r11-body .r-main { align-self: stretch; }
.r11-body .r-sender { order: -2; margin: 12px 0 0; font: 400 1rem/1.5 var(--text); color: var(--muted); text-align: left; }
/* «Лирическое отступление — в конце рецепта ↓» — под фото, только когда отступление стоит после шагов (телефон) */
.r11-body .r-lyric-teaser { order: -1; display: none; align-items: center; min-height: 44px; margin: -12px 0 12px; font: 500 1rem/1.3 var(--text); text-wrap: pretty; }
.r11-body .r-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 600 1rem/1.3 var(--text); color: var(--cherry); }
.r11-body :is(.r-note, .r-lent, .r-lyric) { margin: 18px 0 26px; padding: 2px 0 2px 18px; border-left: 3px solid var(--honey); }
.r11-body :is(.r-note, .r-lent, .r-lyric) > div { font-size: 1.0625rem; }
.r11-body .r-lyric > div { font-style: italic; color: var(--muted); }
.r11-body [itemprop="recipeInstructions"] img.r-note-photo { display: block; margin: 4px 0 10px; }
.r11-body .r-yield { margin: 0 0 4px; font: 400 1rem/1.5 var(--text); color: var(--muted); }
.r11-body .r-caption { margin: 0 0 1em; font: 400 .9375rem/1.45 var(--text); color: var(--muted); }
.r11-body .r-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.r11-body .r-table { border-collapse: collapse; font: 400 1rem/1.45 var(--text); }
.r11-body .r-table td { padding: 6px 10px; border: 1px solid var(--line); vertical-align: top; }
.r11-body .r-cats { margin: 28px 0 0; font: 400 1rem/1.6 var(--text); color: var(--muted); }
.r11-body .r-cats b { font-weight: 600; color: var(--ink); }
/* «Ещё по теме» — карточками, как списки рецептов в разделах (design-category11.css) */
.r11-body .r-more { margin-top: 30px; }
.r11-body .r-more > p { margin: 0; font: 520 1.375rem/1.2 var(--display); color: var(--cherry); }
.r11-body .r-more > p b { font-weight: inherit; }
.r11-body .r-more ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 24px 20px; margin: 14px 0 0; padding: 0; list-style: none; }
.r11-body .r-more a { display: block; color: var(--cherry); font: 500 1.0625rem/1.3 var(--display); text-decoration: none; overflow-wrap: break-word; }
.r11-body .r-more a:hover { color: var(--bright); text-decoration: underline; text-decoration-thickness: 1px; }
.r11-body .r-more img { --w: 150px; display: block; aspect-ratio: 3 / 2; object-fit: cover; margin: 0 0 8px; }
/* компьютер: отступление — записка на полях рядом с составом (как у рабочего сайта); список состава встаёт рядом с ней */
@media (min-width: 761px) {
	.r11-body .r-lyric { float: right; width: 40%; margin: 40px 0 18px 28px; }
	.r11-body .r-main ul.ingredients { display: flow-root; }
	.r11-body .r-main > .r11-ad-in, .r11-body .r-main > [itemprop="recipeInstructions"] { clear: both; }
}
/* телефон: отступление — после шагов, постный вариант и «Ещё по теме» — за ним (как у рабочего сайта) */
@media (max-width: 760px) {
	.r11-body .r-main { display: flex; flex-direction: column; }
	.r11-body .r-lyric { order: 1; } .r11-body .r-lent { order: 2; } .r11-body .r-more { order: 3; }
	.r11-body .r-lyric-teaser { display: inline-flex; }
}

/* реклама внутри рецепта — между составом и приготовлением */
.r11-ad-in { align-self: stretch; margin: 40px 0 36px; font-family: var(--text); }

.r11-dates { display: flex; flex-wrap: wrap; gap: 2px 24px; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }

/* ——— «Также можно посмотреть» — строками, как «Самые обсуждаемые» на главной ——— */
.r11-more .n11-best__img img { aspect-ratio: 3 / 2; object-fit: cover; }

/* ——— отзывы: виджет Cackle и старые отзывы из базы ——— */
.r11-comments .r11-ad-comm { margin: 0 0 var(--sec); }
.r11-comments > .n11-h { margin-bottom: 18px; }
.r11-comments center { display: block; text-align: left; }
.r11-comments table.comments { display: block; width: auto; max-width: 42rem; border-collapse: collapse; overflow-wrap: anywhere; }   /* старые отзывы: ссылки и слова через запятую без пробела переносятся, а не уводят страницу вбок */
.r11-comments table.comments :is(tbody, tr, td) { display: block; }
.r11-comments table.comments tr[bgcolor] { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); background: none; font-size: .9375rem; color: var(--muted); }
.r11-comments table.comments tr[bgcolor] td { padding: 0; }
.r11-comments table.comments tr[bgcolor] b { color: var(--ink); font-weight: 600; }
.r11-comments table.comments .message_row td { padding: 4px 0 0; font: 400 1.0625rem/1.6 var(--display); }
.r11-comments table.comments .moderator { margin-top: 8px; padding: 8px 14px; border-left: 3px solid var(--honey); background: var(--apricot-l); font: 400 1rem/1.55 var(--display); }

/* ——— компьютер: путеводитель справа, как на главной (сетка .n11-spread из design-v11.css) ——— */
@media (min-width: 1024px) {
	.r11-recipe, .r11-more, .r11-comments, .r11-spread > .n11-ad { max-width: 42rem; }
}

/* ——— телефон ——— */
@media (max-width: 760px) {
	.r11-spread { margin-top: 12px; padding-top: 4px; }
	.r11-body h1 { font-size: 1.75rem; }
	.r11-body h1 a { min-width: 36px; }   /* значки при названии — уже: чаще помещаются в строку с последним словом */
	.r11-body h1 .r-icon { width: 24px; height: 24px; }
	.r11 .breadcrumb .active { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* название — сразу ниже, в заголовке */
	.r11-body { font-size: 1.125rem; }
	.r11-body #full_description, .r11-body ul.ingredients > center { font-size: 1.1875rem; }
	.r11-body img.pb-4 { margin: 18px 4px 24px; rotate: -1deg; }
	.r11-body [itemtype$="/Recipe"] > img.pb-4 { max-width: calc(100% - 8px - 2 * var(--mat)); }
	.r11-body table:has(img[src*="/image/lir.gif"], img[src*="/image/sovet.gif"]) { padding-left: 14px; }
	.r11 .breadcrumb a { min-height: 44px; }
}
