/* =========================================================================
   Кухня Ольги — основные стили
   Токены «Тихая кухня»: тёплая бумага, чернила, терракота, золото.
   ========================================================================= */

/* ---------- Шрифты подключаются отдельно: assets/css/fonts.css ---------- */

/* ---------- Токены ---------- */
:root {
  --paper: #f6f1e8;
  --paper-2: #efe8db;
  --surface: #fffdf8;
  --ink: #171a18;
  --ink-2: #3b403b;
  --muted: #6f7d6d;
  --accent: #c45b3c;
  --accent-ink: #a2442a;
  --gold: #c9a66b;
  --line: rgba(23, 26, 24, .14);
  --line-strong: rgba(23, 26, 24, .28);
  --shadow: 0 18px 50px -28px rgba(23, 26, 24, .35);
  --radius: 16px;
  --radius-sm: 10px;
  --gap: 24px;
  --gap-sm: 12px;
  --gap-lg: 36px;
  --pad: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="dark"] {
  --paper: #141715;
  --paper-2: #1b1f1c;
  --surface: #1e2320;
  --ink: #f1ece2;
  --ink-2: #d6d1c6;
  --muted: #9aa79a;
  --accent: #e07a58;
  --accent-ink: #f09273;
  --gold: #d8b77c;
  --line: rgba(241, 236, 226, .14);
  --line-strong: rgba(241, 236, 226, .3);
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, .7);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--paper); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink); cursor: pointer; font-weight: 600;
  font-size: .92rem; letter-spacing: .01em; text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); color: var(--ink); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn--outline { border-color: rgba(255, 255, 255, .55); color: #fff; background: rgba(0, 0, 0, .12); backdrop-filter: blur(4px); }
.btn--outline:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: #fff; }
.btn--ghost { border-color: transparent; background: var(--paper-2); }
.btn--sm { padding: 8px 14px; font-size: .84rem; }
.btn--lg { padding: 14px 26px; font-size: 1rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; text-decoration: none; position: relative;
  transition: background-color .18s var(--ease);
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.fav-count {
  position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; padding: 0 4px;
}
[data-theme="light"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 20px;
  max-width: 1720px; margin-inline: auto; padding: 10px var(--pad);
  min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; line-height: 1; flex-shrink: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__tagline { font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { margin-left: 8px; }
.nav-list { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-list li { list-style: none; }
.nav-list a {
  display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  color: var(--ink-2); font-size: .92rem; font-weight: 600; transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav-list a:hover, .nav-list .current-menu-item > a { background: var(--paper-2); color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.menu-toggle { display: none; }
.reading-progress { height: 2px; background: transparent; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---------- Обёртка сетки ---------- */
.site-content { min-height: 50vh; }
.site-wrap { width: 100%; }
.layout {
  display: grid;
  gap: var(--gap-lg);
  grid-template-columns: var(--layout-cols, minmax(0, 1fr));
  grid-template-areas: var(--layout-areas, "main");
  max-width: var(--layout-max, 1440px);
  margin-inline: auto;
  padding: clamp(22px, 3.4vw, 48px) var(--pad);
  align-items: start;
}
.layout-main { grid-area: main; min-width: 0; }
.layout-zone { min-width: 0; }
.layout-zone--left, .layout-zone--right { align-self: start; }
.layout-zone.is-sticky { position: sticky; top: calc(var(--header-h) + 18px); }
.layout-zone--top, .layout-zone--bottom, .layout-zone--footer { width: 100%; }
.layout-footer-cols { display: grid; gap: var(--gap); grid-template-columns: repeat(var(--footer-cols, 3), minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "top" "main" "left" "right" "bottom" "footer" !important;
    gap: var(--gap);
  }
  .layout-zone.is-sticky { position: static; }
  .layout-footer-cols { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .layout-footer-cols { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand__tagline { display: none; }
  .brand__name { font-size: 1.02rem; }
  .brand__mark { width: 38px; height: 38px; font-size: 1.3rem; }
  .site-header__inner { gap: 8px; }
}

/* ---------- Заголовки секций ---------- */
.section-head { margin-bottom: 22px; }
.section-head--row { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); margin: 0 0 4px; }
.section-sub { color: var(--muted); margin: 0; font-size: .98rem; }
.link-arrow { font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.link-arrow span { display: inline-block; transition: transform .18s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(84vh, 760px); display: flex; align-items: flex-end;
  background: var(--ink);
  background-image: linear-gradient(180deg, rgba(10, 12, 10, .28) 0%, rgba(10, 12, 10, .72) 100%), var(--hero-image, none);
  background-size: cover; background-position: center;
  background-attachment: fixed;
  color: #f6f1e8;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero__veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.hero__content {
  position: relative; z-index: 2; padding: clamp(28px, 6vw, 72px) var(--pad) clamp(32px, 6vw, 64px);
  width: min(760px, 100%);
}
.hero__kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; color: var(--gold); margin: 0 0 14px; }
.hero__title { font-family: var(--font-display); font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .98; margin: 0 0 18px; color: #fff; }
.hero__title em { font-style: italic; color: var(--gold); }
.hero__lead { max-width: 54ch; font-size: clamp(1rem, 1.4vw, 1.18rem); color: rgba(246, 241, 232, .9); margin: 0 0 26px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero__meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: rgba(246, 241, 232, .72); letter-spacing: .04em; text-transform: uppercase; }
.hero__featured {
  position: absolute; z-index: 3; right: clamp(16px, 5vw, 64px); bottom: clamp(24px, 5vw, 56px);
  display: flex; flex-direction: column; gap: 4px; max-width: 300px;
  padding: 16px 18px; border-radius: var(--radius); text-decoration: none; color: #fff;
  background: rgba(20, 22, 20, .48); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.hero__featured:hover { transform: translateY(-3px); color: #fff; background: rgba(20, 22, 20, .62); }
.hero__featured-label { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.hero__featured-title { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.2; }
.hero__featured-meta { font-size: .78rem; color: rgba(255, 255, 255, .75); }
@media (max-width: 900px) {
  .hero { background-attachment: scroll; min-height: 72vh; }
  .hero__featured { position: static; margin: 0 var(--pad) 28px; max-width: none; background: rgba(20, 22, 20, .55); }
}

/* ---------- Мегабонусы ---------- */
.megabonuses { margin-bottom: var(--gap-lg); }
.megabonuses__grid { display: grid; gap: var(--gap-sm); grid-template-columns: repeat(auto-fill, minmax(min(100%, 292px), 1fr)); }
.bonus {
  display: flex; flex-direction: column; gap: 6px; text-align: left; text-decoration: none;
  padding: 20px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.bonus:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); color: var(--ink); }
.bonus__icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--paper-2); color: var(--accent); margin-bottom: 4px;
}
.bonus__title { font-family: var(--font-display); font-size: 1.14rem; font-weight: 600; }
.bonus__text { color: var(--muted); font-size: .86rem; line-height: 1.45; }

/* ---------- Фильтры ---------- */
.filters {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 18px; margin-bottom: 26px;
}
.filters__row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); }
.filters__field { display: flex; flex-direction: column; gap: 5px; }
.filters__field--wide { grid-column: span 2; }
.filters__field label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.filters__field select, .filters__field input {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; font-size: .9rem;
}
.filters__field input:focus, .filters__field select:focus { border-color: var(--accent); outline: none; }
.filters__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

/* ---------- Карточки ---------- */
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--card-min, 260px)), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card__link {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.card__link:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); color: var(--ink); }
.card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card__link:hover .card__img { transform: scale(1.04); }
.card__img--placeholder {
  display: grid; place-items: center; font-family: var(--font-display); font-size: 3rem;
  color: var(--muted); background: var(--paper-2);
}
.card__badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .72rem;
  letter-spacing: .02em; background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip--on-media { background: rgba(246, 241, 232, .92); color: var(--ink); border-color: transparent; backdrop-filter: blur(4px); }
.chip--lg { padding: 7px 14px; font-size: .86rem; text-decoration: none; }
.chip--lg:hover { border-color: var(--accent); color: var(--accent-ink); }
.card__rating {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 999px;
  background: rgba(20, 22, 20, .72); color: #fff; font-size: .76rem; font-weight: 700; backdrop-filter: blur(4px);
}
.card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 18px; flex: 1; }
.card__title { font-family: var(--font-display); font-size: 1.18rem; line-height: 1.2; margin: 0; }
.card__excerpt { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; font-size: .78rem; color: var(--ink-2); }
.card__meta-item { display: inline-flex; align-items: center; gap: 4px; }
.card__fav {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(246, 241, 232, .9); color: var(--ink); cursor: pointer;
  backdrop-filter: blur(4px); transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.card__fav:hover { transform: scale(1.08); }
.card__fav[aria-pressed="true"] { background: var(--accent); color: #fff; }
.card__fav[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 640px) {
  .card__excerpt { -webkit-line-clamp: 3; }
}

/* ---------- Лента ---------- */
.feed-block { margin-top: var(--gap-lg); }
.feed-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-count { margin: 0; font-size: .92rem; color: var(--ink-2); }
.feed-hint { margin: 0; font-size: .84rem; color: var(--muted); }
.feed-controls { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 30px; }
.feed-sentinel { height: 1px; width: 100%; }
.feed-status { text-align: center; color: var(--muted); font-size: .86rem; min-height: 1.4em; margin-top: 10px; }
.feed-empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.feed-empty p { color: var(--muted); }
.btn--load { min-width: 200px; }
.noscript-note { padding: 14px; border-radius: var(--radius-sm); background: var(--paper-2); font-size: .9rem; }
.skeleton {
  border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
}
.skeleton__media { aspect-ratio: 3 / 2; background: linear-gradient(100deg, var(--paper-2) 30%, var(--surface) 50%, var(--paper-2) 70%); background-size: 220% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.skeleton__line { height: 12px; border-radius: 6px; background: var(--paper-2); }
.skeleton__line--short { width: 55%; }
@keyframes shimmer { from { background-position: 180% 0; } to { background-position: -40% 0; } }

/* ---------- Рецепт дня ---------- */
.recipe-of-day {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin-top: var(--gap-lg);
  border-radius: calc(var(--radius) + 6px); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
}
.rod__media { min-height: 320px; background: var(--paper-2); }
.rod__media img { width: 100%; height: 100%; object-fit: cover; }
.rod__body { padding: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.rod__kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--accent); margin: 0 0 10px; }
.rod__title { font-family: var(--font-display); font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 0 0 12px; }
.rod__title a { text-decoration: none; color: var(--ink); }
.rod__title a:hover { color: var(--accent-ink); }
.rod__excerpt { color: var(--ink-2); margin: 0 0 16px; max-width: 48ch; }
.rod__meta { list-style: none; display: flex; gap: 16px; flex-wrap: wrap; padding: 0; margin: 0 0 22px; color: var(--muted); font-size: .88rem; }
@media (max-width: 820px) { .recipe-of-day { grid-template-columns: 1fr; } .rod__media { min-height: 220px; } }

/* ---------- Сезонная полка ---------- */
.seasonal { margin-top: var(--gap-lg); }
.seasonal__track {
  display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

/* ---------- Сайдбар/виджеты ---------- */
.widget { margin-bottom: 24px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.widget-title { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 12px; }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.widget ul li { font-size: .9rem; }
.widget a { text-decoration: none; color: var(--ink-2); }
.widget a:hover { color: var(--accent-ink); }
.widget_tag_cloud a { display: inline-block; margin: 0 6px 8px 0; }

/* ---------- Страница рецепта ---------- */
.recipe__hero { border-radius: calc(var(--radius) + 6px); overflow: hidden; margin-bottom: 28px; background: var(--paper-2); }
.recipe__hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.recipe__header { margin-bottom: 34px; }
.recipe__title { font-family: var(--font-display); font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 10px 0 12px; }
.recipe__lead { font-size: 1.12rem; color: var(--ink-2); max-width: 66ch; margin: 0 0 22px; }
.recipe__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; padding: 0; }
.recipe__meta li {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 16px; min-width: 92px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
}
.meta-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.recipe__meta strong { font-size: 1rem; }
.recipe__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.recipe__body { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--gap-lg); align-items: start; }
@media (max-width: 900px) { .recipe__body { grid-template-columns: 1fr; } }

.ingredients { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.ingredients__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ingredients__head h2 { font-size: 1.4rem; margin: 0; }
.ingredients__servings { color: var(--muted); font-size: .84rem; }
.ingredients__group-title { font-family: var(--font-body); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); margin: 16px 0 8px; }
.ingredients__list { list-style: none; padding: 0; margin: 0; }
.ingredient { border-bottom: 1px solid var(--line); }
.ingredient:last-child { border-bottom: 0; }
.ingredient__label { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; cursor: pointer; font-size: .94rem; }
.ingredient__check { position: absolute; opacity: 0; width: 0; height: 0; }
.ingredient__check-ui {
  flex: 0 0 18px; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--line-strong); display: inline-block; position: relative; top: 2px;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.ingredient__check:checked + .ingredient__check-ui { background: var(--accent); border-color: var(--accent); }
.ingredient__check:checked + .ingredient__check-ui::after {
  content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.ingredient__check:checked ~ .ingredient__name { text-decoration: line-through; color: var(--muted); }
.ingredient__name { flex: 1; }
.ingredient__qty { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.ingredient__note { color: var(--muted); font-size: .78rem; }
.ingredients__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.converter { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.converter summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.converter__body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.converter__body input { width: 90px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.converter__body select { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.converter__body output { font-weight: 700; }
.converter__note { color: var(--muted); font-size: .76rem; margin: 8px 0 0; }

.steps { }
.steps__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.steps__head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0; }
.steps__count { color: var(--muted); font-size: .86rem; }
.steps__progress { height: 3px; background: var(--paper-2); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.steps__progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.steps__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 16px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step__num {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font-family: var(--font-display); font-size: 1.1rem;
}
.step__content { flex: 1; min-width: 0; }
.step__text { margin: 0 0 10px; font-size: .98rem; }
.step__timer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.timer-display { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-ink); }
.step__done { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.step.is-done { opacity: .62; }
.step.is-done .step__num { background: var(--accent); }
.steps__reset { margin-top: 16px; }

.nutrition { margin-top: var(--gap-lg); padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.nutrition h2 { font-size: 1.4rem; margin: 0 0 14px; }
.nutrition__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.nutrition__item { padding: 14px; border-radius: var(--radius-sm); background: var(--paper); text-align: center; }
.nutrition__item dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nutrition__item dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.5rem; }
.nutrition__item dd span { font-family: var(--font-body); font-size: .74rem; color: var(--muted); }
.nutrition__note { color: var(--muted); font-size: .78rem; margin: 12px 0 0; }
@media (max-width: 560px) { .nutrition__grid { grid-template-columns: repeat(2, 1fr); } }

.recipe__tips { margin-top: var(--gap-lg); padding: 22px; border-radius: var(--radius); background: var(--paper-2); }
.recipe__tips h2 { font-size: 1.3rem; margin: 0 0 8px; }
.recipe__footer { margin-top: var(--gap-lg); padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.recipe__source, .recipe__credit { margin: 0; color: var(--muted); font-size: .82rem; }
.recipe__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 6px 0 0; }
.related { margin-top: var(--gap-lg); }
.related .cards { margin-top: 12px; }

/* ---------- Режим готовки ---------- */
body.cooking-mode .site-header, body.cooking-mode .site-footer, body.cooking-mode .mobile-bar,
body.cooking-mode .layout-zone--left, body.cooking-mode .layout-zone--right,
body.cooking-mode .layout-zone--top, body.cooking-mode .layout-zone--bottom,
body.cooking-mode .layout-zone--footer, body.cooking-mode .recipe__hero,
body.cooking-mode .megabonuses, body.cooking-mode .recipe-of-day, body.cooking-mode .seasonal { display: none !important; }
body.cooking-mode { background: var(--paper); }
body.cooking-mode .layout { display: block; max-width: 900px; padding-top: 24px; }
body.cooking-mode .recipe__body { display: block; }
body.cooking-mode .ingredients { margin-bottom: 20px; }
body.cooking-mode .step__text { font-size: 1.24rem; line-height: 1.55; }
body.cooking-mode .step__num { width: 48px; height: 48px; flex-basis: 48px; font-size: 1.3rem; }
body.cooking-mode .recipe__actions { position: sticky; bottom: 0; z-index: 40; background: var(--paper); padding: 10px 0; }
.cooking-exit { position: fixed; right: 16px; top: 16px; z-index: 120; }

/* ---------- Поиск-оверлей ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 150; background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px); display: grid; place-items: start center; padding: 8vh 16px;
  overflow-y: auto;
}
.search-overlay__inner { width: min(760px, 100%); }
.search-form { display: flex; gap: 10px; }
.search-form input {
  flex: 1; padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.05rem;
}
.search-results { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; }
.search-result {
  display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.search-result:hover { border-color: var(--accent); color: var(--ink); }
.search-result img { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; }
.search-result__title { font-weight: 700; font-size: .96rem; }
.search-result__meta { font-size: .78rem; color: var(--muted); }
.search-close { margin-top: 22px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; }
.search-form--inline { max-width: 640px; margin-top: 14px; }

/* ---------- Мобильное меню ---------- */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 70;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 18px var(--pad) 24px; display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.mobile-menu__list a, .mobile-menu__link {
  display: block; padding: 12px 8px; text-decoration: none; color: var(--ink);
  font-weight: 600; border-bottom: 1px solid var(--line);
}

/* ---------- Футер ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: var(--gap-lg); }
.site-footer__inner {
  max-width: 1720px; margin-inline: auto; padding: clamp(32px, 5vw, 64px) var(--pad) 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--gap-lg);
}
.brand--footer { margin-bottom: 12px; }
.site-footer__note { color: var(--muted); font-size: .86rem; max-width: 42ch; }
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-list a { text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.footer-list a:hover { color: var(--accent-ink); }
.site-footer__meta { font-size: .84rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.site-footer__links { display: flex; gap: 14px; flex-wrap: wrap; }
.site-footer__links a { color: var(--muted); text-decoration: none; }
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Мобильная навигация ---------- */
.mobile-bar { display: none; }
@media (max-width: 780px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions .icon-btn[data-open-search] { display: none; }
  .mobile-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-bar__item {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px;
    background: transparent; border: 0; text-decoration: none; color: var(--ink-2);
    font-size: .68rem; cursor: pointer;
  }
  .mobile-bar__item:hover { color: var(--accent-ink); }
  body { padding-bottom: 66px; }
  body.cooking-mode { padding-bottom: 0; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px); z-index: 160;
  background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 999px;
  font-size: .88rem; opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease);
  max-width: min(92vw, 460px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Служебные страницы ---------- */
.page-head { margin-bottom: 28px; }
.page-head__kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--accent); margin: 0 0 8px; }
.page-head__title { font-family: var(--font-display); font-size: clamp(2rem, 4.2vw, 3.2rem); margin: 0 0 10px; }
.page-head__lead { color: var(--ink-2); max-width: 62ch; margin: 0 0 14px; }
.breadcrumbs { margin-bottom: 18px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: .8rem; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-ink); }
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.4em 0; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--ink-2); font-style: italic; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); }
.page-subtitle { color: var(--muted); }
.empty-note { color: var(--muted); }
.empty-state { text-align: center; padding: 48px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-top: 22px; }
.empty-state__title { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 8px; }
.favorites-note { margin-top: 24px; }
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 28px; }
.collections { display: grid; gap: var(--gap-sm); grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin: 20px 0 32px; }
.collection-card {
  display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.collection-card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--ink); }
.collection-card__name { font-family: var(--font-display); font-size: 1.2rem; }
.collection-card__count { color: var(--muted); font-size: .82rem; }
.collection-card__desc { color: var(--muted); font-size: .82rem; }
.sitemap-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sitemap-list--inline { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
.sitemap-list--cols { column-count: 3; column-gap: 24px; }
@media (max-width: 760px) { .sitemap-list--cols { column-count: 1; } }
.error-page { text-align: center; padding: 8vh 0; }
.error-page__code { font-family: var(--font-display); font-size: 6rem; line-height: 1; color: var(--accent); margin: 0; }
.error-page__title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 8px 0; }
.error-page__lead { color: var(--muted); }
.error-page__actions { display: flex; gap: 10px; justify-content: center; margin: 22px 0; }
.error-page__search { max-width: 480px; margin: 0 auto; }

/* ---------- Печать ---------- */
@media print {
  .site-header, .site-footer, .mobile-bar, .layout-zone, .recipe__actions,
  .ingredients__actions, .converter, .steps__reset, .related, .card__fav, .toast, .search-overlay { display: none !important; }
  .layout { display: block; padding: 0; }
  .recipe__hero img { aspect-ratio: auto; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .step { break-inside: avoid; border: 1px solid #ccc; }
}

/* ---------- Доступность ---------- */
@media (prefers-reduced-motion: reduce) {
  .card__link:hover, .bonus:hover, .btn:hover, .hero__featured:hover { transform: none; }
  .skeleton__media { animation: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Модалки (список покупок) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 170; display: grid; place-items: center;
  background: rgba(10, 12, 10, .55); padding: 16px; backdrop-filter: blur(4px);
}
.modal__dialog {
  width: min(620px, 100%); max-height: 82vh; overflow-y: auto;
  background: var(--surface); color: var(--ink); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal__head h2 { font-size: 1.4rem; margin: 0; }
.modal__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.shop-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-item { border-bottom: 1px solid var(--line); }
.shop-item label { display: flex; align-items: baseline; gap: 10px; padding: 10px 2px; cursor: pointer; font-size: .94rem; }
.shop-item__text { flex: 1; }
.shop-item__recipe { color: var(--muted); font-size: .74rem; white-space: nowrap; }
.shop-item.is-done .shop-item__text { text-decoration: line-through; color: var(--muted); }
body.search-open { overflow: hidden; }
.feed-skeletons { display: contents; }

/* ---------- Виджеты каталога ---------- */
.widget-terms { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.widget-terms li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.widget-terms li:last-child { border-bottom: 0; }
.widget-count { color: var(--muted); font-size: .78rem; }
.widget-recipes { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.widget-recipes li { display: flex; gap: 10px; align-items: center; }
.widget-recipes__thumb img { width: 66px; height: 48px; object-fit: cover; border-radius: 8px; }
.widget-recipes__body { display: flex; flex-direction: column; gap: 2px; }
.widget-recipes__body a { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.widget-recipes__meta { color: var(--muted); font-size: .74rem; }

/* ---------- Глобальное скрытие шапки/футера из настроек сетки ---------- */
body.hide-header .site-header { display: none !important; }
body.hide-footer .site-footer { display: none !important; }


/* ---------- Таблицы контента (кредиты фото и т.п.) ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0; }
.credits-table, .prose table {
  width: 100%; border-collapse: collapse; font-size: .84rem; line-height: 1.45;
}
.credits-table th, .credits-table td,
.prose table th, .prose table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}
.credits-table th, .prose table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.credits-table tr:hover td { background: var(--paper-2); }
.credits-table a { word-break: break-word; }
