@import url("/fonts/fonts.css");

/* ============================================================
   Katerina Baking — публичная часть.
   Один акцент (вишня), одна шкала скруглений, два шрифта:
   Playfair Display — только заголовки и цифры,
   Onest — весь остальной текст и интерфейс.
   Стили админки вынесены в admin.css.
   ============================================================ */

:root {
  --ink: #3a1f25;
  --ink-soft: #5c3f44;
  --muted: #806a6e;
  --berry: #c2365a;
  --berry-deep: #8d2340;
  --pink: #f2c4ce;
  --blush: #fdf0f2;
  --cream: #fdf8f4;
  --paper: #fffdfb;
  --line: #ecdcd9;
  --line-strong: #ddc6c3;

  /* Скругления. Контейнеры — 22, внутренние блоки и поля — 12,
     всё интерактивное (кнопки, ссылки-таблетки, метки) — круглое. */
  --r-lg: 22px;
  --r-md: 12px;
  --r-pill: 999px;

  /* Тени тонированы в цвет фона, а не чёрные. */
  --shadow-soft: 0 18px 44px -20px rgba(90, 38, 50, .30);
  --shadow-lift: 0 28px 64px -26px rgba(90, 38, 50, .42);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur: .26s;
  --section: clamp(76px, 9vw, 132px);

  /* Кадрирование обложек рецептов — одно место на весь сайт. Вернули в центр:
     демонстрационные обложки с рекламной надписью по краю убраны, у настоящих
     фото Катерины десерт стоит в середине квадратного кадра. */
  --cover-pos: center;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.65 Onest, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

/* Видимая рамка фокуса нужна тем, кто ходит по сайту с клавиатуры. */
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; border-radius: 6px; }

.shell { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 0 0 var(--r-md) 0; font-size: 14px; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- Типографика ---------- */

h1, h2, h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-weight: 500; letter-spacing: -.022em; }
h1 { font-size: clamp(44px, 5.4vw, 74px); line-height: 1.06; }
h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; }
h3 { font-size: clamp(23px, 2.2vw, 28px); line-height: 1.2; }

/* Курсивные акценты — фирменный приём. Кириллические «у», «р», «д», «ц»
   уходят под строку, поэтому здесь запас по высоте и снизу. */
h1 em, h2 em, h3 em { display: inline-block; padding-bottom: .08em; color: var(--berry); font-style: italic; font-weight: 500; line-height: 1.12; }

.eyebrow { margin: 0 0 14px; color: var(--berry-deep); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .13em; }
.eyebrow.light { color: var(--pink); }

.lead { max-width: 34em; color: var(--ink-soft); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.62; text-wrap: pretty; }

/* Ширину строки задаёт <br> в разметке, а не максимальная ширина:
   при жёстком ограничении «с удовольствием» ломалось на две строки. */
.section-heading { margin-bottom: clamp(40px, 5vw, 64px); text-wrap: balance; }

/* ---------- Кнопки ---------- */

.button {
  min-height: 54px; padding: 0 30px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--r-pill);
  background: var(--berry); color: #fff;
  font: 600 15px/1 Onest, ui-sans-serif, system-ui, sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease), background-color .2s var(--ease), box-shadow var(--dur) var(--ease);
}
.button:hover { background: var(--berry-deep); transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.button:active { transform: translateY(0) scale(.985); }
.small-button { min-height: 46px; padding-inline: 22px; font-size: 14px; }

.outline-button {
  min-height: 52px; padding: 0 26px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, .5); border-radius: var(--r-pill);
  color: #fff; font: 600 15px/1 Onest, ui-sans-serif, system-ui, sans-serif; text-decoration: none;
  transition: transform var(--dur) var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.outline-button:hover { border-color: #fff; background: #fff; color: var(--berry-deep); transform: translateY(-2px); }
.outline-button:active { transform: translateY(0) scale(.985); }

.text-link { color: var(--berry-deep); font-weight: 550; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color .2s var(--ease); }
.text-link:hover { color: var(--berry); }

/* ---------- Шапка ---------- */

.nav { position: sticky; z-index: 50; top: 0; background: rgba(253, 248, 244, .88); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.nav-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; white-space: nowrap; text-decoration: none; font-family: "Playfair Display", Georgia, serif; font-size: 21px; letter-spacing: -.015em; }
.brand b { color: var(--berry); font-style: italic; font-weight: 500; }
.brand-cherries { display: block; flex: 0 0 auto; width: 29px; height: 28px; }
.footer-brand .brand-cherries, .admin-header .brand-cherries, .admin-login .brand .brand-cherries { width: 25px; height: 24px; }

.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; transition: color .2s var(--ease); }
.nav-links a:not(.instagram-link):hover { color: var(--berry); }
.nav-signed { color: var(--berry-deep); font-weight: 650; }
.nav-panel a.nav-signed { color: var(--berry-deep); }
.instagram-link { padding: 11px 19px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-weight: 550; transition: border-color .2s var(--ease), background-color .2s var(--ease), transform var(--dur) var(--ease); }
.instagram-link:hover { border-color: var(--berry); background: var(--blush); transform: translateY(-1px); }

/* Мобильное меню на <details>: раскрывается силами браузера, без JavaScript
   (в Content-Security-Policy скрипты запрещены намеренно). */
.nav-menu { display: none; position: relative; }
.nav-menu summary { width: 46px; height: 46px; display: grid; place-items: center; border-radius: var(--r-pill); border: 1px solid var(--line-strong); cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.nav-menu summary::-webkit-details-marker { display: none; }
/* Три полоски: средняя — сам span, крайние — его псевдоэлементы. */
.nav-menu summary span { position: relative; display: block; width: 18px; height: 1.6px; border-radius: 2px; background: var(--ink); }
.nav-menu summary span::before, .nav-menu summary span::after { content: ""; position: absolute; left: 0; width: 18px; height: 1.6px; border-radius: 2px; background: var(--ink); }
.nav-menu summary span::before { top: -6px; }
.nav-menu summary span::after { top: 6px; }
.nav-menu[open] summary { border-color: var(--berry); }
.nav-panel { position: absolute; right: 0; top: calc(100% + 12px); min-width: 230px; padding: 10px; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-lift); }
.nav-panel a { padding: 13px 16px; border-radius: var(--r-md); font-size: 16px; font-weight: 500; text-decoration: none; }
.nav-panel a:hover { background: var(--blush); color: var(--berry-deep); }

/* ---------- Первый экран ---------- */

.hero { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(40px, 5vw, 68px); align-items: center; padding: clamp(44px, 5vw, 72px) 0 var(--section); }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }

.author-pill { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 7px 16px 7px 7px; border-radius: var(--r-pill); background: var(--blush); color: var(--berry-deep); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; }
.author-pill span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--berry); color: #fff; font-family: "Playfair Display", Georgia, serif; font-size: 17px; font-style: italic; letter-spacing: 0; }

.hero .lead { margin: 26px 0 38px; }

/* Четыре ячейки в две колонки. В один ряд они не встают: «РЭУ им. Плеханова»
   при четверти ширины ломается на две строки и весь ряд перекашивает.
   subgrid выравнивает подписи по одной линии внутри ряда, даже когда
   значение сверху переносится. */
.trust-row { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, auto auto); border-top: 1px solid var(--line); }
.trust-row div { padding: 20px 20px 0 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 3px; }
.trust-row div:nth-child(even) { padding-right: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.trust-row div:nth-child(n+3) { margin-top: 20px; border-top: 1px solid var(--line); }
/* Кегль подобран так, чтобы «РЭУ им. Плеханова» помещалось в одну строку. */
.trust-row strong { font-family: "Playfair Display", Georgia, serif; font-size: clamp(17px, 1.35vw, 20px); font-weight: 500; letter-spacing: -.01em; }
.trust-row span { color: var(--muted); font-size: 12px; }

/* Соотношение сторон вместо жёсткой высоты: кадр не «прыгает» на узких экранах. */
/* Обложки приходят квадратными. Рамка 4:5 срезала по 10% с каждой
   стороны: тарелка уходила за край и кадр читался как слишком тесный. */
.hero-visual { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-lg); background: var(--pink); box-shadow: var(--shadow-lift); text-decoration: none; }
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--cover-pos); }

/* ---------- Заглушка вместо отсутствующего фото ---------- */

/* Волосяная линия по краю кадра: светлое фото не сливается с фоном страницы
   и не выглядит дырой. На layout не влияет, поэтому outline, а не border. */
.hero-visual, .recipe-card-image, .recipe-detail-cover { outline: 1px solid rgba(90, 38, 50, .07); outline-offset: -1px; }

.cover-fallback { position: relative; display: grid; place-items: center; overflow: hidden; background: var(--blush); color: var(--berry); isolation: isolate; }
.cover-fallback::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(45deg, var(--pink) 25%, transparent 25%), linear-gradient(-45deg, var(--pink) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--pink) 75%), linear-gradient(-45deg, transparent 75%, var(--pink) 75%); background-size: 46px 46px; background-position: 0 0, 0 23px, 23px -23px, -23px 0; }
.cover-fallback span { width: clamp(84px, 12vw, 116px); height: clamp(84px, 12vw, 116px); display: grid; place-items: center; border-radius: 50%; background: var(--paper); font-family: "Playfair Display", Georgia, serif; font-size: clamp(42px, 6vw, 58px); font-style: italic; box-shadow: var(--shadow-soft); }

/* ---------- Каталог рецептов ---------- */

.catalog { padding-bottom: var(--section); }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px); }

/* Карточка без коробки: рамка и тень вокруг текста выглядят шаблонно,
   работу выполняют само фото и воздух между блоками. */
.recipe-card { display: flex; flex-direction: column; }
.recipe-card-image { display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-lg); background: var(--pink); box-shadow: var(--shadow-soft); }
.recipe-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--cover-pos); transition: transform .6s var(--ease); }
.recipe-card:hover .recipe-card-image img { transform: scale(1.04); }
.recipe-card-copy { flex: 1; display: flex; flex-direction: column; padding-top: 26px; }
.recipe-card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.recipe-card-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; margin: 0 9px 3px 0; border-radius: 50%; background: var(--line-strong); vertical-align: middle; }
.recipe-card h3 a { text-decoration: none; }
.recipe-card h3 a:hover { color: var(--berry-deep); }
.recipe-card-copy > p { margin: 12px 0 24px; color: var(--muted); font-size: 16px; line-height: 1.6; }
/* Кнопки всех карточек стоят на одной линии, даже если описания разной длины. */
.recipe-card-footer { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
/* «Подробнее» ссылкой, «Купить» кнопкой: главное действие карточки — покупка. */
.recipe-card-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.recipe-card-footer > strong { font-family: "Playfair Display", Georgia, serif; font-size: 30px; font-weight: 500; }

/* Единственный рецепт: карточка-разворот. Фото слева, текст справа — зеркально
   первому экрану, где фото справа, поэтому две большие карточки одного торта
   подряд не выглядят повтором. */
.catalog-grid-single { grid-template-columns: 1fr; }
.catalog-grid-single .recipe-card { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.catalog-grid-single .recipe-card-image { aspect-ratio: 1 / 1; }
.catalog-grid-single .recipe-card-copy { padding-top: 0; }
.catalog-grid-single .recipe-card h3 { font-size: clamp(30px, 3.4vw, 44px); }
.catalog-grid-single .recipe-card-copy > p { max-width: 42ch; font-size: 17px; }
.catalog-grid-single .recipe-card-footer { max-width: 380px; }

.empty-catalog { padding: 48px 40px; border-radius: var(--r-lg); background: var(--blush); color: var(--ink-soft); text-align: center; }

/* ---------- Что внутри рецепта ---------- */

.benefits { padding-bottom: var(--section); display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.benefits .section-heading { margin-bottom: 0; }
.benefit-list { display: grid; }
.benefit-list article { padding: 26px 0; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.benefit-list article:first-child { padding-top: 0; border-top: 0; }
.benefit-list h3 { font-family: Onest, ui-sans-serif, system-ui, sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -.005em; }
.benefit-list p { max-width: 46em; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ---------- Блок о Катерине ---------- */

.about { padding: var(--section) 0; overflow: hidden; background: var(--berry-deep); color: #fff; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(44px, 6vw, 96px); align-items: center; }
.about-card { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-lg); background: var(--pink); isolation: isolate; }
/* Фото автора занимает карточку целиком. Снимок квадратный, а карточка на
   разных ширинах то 4/5, то 1/1 — поэтому обрезка по центру, а не растяжение. */
.about-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
/* Подпись лежит на светлой части снимка, поэтому под ней затемнение,
   иначе текст пропадает на белом креме торта. */
.about-card figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 64px 30px 26px; margin: 0; color: #fff; font: italic 500 20px/1.35 "Playfair Display", Georgia, serif; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); background: linear-gradient(to top, rgba(24, 6, 12, .82) 0%, rgba(24, 6, 12, .58) 42%, rgba(24, 6, 12, 0) 100%); pointer-events: none; }
.about-copy h2 em { color: var(--pink); }
.about-copy > p:not(.eyebrow) { max-width: 40em; margin: 28px 0 36px; color: #f6dde2; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.7; }

/* ---------- Подвал ---------- */

.footer { padding-block: 44px 52px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 24px; }
.footer-links a { text-decoration: none; transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--berry); }

/* ---------- Страница рецепта ---------- */

.page-back { padding: 26px 0 0; font-size: 15px; }
/* Плашка «вы смотрите как администратор». Намеренно заметная: без неё владелец
   принимает свой служебный доступ за сломанную оплату. Посетителю не видна
   никогда — выводится только при активной сессии админки. */
.admin-preview-bar { margin-top: 22px; padding: 13px 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; border: 1px solid #e6c9c0; border-radius: 12px; background: #fdf3ec; color: #7a4a33; font-size: 14px; line-height: 1.5; }
.admin-preview-bar a { color: inherit; font-weight: 600; text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font: inherit; text-decoration: none; cursor: pointer; transition: color .2s var(--ease); }
.back-link:hover { color: var(--berry); }

.recipe-detail { padding: clamp(28px, 4vw, 48px) 0 var(--section); display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(40px, 5vw, 72px); align-items: start; }
.recipe-detail-cover { position: sticky; top: 106px; display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-lg); background: var(--pink); box-shadow: var(--shadow-lift); }
.recipe-detail-cover img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--cover-pos); }
.recipe-detail-copy h1 { margin-bottom: 18px; }
.recipe-subtitle { margin: 0 0 16px; color: var(--ink-soft); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; }
.recipe-description { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.68; }

.recipe-facts { margin: 30px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.recipe-facts span { padding: 9px 16px; border-radius: var(--r-pill); background: var(--blush); color: var(--berry-deep); font-size: 13px; font-weight: 550; }

.recipe-includes { margin: 0 0 34px; padding: 26px 28px; display: grid; gap: 14px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
.recipe-includes h2 { font-family: Onest, ui-sans-serif, system-ui, sans-serif; font-size: 16px; font-weight: 600; letter-spacing: .01em; }
.recipe-includes ul { margin: 0; padding: 0; display: grid; gap: 11px; list-style: none; }
.recipe-includes li { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.recipe-includes li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--berry); transform: translateY(-2px); }

.recipe-price { margin-bottom: 22px; display: flex; align-items: baseline; gap: 14px; }
.recipe-price span { color: var(--muted); font-size: 14px; }
.recipe-price strong { font-family: "Playfair Display", Georgia, serif; font-size: clamp(40px, 4vw, 52px); font-weight: 500; line-height: 1; }

/* ---------- Формы покупки и восстановления доступа ---------- */

.buy-card { padding: clamp(26px, 3vw, 34px); border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.site-form { display: grid; gap: 18px; }
.site-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 550; }
.site-form input[type="email"], .site-form input[type="text"], .site-form input[type="password"] { min-height: 52px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--cream); color: var(--ink); font: 400 16px/1.5 Onest, ui-sans-serif, system-ui, sans-serif; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
/* Затемнено до контраста 4.5:1 — прежний светло-серый не читался. */
.site-form input::placeholder { color: #877074; }
.site-form input:hover { border-color: #cfb3b1; }
.site-form input:focus { outline: none; border-color: var(--berry); box-shadow: 0 0 0 3px rgba(194, 54, 90, .14); }
.site-form .consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.5; }
.site-form .consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--berry); }
.site-form .button { margin-top: 4px; }
.site-form button.text-link { justify-self: start; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--berry-deep); font: inherit; cursor: pointer; }

.form-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.form-note a { color: var(--berry-deep); text-underline-offset: 3px; }
.form-error { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--r-md); background: #fdeaee; color: #8d2340; font-size: 14px; font-weight: 500; }

/* ---------- Состояния: куплено, ошибка, пусто ---------- */

.state-card { padding: clamp(26px, 3vw, 34px); border-radius: var(--r-lg); background: var(--blush); border: 1px solid var(--line); }
.state-card strong { display: block; margin-bottom: 8px; font-family: "Playfair Display", Georgia, serif; font-size: 25px; font-weight: 500; }
.state-card p { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.state-card p:last-child { margin-bottom: 0; }

.page-state { max-width: 620px; padding: clamp(56px, 9vw, 110px) 0 var(--section); }
.page-state .page-state-icon { width: 72px; height: 72px; margin-bottom: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--blush); color: var(--berry); font: italic 500 38px/1 "Playfair Display", Georgia, serif; }
.page-state h1 { margin-bottom: 18px; font-size: clamp(36px, 4.6vw, 54px); }
.page-state > p { margin: 0 0 28px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.page-state .site-form { max-width: 420px; }
.page-state-actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin: 28px 0 0; }
/* На странице перехода к оплате блок действий — это форма, а после неё
   идёт поясняющая строка: без отбивки кнопка липла к карточке и к тексту. */
.page-state-actions + .form-note { margin-top: 18px; }

/* ---------- Юридические страницы ---------- */

.legal { width: min(720px, calc(100% - 48px)); margin: clamp(44px, 6vw, 72px) auto var(--section); }
.legal h1 { margin-bottom: 30px; font-size: clamp(32px, 4vw, 46px); }
.legal h2 { margin: 44px 0 14px; font-family: Onest, ui-sans-serif, system-ui, sans-serif; font-size: 20px; font-weight: 600; letter-spacing: -.005em; }
.legal p, .legal li { color: var(--ink-soft); font-size: 16px; line-height: 1.75; }
.legal p { margin: 0 0 15px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal p b, .legal p strong { color: var(--ink); font-weight: 600; }
.legal a { color: var(--berry-deep); text-underline-offset: 3px; }
.legal-note { padding: 18px 20px; border-radius: var(--r-md); background: #fdf4dd; color: #6b5514 !important; font-size: 15px; font-weight: 500; }
.legal-checkbox-example { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }

/* Шапка документа: название, дата редакции и продавец — то, что человек
   ищет глазами первым делом и что обязано попасть в распечатку. */
.legal-meta { margin: 0 0 34px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); display: grid; gap: 14px; }
.legal-meta div { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 6px 18px; }
.legal-meta dt { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.legal-meta dd { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.legal-tools { margin: 44px 0 0; }
.legal-print-hint { margin: 0; padding: 16px 20px; border-radius: var(--r-md); background: var(--blush); color: var(--muted); font-size: 14px; line-height: 1.6; }
.legal-related { margin-top: 34px; }
.legal-related h2 { margin-bottom: 10px; font-size: 17px; }
.legal-related p, .legal-related li { font-size: 15px; }
.legal-return { margin-top: 40px; }

/* Настройка cookie живёт на постоянном адресе /cookies.php#cookie-settings —
   именно туда ведёт кнопка «Настроить» в баннере. */
.cookie-settings { margin-top: 44px; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); scroll-margin-top: 90px; }
.cookie-settings h2 { margin-top: 0; }
.cookie-settings .consent { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin-bottom: 16px; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.cookie-settings .consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--berry); }
.cookie-settings-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Баннер согласия. Показывается только когда на сайте реально есть
   необязательные скрипты; работает без JavaScript — выбор уходит формой. */
.cookie-banner { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 90; width: min(980px, calc(100% - 32px)); padding: 22px 24px; transform: translateX(-50%); background: rgba(255, 253, 251, .98); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 22px 70px rgba(58, 31, 37, .22); }
.cookie-banner-inner { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px 30px; }
.cookie-banner p { margin: 0; max-width: 62ch; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cookie-banner .button { padding: 12px 20px; font-size: 15px; }
.button-quiet { background: transparent; color: var(--berry-deep); border: 1px solid var(--line-strong); box-shadow: none; }
.button-quiet:hover { background: var(--blush); color: var(--berry-deep); box-shadow: none; }

/* Юридические ссылки рядом с полями формы заказа: покупатель должен видеть
   их в момент решения, а не искать в подвале. */
.checkout-legal { margin-top: 14px; }
.checkout-legal-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.checkout-legal-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.checkout-legal-links a:hover { color: var(--berry-deep); }
.site-form .consent-optional { margin-top: -4px; }
.order-legal ul { margin: 0; padding-left: 20px; }
.order-legal li { margin-bottom: 6px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.footer-legal a { text-decoration: none; }
.footer-secondary { margin-top: 6px; font-size: 14px; opacity: .85; }

/* ============================================================
   Открытый рецепт: то, что видит покупатель после оплаты.
   Отдельная вёрстка от витрины: там задача — продать, здесь —
   чтобы человек с мукой на руках нашёл нужную строчку с телефона.
   ============================================================ */

.recipe-full { padding-bottom: var(--section); }
.recipe-watermark { position: fixed; right: clamp(12px, 2vw, 28px); bottom: clamp(12px, 2vw, 28px); z-index: 24; max-width: 220px; padding: 9px 12px; border: 1px solid rgba(141, 35, 64, .14); border-radius: 10px; background: rgba(255, 253, 251, .78); color: rgba(141, 35, 64, .32); font-size: 10px; font-weight: 750; line-height: 1.35; letter-spacing: .08em; text-align: center; text-transform: uppercase; pointer-events: none; transform: rotate(-4deg); backdrop-filter: blur(4px); }

/* ---------- Шапка открытого рецепта ---------- */

.recipe-hero { padding: clamp(24px, 3vw, 40px) 0 clamp(56px, 7vw, 96px); display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(36px, 5vw, 72px); align-items: center; }
.recipe-hero-copy { min-width: 0; }
.recipe-unlocked-pill { margin-bottom: 24px; }
.recipe-unlocked-pill span { font-family: Onest, ui-sans-serif, system-ui, sans-serif; font-size: 15px; font-style: normal; font-weight: 700; }
.recipe-hero h1 { font-size: clamp(38px, 4.6vw, 62px); }
.recipe-hero .lead { margin: 20px 0 32px; }

/* Ключевые цифры рецепта. subgrid держит подписи на одной линии, даже когда
   значение сверху переносится («165°, 30–40 мин»). */
.recipe-spec { width: 100%; margin: 0 0 34px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto; border-top: 1px solid var(--line); }
.recipe-spec > div { padding: 18px 16px 0 0; display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: 4px; }
.recipe-spec > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.recipe-spec dt { order: 2; color: var(--muted); font-size: 12px; }
.recipe-spec dd { order: 1; margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; letter-spacing: -.01em; }

.recipe-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

.recipe-hero-photo { overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-lg); outline: 1px solid rgba(90, 38, 50, .07); outline-offset: -1px; background: var(--pink); box-shadow: var(--shadow-lift); }
.recipe-hero-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--cover-pos); }

.recipe-intro { max-width: 60ch; margin: 0 0 clamp(40px, 5vw, 68px); padding-left: 18px; border-left: 2px solid var(--pink); color: var(--ink-soft); font-size: 17px; font-style: italic; line-height: 1.7; }

/* ---------- Общая раскладка разделов рецепта ---------- */

.recipe-part { padding-bottom: clamp(56px, 7vw, 96px); }
.part-heading { max-width: 30em; margin-bottom: clamp(30px, 4vw, 46px); text-wrap: balance; }
.part-heading h2 { font-size: clamp(30px, 3.6vw, 46px); }
.part-heading p { max-width: 44ch; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* ---------- Ингредиенты ---------- */

/* Пять составляющих торта — пять карточек. Бисквит идёт первым и во всю
   ширину: в нём девять позиций, и в узкой колонке список уезжал бы вниз
   мимо остальных. */
.ingredient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2vw, 26px); }
.ingredient-group { padding: clamp(22px, 2.4vw, 30px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.ingredient-group-wide { grid-column: 1 / -1; }

.ingredient-group > header { margin-bottom: 18px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; border-bottom: 1px solid var(--line); }
.ingredient-group h3 { font-size: clamp(20px, 1.9vw, 24px); }
.ingredient-group > header span { color: var(--berry-deep); font-size: 13px; font-weight: 550; }

.ingredient-group ul { margin: 0; padding: 0; list-style: none; }
.ingredient-group-wide ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); }
.ingredient-group li { padding: 9px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; align-items: baseline; border-bottom: 1px dotted var(--line-strong); }
.ingredient-group li:last-child { border-bottom: 0; }
.ingredient-group-wide li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
.ingredient-name { color: var(--ink-soft); font-size: 16px; line-height: 1.45; }
.ingredient-amount { font-family: "Playfair Display", Georgia, serif; font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ingredient-note { grid-column: 1 / -1; margin-top: 4px; color: var(--muted); font-size: 13.5px; font-style: italic; line-height: 1.5; }

/* ---------- Этапы приготовления ---------- */

.stage-list { margin: 0; padding: 0; list-style: none; display: grid; gap: clamp(34px, 4vw, 54px); }
.stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(18px, 2.4vw, 30px); }

/* Номер этапа и линия до следующего: порядок здесь не украшение, коржи и мусс
   должны выстояться раньше сборки. */
.stage-mark { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--berry); color: #fff; font: italic 500 24px/1 "Playfair Display", Georgia, serif; box-shadow: var(--shadow-soft); }
.stage:not(:last-child) .stage-mark::after { content: ""; position: absolute; top: 60px; bottom: calc(-1 * clamp(34px, 4vw, 54px) - 8px); left: 50%; width: 1px; background: var(--line-strong); }
.stage-body { min-width: 0; padding-top: 8px; }
.stage-body h3 { font-size: clamp(23px, 2.4vw, 30px); }
.stage-meta { margin: 10px 0 0; display: inline-flex; padding: 7px 15px; border-radius: var(--r-pill); background: var(--blush); color: var(--berry-deep); font-size: 13px; font-weight: 550; }

.stage-steps { margin: 20px 0 0; padding: 0; max-width: 62ch; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.stage-steps li { position: relative; padding-left: 34px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.68; counter-increment: step; }
.stage-steps li::before { content: counter(step); position: absolute; left: 0; top: .2em; width: 22px; color: var(--berry); font-family: "Playfair Display", Georgia, serif; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Фото и видео внутри этапа ---------- */

.stage-photo, .stage-video { margin: 26px 0 0; }
/* height: auto обязателен: в разметке у фото стоят width/height, они резервируют
   место и не дают странице дёргаться при загрузке, но без auto браузер тянет
   картинку до высоты из атрибута — 1600 пикселей вместо 560. */
.stage-photo img { display: block; width: 100%; height: auto; max-width: 560px; border-radius: var(--r-lg); outline: 1px solid rgba(90, 38, 50, .07); outline-offset: -1px; box-shadow: var(--shadow-soft); }
.stage-photo figcaption, .stage-video figcaption { max-width: 46ch; margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Видео вертикальное, снято на телефон. Ширину ограничиваем, иначе на
   ноутбуке оно занимает весь экран в высоту. Автозапуска нет намеренно:
   звук и трафик включает сам человек. */
.stage-video video { display: block; width: 100%; height: auto; max-width: 340px; aspect-ratio: 9 / 16; border-radius: var(--r-lg); background: var(--ink); box-shadow: var(--shadow-lift); }

/* ---------- Что важно знать ---------- */

.recipe-notes { padding: clamp(48px, 6vw, 84px) 0; background: var(--blush); }
.recipe-notes h2 { margin-bottom: clamp(26px, 3vw, 40px); font-size: clamp(28px, 3.2vw, 42px); }
.note-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.note { padding: 22px 0; border-top: 1px solid var(--line-strong); }
.note h3 { font-family: Onest, ui-sans-serif, system-ui, sans-serif; font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
.note p { max-width: 44ch; margin: 8px 0 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.62; }

/* ---------- Финальный блок ---------- */

.recipe-takeaway { padding-top: clamp(56px, 7vw, 96px); }
.takeaway-copy { max-width: 36em; }
.takeaway-copy h2 { font-size: clamp(30px, 3.6vw, 46px); }
.takeaway-copy > p { max-width: 52ch; margin: 20px 0 32px; color: var(--ink-soft); font-size: 17px; line-height: 1.7; }
.recipe-copyright { margin-top: clamp(28px, 4vw, 42px); padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--paper); color: var(--ink-soft); }
.recipe-copyright h2 { margin: 0 0 10px; font: 700 16px/1.3 Onest, ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
.recipe-copyright p { margin: 7px 0 0; font-size: 13px; line-height: 1.6; }
.recipe-copyright a { color: var(--berry-deep); }
.recipe-copyright .recipe-support { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); }

/* ---------- Технические работы ---------- */
.maintenance-page { min-height: 100vh; overflow-x: hidden; background: var(--cream); }
.maintenance-page::before, .maintenance-page::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.maintenance-page::before { width: 420px; height: 420px; top: -180px; right: -100px; background: rgba(217, 66, 100, .12); }
.maintenance-page::after { width: 360px; height: 360px; bottom: -190px; left: -120px; background: rgba(119, 138, 85, .12); }
.maintenance-shell { width: min(960px, calc(100% - 40px)); min-height: 100vh; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0; display: grid; grid-template-rows: auto 1fr auto; gap: 36px; }
.maintenance-brand { width: max-content; }
.maintenance-card { align-self: center; max-width: 760px; padding: clamp(34px, 7vw, 76px); border: 1px solid var(--line-strong); border-radius: clamp(24px, 4vw, 42px); background: rgba(255, 253, 251, .92); box-shadow: 0 28px 80px rgba(65, 37, 42, .12); }
.maintenance-card h1 { margin: 16px 0 24px; font-size: clamp(42px, 7vw, 78px); line-height: .98; }
.maintenance-card > p:not(.eyebrow) { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); line-height: 1.7; }
.maintenance-contact { margin-top: 34px; padding-top: 24px; display: grid; gap: 6px; border-top: 1px solid var(--line); }
.maintenance-contact span { color: var(--muted); font-size: 13px; }
.maintenance-contact a { width: max-content; max-width: 100%; color: var(--berry-deep); font-size: clamp(17px, 2.3vw, 22px); font-weight: 650; overflow-wrap: anywhere; }
.maintenance-signature { margin: 0; color: var(--muted); font: italic 500 16px/1.4 Playfair, Georgia, serif; }
@media (max-width: 560px) {
  .maintenance-shell { width: min(100% - 28px, 960px); gap: 24px; }
  .maintenance-card { padding: 30px 22px; border-radius: 24px; }
  .maintenance-card h1 { font-size: clamp(38px, 12vw, 54px); }
}

/* ---------- Печать открытого рецепта ---------- */

/* Кто-то распечатает страницу, не дойдя до кнопки с PDF. Пусть на бумаге
   останется рецепт, а не шапка сайта и чёрный прямоугольник вместо видео. */
@media print {
  .nav, .footer, .page-back, .recipe-hero-actions, .stage-video, .recipe-takeaway, .skip-link, .recipe-watermark { display: none; }
  body { background: #fff; font-size: 12pt; }
  .recipe-hero { padding-top: 0; }
  .recipe-notes { background: #fff; }
  .stage, .ingredient-group, .note { break-inside: avoid; }
  .stage-photo img, .recipe-hero-photo { box-shadow: none; }

  /* Юридический документ должен печататься и сохраняться в PDF так, чтобы
     получился документ, а не снимок сайта: без меню, баннеров и подсказок,
     с читаемыми адресами вместо синих подчёркиваний. */
  .cookie-banner, .legal-tools, .legal-related, .cookie-settings, .legal-return { display: none; }
  .legal { width: 100%; max-width: none; margin: 0; padding: 0; }
  .legal h1 { margin: 0 0 18px; font-size: 22pt; }
  .legal h2 { margin: 18pt 0 6pt; font-size: 13pt; break-after: avoid; }
  .legal p, .legal li { color: #000; font-size: 11pt; line-height: 1.5; }
  .legal p, .legal li, .legal h2, .legal-meta { break-inside: avoid; }
  .legal-meta { margin-bottom: 20pt; padding: 10pt 12pt; border: 1pt solid #999; background: #fff; }
  .legal-meta dt { color: #000; font-size: 8pt; }
  .legal-meta dd { font-size: 10pt; }
  .legal-note { border: 1pt solid #999; background: #fff; color: #000 !important; }
  .legal a { color: #000; text-decoration: underline; }
  /* Ссылка на бумаге бесполезна, если не видно, куда она ведёт. */
  .legal-doc a[href^="/"]::after { content: " (katerinabaking.ru" attr(href) ")"; font-size: 9pt; }
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .legal-doc a[href^="mailto:"]::after { content: none; }
}

@page { margin: 18mm 16mm; }

/* ---------- Появление блоков при прокрутке ---------- */

/* Анимация только средствами CSS: скрипты запрещены политикой безопасности.
   Там, где браузер не умеет animation-timeline, содержимое просто видно сразу. */
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise-in linear both; animation-timeline: view(); animation-range: entry 12% entry 88%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button:hover, .outline-button:hover, .instagram-link:hover, .recipe-card:hover .recipe-card-image img { transform: none; }
}

/* ---------- Планшет ---------- */

@media (max-width: 980px) {
  .hero, .benefits, .about-grid, .recipe-detail { grid-template-columns: 1fr; }
  .hero { padding-bottom: clamp(56px, 8vw, 80px); }
  /* Обложки остаются вертикальными и на узких экранах: горизонтальный кадр
     из того же файла захватывает край рекламной надписи слева. */
  .hero-visual { max-width: 430px; }
  .about-card { max-width: 400px; aspect-ratio: 1 / 1; }
  .recipe-detail-cover { position: static; max-width: 430px; }
  .benefits .section-heading { max-width: 100%; }
  .catalog-grid { gap: 40px; }

  /* Открытый рецепт: фото уходит под текст, ингредиенты — в одну колонку. */
  .recipe-hero { grid-template-columns: 1fr; }
  .recipe-hero-photo { order: -1; max-width: 430px; }
  .ingredient-grid { grid-template-columns: 1fr; }
  .ingredient-group-wide ul { grid-template-columns: 1fr; }
  .ingredient-group-wide li:nth-last-child(2):nth-child(odd) { border-bottom: 1px dotted var(--line-strong); }
}

/* ---------- Телефон ---------- */

@media (max-width: 700px) {
  .shell { width: calc(100% - 36px); }
  .nav-inner { min-height: 64px; }
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .brand { font-size: 19px; }

  .hero { padding-top: 34px; }
  .hero .lead { margin: 22px 0 32px; }
  /* Две колонки сохраняются и на телефоне: ячейки короткие, в одну колонку
     строка доверия растянулась бы на пол-экрана. */
  .trust-row strong { font-size: 17px; }
  .hero-visual, .recipe-detail-cover { max-width: none; }

  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-grid-single .recipe-card { grid-template-columns: 1fr; gap: 0; }
  .catalog-grid-single .recipe-card-image { aspect-ratio: 1 / 1; }
  .catalog-grid-single .recipe-card-copy { padding-top: 26px; }
  .catalog-grid-single .recipe-card-footer { max-width: none; }

  .about-card { max-width: none; }
  .about-card figcaption { padding: 56px 24px 22px; font-size: 18px; }

  .footer { padding-block: 36px 44px; flex-direction: column; align-items: flex-start; gap: 20px; font-size: 13px; }
  .footer-links { justify-content: flex-start; gap: 8px 18px; }

  .recipe-includes { padding: 22px; }
  .page-state .page-state-icon { width: 62px; height: 62px; font-size: 32px; }

  /* Телефон: рецепт читают одной рукой. Цифры этапа мельче, чтобы текст шага
     не сжимался в узкую колонку, характеристики — в две пары. */
  .recipe-hero-photo { max-width: none; }
  .recipe-spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-spec > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .recipe-spec > div:nth-child(n + 3) { margin-top: 16px; border-top: 1px solid var(--line); }
  .stage { gap: 16px; }
  .stage-mark { width: 42px; height: 42px; font-size: 20px; }
  .stage:not(:last-child) .stage-mark::after { top: 50px; }
  .stage-body { padding-top: 4px; }
  .stage-steps li { padding-left: 28px; font-size: 16px; }
  .stage-video video { max-width: none; }
  .note-list { grid-template-columns: 1fr; }
  .ingredient-group li { padding: 8px 0; }
  .legal { width: calc(100% - 36px); }
  .legal h2 { margin-top: 34px; font-size: 18px; }
  .legal-meta div { grid-template-columns: 1fr; gap: 2px; }
  .cookie-banner { bottom: max(10px, env(safe-area-inset-bottom)); width: min(100% - 20px, 980px); padding: 18px; border-radius: 14px; }
  .cookie-banner-inner { grid-template-columns: 1fr; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-start; }
  .cookie-banner .button, .cookie-settings-actions .button { flex: 1 1 auto; text-align: center; }
}

@media (max-width: 420px) {
  .button { width: 100%; }
  .recipe-card-footer { flex-wrap: wrap; }
  .recipe-card-footer .button { width: auto; flex: 1; }
  .recipe-card-actions { width: 100%; justify-content: space-between; }
  .page-state-actions .button { width: 100%; }
}

/* ---------------------------------------------------------- Мои покупки
   Карточка покупки: обложка слева, название, дата и действия справа.
   На узком экране обложка уходит наверх — иначе на 320 px текст
   сжимался до двух слов в строке. */
.purchase-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; }
.purchase-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: clamp(18px, 2.4vw, 24px);
  border-radius: var(--r-lg); background: var(--blush); border: 1px solid var(--line);
}
.purchase-cover {
  flex: 0 0 96px; width: 96px; height: 96px;
  border-radius: 14px; object-fit: cover; background: var(--paper);
}
.purchase-body { min-width: 0; flex: 1 1 auto; }
.purchase-body strong {
  display: block; margin-bottom: 6px;
  font-family: "Playfair Display", Georgia, serif; font-size: 23px; font-weight: 500;
}
.purchase-body p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.purchase-body .page-state-actions { margin-top: 16px; gap: 12px 18px; }

.purchases-password { margin: 22px 0 0; }
.purchases-password > summary {
  cursor: pointer; color: var(--berry); font-size: 15px;
  padding: 6px 0; list-style: none;
}
.purchases-password > summary::-webkit-details-marker { display: none; }
.purchases-password > summary::after { content: " ▾"; }
.purchases-password[open] > summary::after { content: " ▴"; }
.purchases-password .site-form { margin-top: 12px; }

.help-faq { margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.help-faq > summary {
  cursor: pointer; color: var(--berry); font-size: 15px; font-weight: 550;
  padding: 6px 0; list-style: none;
}
.help-faq > summary::-webkit-details-marker { display: none; }
.help-faq > summary::after { content: " ▾"; }
.help-faq[open] > summary::after { content: " ▴"; }
.help-faq dl { margin: 14px 0 0; display: grid; gap: 14px; }
.help-faq dt { font-weight: 650; color: var(--ink); }
.help-faq dd { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }

@media (max-width: 520px) {
  .purchase-card { flex-direction: column; }
  .purchase-cover { flex-basis: auto; width: 100%; height: 180px; }
}
