/* ==========================================================================
   БЛЮДОТЕКА — LIGHT PLAYFUL FOOD Design System
   Белый фон (#FFFFFF), воздушные пастели (#DCEACB, #EAE4F7, #FFF3D8, #E6EFF8, #FCE9E3),
   фирменный баклажановый (#423044), коралловый (#F28A76), плавающая полупрозрачная шапка,
   интерактивная 3-плиточная карусель первого экрана и полноценный блог
   ========================================================================== */

@font-face {
    font-family: 'VkusDisplay';
    src: url('../fonts/InterDisplay-SemiBold.otf') format('opentype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusDisplay';
    src: url('../fonts/InterDisplay-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusDisplay';
    src: url('../fonts/InterDisplay-ExtraBold.otf') format('opentype');
    font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusSans';
    src: url('../fonts/Inter-Regular.otf') format('opentype');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusSans';
    src: url('../fonts/Inter-Medium.otf') format('opentype');
    font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusSans';
    src: url('../fonts/Inter-SemiBold.otf') format('opentype');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'VkusSans';
    src: url('../fonts/Inter-Bold.otf') format('opentype');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root {
    --bg-main: #FFFFFF;
    --bg-soft: #F8F9F7;
    --ink: #302B31;
    --ink-muted: #817B84;
    --eggplant: #423044;
    --eggplant-hover: #533D56;
    --coral: #F28A76;
    --coral-hover: #E6745E;
    --coral-soft: #FCE0D8;
    --pistachio: #D2E8BC;
    --lavender: #E2D9F8;
    --vanilla: #FFEEC2;
    --sky: #D9EBFA;
    --divider: #ECEAE8;

    --shadow-xs: 0 2px 10px rgba(66, 48, 68, 0.04);
    --shadow-sm: 0 8px 26px rgba(66, 48, 68, 0.06);
    --shadow-md: 0 16px 40px rgba(66, 48, 68, 0.09);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 26px;
    --radius-pill: 999px;

    --font-display: 'VkusDisplay', 'Manrope', 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'VkusSans', 'Inter', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --container: 1240px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--ink);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.18s var(--ease); }
button, input, select, textarea { font-family: inherit; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 14px;
    font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
    cursor: pointer; white-space: nowrap;
    transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--coral); color: #FFFFFF; box-shadow: 0 8px 20px rgba(242, 138, 118, 0.28); }
.btn-primary:hover { background: var(--coral-hover); transform: translateY(-1px); box-shadow: 0 12px 24px rgba(242, 138, 118, 0.36); }

.btn-dark { background: var(--eggplant); color: #FFFFFF; }
.btn-dark:hover { background: var(--eggplant-hover); transform: translateY(-1px); }

.btn-secondary { background: var(--bg-main); color: var(--eggplant); border-color: var(--divider); }
.btn-secondary:hover { border-color: var(--eggplant); background: var(--bg-soft); }

.btn-ghost { background: transparent; color: var(--ink-muted); padding: 9px 14px; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--eggplant); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; border-radius: 12px; }

/* ---------- Плавающая полупрозрачная шапка (оторвана от верха на 18px) ---------- */
.site-header {
    position: sticky;
    top: 18px;
    z-index: 120;
    padding: 0 24px;
    margin-top: 18px;
    pointer-events: none;
}

.header-inner {
    pointer-events: auto;
    max-width: var(--container);
    margin: 0 auto;
    height: 72px;
    padding: 0 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(236, 234, 232, 0.9);
    box-shadow: 0 8px 30px rgba(66, 48, 68, 0.06);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    transition: height 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled .header-inner {
    height: 62px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 34px rgba(66, 48, 68, 0.09);
}

.brand-logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-size: 18px; font-weight: 800;
    letter-spacing: 0.05em; color: var(--eggplant);
}
.brand-logo-mark { width: 32px; height: 32px; flex-shrink: 0; }

.main-nav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.main-nav a {
    padding: 8px 14px; border-radius: 12px;
    font-size: 14.5px; font-weight: 600; color: var(--ink-muted);
    transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.main-nav a:hover { color: var(--eggplant); background: var(--bg-soft); }
.main-nav a.is-active { background: var(--coral-soft); color: var(--eggplant); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--divider); background: rgba(255, 255, 255, 0.9); color: var(--eggplant);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.18s var(--ease);
}
.icon-btn:hover { border-color: var(--coral); background: var(--coral-soft); color: var(--eggplant); }

.badge-count {
    position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px; background: var(--coral); color: #FFFFFF;
    font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.7); transition: opacity 0.2s, transform 0.2s;
}
.badge-count.has-items { opacity: 1; transform: scale(1); }

/* Мобильная нижняя навигация */
.mobile-bottom-nav {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px);
    border-top: 1px solid var(--divider);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(66, 48, 68, 0.06);
}
.mobile-bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.mbn-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--ink-muted);
    font-size: 11px; font-weight: 600;
}
.mbn-item.is-active { color: var(--eggplant); background: var(--coral-soft); }
.mbn-item .badge-count { top: 2px; right: 10px; min-width: 16px; height: 16px; font-size: 10px; }

/* Поисковое окно */
.search-modal {
    position: fixed; inset: 0; z-index: 220; background: rgba(66, 48, 68, 0.36); backdrop-filter: blur(5px);
    display: flex; align-items: flex-start; justify-content: center; padding: 84px 16px 24px;
    opacity: 0; pointer-events: none; transition: opacity 0.2s var(--ease);
}
.search-modal.is-open { opacity: 1; pointer-events: auto; }
.search-modal-box {
    width: 100%; max-width: 620px; background: #FFFFFF; border-radius: 24px;
    padding: 24px; box-shadow: var(--shadow-md); border: 1px solid var(--divider);
}
.search-modal-form { display: flex; gap: 10px; }
.search-modal-form input {
    flex: 1; padding: 13px 18px; border-radius: 14px;
    border: 1px solid var(--divider); font-size: 15.5px; background: var(--bg-soft);
}
.search-modal-form input:focus { outline: none; border-color: var(--eggplant); background: #fff; }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-soft { background: var(--bg-soft); }
.section-pastel-vanilla { background: #FFFBF0; }
.section-pastel-lavender { background: #F7F5FC; }

.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; margin-bottom: 28px; flex-wrap: wrap;
}
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--coral); margin-bottom: 6px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800; line-height: 1.12; letter-spacing: -0.025em;
    margin: 0; color: var(--eggplant);
}
.section-subtitle { margin: 8px 0 0; color: var(--ink-muted); max-width: 580px; font-size: 15.5px; }
.section-link {
    font-size: 14px; font-weight: 600; color: var(--eggplant);
    padding: 8px 16px; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--divider);
    transition: all 0.18s var(--ease);
}
.section-link:hover { border-color: var(--eggplant); background: var(--bg-soft); }

/* ---------- ПЕРВЫЙ ЭКРАН: СОХРАНЁННАЯ КОМПОЗИЦИЯ ПЛИТОК + КАРУСЕЛЬ ---------- */
.vk-hero { padding: 34px 0 28px; }
.vk-hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* Левая вводная карточка — светлая, воздушная (без тяжёлого тёмного блока) */
.vk-hero-intro {
    grid-column: span 5;
    background: #FCF7F4;
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 38px 34px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.vk-hero-badge {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    padding: 6px 14px; border-radius: var(--radius-pill);
    background: var(--vanilla); color: var(--eggplant);
    font-size: 12.5px; font-weight: 700; margin-bottom: 18px;
}
.vk-hero-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800; line-height: 1.07; letter-spacing: -0.03em;
    margin: 0 0 16px; color: var(--eggplant);
}
.vk-hero-lead {
    font-size: 15.5px; color: var(--ink-muted);
    margin: 0 0 26px; line-height: 1.62;
}
.vk-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Правая 3-плиточная карусель — точное сохранение vk-hero-stage / photo-main / tile-top / tile-bot */
.vk-hero-carousel-wrap {
    grid-column: span 7;
    display: flex; flex-direction: column; gap: 12px;
}

.vk-hero-stage {
    position: relative;
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-height: 410px;
    transition: opacity 0.34s var(--ease), transform 0.34s var(--ease);
}
.vk-hero-stage.is-transitioning {
    opacity: 0.25;
    transform: translateX(10px);
}

.vk-hero-photo-main {
    grid-row: span 2;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-soft);
    box-shadow: var(--shadow-sm);
    display: block;
}
.vk-hero-photo-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s var(--ease); }
.vk-hero-photo-main:hover img { transform: scale(1.04); }
.vk-hero-dish-overlay {
    position: absolute; left: 14px; right: 14px; bottom: 14px;
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
    border-radius: 18px; padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.vk-hero-dish-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--coral); }
.vk-hero-dish-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--eggplant); margin: 3px 0 4px; line-height: 1.22; }
.vk-hero-dish-desc { font-size: 12.5px; color: var(--ink-muted); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vk-hero-dish-meta { font-size: 12px; color: var(--eggplant); font-weight: 600; display: flex; gap: 10px; flex-wrap: wrap; }

.vk-hero-tile-top {
    background: var(--pistachio);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    color: var(--eggplant);
    overflow: hidden;
    transition: transform 0.2s var(--ease);
}
.vk-hero-tile-top:hover { transform: translateY(-2px); }
.vk-hero-tile-top img { width: 100%; height: 106px; border-radius: 14px; object-fit: cover; }

.vk-hero-tile-bot {
    background: var(--vanilla);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    color: var(--eggplant);
    overflow: hidden;
    transition: transform 0.2s var(--ease);
}
.vk-hero-tile-bot:hover { transform: translateY(-2px); }
.vk-hero-tile-bot img { width: 100%; height: 106px; border-radius: 14px; object-fit: cover; }

.vk-mini-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; line-height: 1.22; color: var(--eggplant); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vk-mini-meta { font-size: 12px; font-weight: 600; color: rgba(66, 48, 68, 0.78); }

/* Панель управления каруселью */
.carousel-controls {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 0 4px;
}
.carousel-dots { display: flex; align-items: center; gap: 7px; }
.carousel-dot {
    width: 8px; height: 8px; border-radius: 999px; border: none; padding: 0;
    background: var(--divider); cursor: pointer; transition: width 0.22s var(--ease), background-color 0.22s var(--ease);
}
.carousel-dot.is-active { width: 24px; background: var(--coral); }
.carousel-nav-btns { display: flex; align-items: center; gap: 6px; }
.carousel-btn {
    height: 34px; min-width: 34px; padding: 0 10px; border-radius: 10px;
    border: 1px solid var(--divider); background: #FFFFFF; color: var(--eggplant);
    font-size: 13px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.16s var(--ease);
}
.carousel-btn:hover { border-color: var(--eggplant); background: var(--bg-soft); }
.carousel-btn.is-paused { background: var(--lavender); border-color: var(--lavender); }

/* ---------- Поиск «Что сегодня приготовим?» ---------- */
.vk-search-hub {
    background: #F4F9F0;
    border: 1px solid var(--divider);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
}
.vk-search-bar { display: flex; gap: 10px; margin: 14px 0 16px; }
.vk-search-bar input {
    flex: 1; padding: 14px 18px; border-radius: 14px;
    border: 1px solid var(--divider); background: #FFFFFF;
    font-size: 15.5px; color: var(--ink);
}
.vk-search-bar input:focus { outline: none; border-color: var(--eggplant); }

.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-chip {
    display: inline-flex; align-items: center; padding: 8px 15px; border-radius: var(--radius-pill);
    background: #FFFFFF; border: 1px solid var(--divider);
    font-size: 13.5px; font-weight: 600; color: var(--eggplant);
    cursor: pointer; transition: all 0.16s var(--ease);
}
.quick-chip:hover { background: var(--coral-soft); border-color: var(--coral); }
.quick-chip.is-active { background: var(--coral); color: #FFFFFF; border-color: var(--coral); }

/* ---------- Нестандартная сетка категорий ---------- */
.vk-cat-mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.vk-cat-card {
    grid-column: span 3; border-radius: var(--radius-md); overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 18px; min-height: 205px; background: var(--bg-soft);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.vk-cat-card:nth-child(1) { grid-column: span 6; background: var(--vanilla); flex-direction: row; align-items: center; gap: 18px; }
.vk-cat-card:nth-child(2) { grid-column: span 3; background: var(--pistachio); }
.vk-cat-card:nth-child(3) { grid-column: span 3; background: var(--lavender); }
.vk-cat-card:nth-child(4) { grid-column: span 3; background: var(--sky); }
.vk-cat-card:nth-child(5) { grid-column: span 3; background: var(--coral-soft); }
.vk-cat-card:nth-child(6) { grid-column: span 6; background: var(--pistachio); flex-direction: row; align-items: center; gap: 18px; }
.vk-cat-card:nth-child(7) { grid-column: span 6; background: var(--lavender); flex-direction: row; align-items: center; gap: 18px; }
.vk-cat-card:nth-child(8) { grid-column: span 6; background: var(--sky); flex-direction: row; align-items: center; gap: 18px; }
.vk-cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.vk-cat-thumb { width: 100%; height: 112px; border-radius: 14px; object-fit: cover; margin-top: 12px; }
.vk-cat-card:nth-child(1) .vk-cat-thumb,
.vk-cat-card:nth-child(6) .vk-cat-thumb,
.vk-cat-card:nth-child(7) .vk-cat-thumb,
.vk-cat-card:nth-child(8) .vk-cat-thumb { width: 46%; height: 158px; margin-top: 0; flex-shrink: 0; }
.vk-cat-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin: 0 0 4px; color: var(--eggplant); line-height: 1.2; }
.vk-cat-count { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }

/* ---------- Карточка рецепта (чистая, без лишних плашек) ---------- */
.recipes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.recipes-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.recipe-card {
    background: #FFFFFF; border: 1px solid var(--divider); border-radius: var(--radius-md);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.recipe-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.recipe-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.recipe-card:hover .recipe-card-media img { transform: scale(1.04); }

.recipe-card-cat {
    position: absolute; top: 12px; left: 12px; padding: 4px 10px;
    border-radius: 10px; background: rgba(255, 255, 255, 0.92); color: var(--eggplant);
    font-size: 11.5px; font-weight: 600;
}
.recipe-card-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.card-action-btn {
    width: 34px; height: 34px; border-radius: 50%; border: none;
    background: rgba(255, 255, 255, 0.92); color: var(--eggplant);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 4px 10px rgba(66, 48, 68, 0.12); transition: all 0.18s var(--ease);
}
.card-action-btn:hover { transform: scale(1.08); background: #FFFFFF; }
.card-action-btn.is-active { background: var(--coral); color: #FFFFFF; }
.card-action-btn.is-liked { background: var(--vanilla); color: var(--eggplant); }
.card-action-btn.pop { animation: heartPop 0.34s var(--ease); }
@keyframes heartPop { 0% { transform: scale(1); } 45% { transform: scale(1.24); } 100% { transform: scale(1); } }

.recipe-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.recipe-card-title { font-family: var(--font-display); font-size: 17.5px; font-weight: 700; line-height: 1.28; margin: 0 0 12px; color: var(--eggplant); }
.recipe-card-title a:hover { color: var(--coral); }
.recipe-card-metrics {
    margin-top: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding-top: 10px; border-top: 1px solid var(--divider);
    font-size: 12.5px; font-weight: 600; color: var(--ink-muted);
}
.rc-pill { color: var(--ink); }
.rc-pill.is-prot { color: #4A662C; }

/* ---------- Интерактивный подбор рецептов ---------- */
.mood-box {
    background: #FAF8FE; border: 1px solid var(--divider); border-radius: var(--radius-lg);
    padding: 32px; box-shadow: var(--shadow-xs);
}
.mood-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 20px 0 22px; }
.mood-group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin-bottom: 9px; display: block; }
.mood-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mood-chip {
    padding: 8px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--divider); background: var(--bg-soft);
    color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all 0.16s var(--ease);
}
.mood-chip:hover { border-color: var(--eggplant); }
.mood-chip.is-selected { background: var(--eggplant); color: #FFFFFF; border-color: var(--eggplant); }
.mood-chip[data-accent="pistachio"].is-selected { background: var(--pistachio); color: var(--eggplant); border-color: var(--pistachio); }
.mood-chip[data-accent="lavender"].is-selected { background: var(--lavender); color: var(--eggplant); border-color: var(--lavender); }
.mood-chip[data-accent="butter"].is-selected { background: var(--vanilla); color: var(--eggplant); border-color: var(--vanilla); }
.mood-results-wrap { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--divider); }

/* ---------- Подборки (пастельные воздушные карточки) ---------- */
.vk-collections-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.vk-col-card {
    grid-column: span 4; border-radius: var(--radius-md); padding: 22px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
    background: var(--bg-soft); color: var(--eggplant);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.vk-col-card:nth-child(1) { grid-column: span 6; background: var(--vanilla); }
.vk-col-card:nth-child(2) { grid-column: span 6; background: var(--pistachio); }
.vk-col-card:nth-child(3) { background: var(--lavender); }
.vk-col-card:nth-child(4) { background: var(--sky); }
.vk-col-card:nth-child(5) { background: var(--coral-soft); }
.vk-col-card:nth-child(6) { grid-column: span 6; background: var(--bg-soft); border: 1px solid var(--divider); }
.vk-col-card:nth-child(7) { grid-column: span 6; background: var(--vanilla); }
.vk-col-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.vk-col-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.vk-col-thumb { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.vk-col-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.72); font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.vk-col-card h3, .vk-col-card h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; margin: 0 0 5px; }
.vk-col-card p { margin: 0; font-size: 13.8px; color: var(--ink-muted); }

/* ---------- Случайный рецепт + Локальные списки (светлые пастельные) ---------- */
.vk-dual-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; }
.vk-random-card {
    background: var(--sky); color: var(--eggplant); border-radius: var(--radius-lg);
    padding: 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}
.vk-random-result {
    display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px;
    background: rgba(255, 255, 255, 0.85);
}
.vk-random-result img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }

.vk-local-card {
    background: var(--lavender); border-radius: var(--radius-lg);
    padding: 30px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}
.vk-local-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vk-local-stat { background: rgba(255, 255, 255, 0.86); border-radius: 16px; padding: 14px; }
.vk-local-num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--eggplant); line-height: 1; }
.vk-local-lbl { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; font-weight: 600; }

/* ---------- БЛОГ БЛЮДОТЕКИ ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.blog-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.blog-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.blog-card {
    background: #FFFFFF; border: 1px solid var(--divider); border-radius: var(--radius-md);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.blog-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.blog-card-cat {
    display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 999px;
    background: var(--lavender); color: var(--eggplant); font-size: 11.5px; font-weight: 700; margin-bottom: 10px;
}
.blog-card-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; line-height: 1.28; margin: 0 0 8px; color: var(--eggplant); }
.blog-card-title a:hover { color: var(--coral); }
.blog-card-excerpt { font-size: 13.8px; color: var(--ink-muted); margin: 0 0 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-meta { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--divider); font-size: 12px; color: var(--ink-muted); font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }

.blog-featured {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center;
    background: var(--vanilla); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 32px;
}
.blog-featured-media { border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; }
.blog-featured-media img { width: 100%; height: 100%; object-fit: cover; }

.blog-layout { display: grid; grid-template-columns: 1fr 310px; gap: 30px; align-items: start; }
.blog-sidebar-card {
    background: var(--bg-soft); border: 1px solid var(--divider); border-radius: var(--radius-md);
    padding: 20px; margin-bottom: 18px;
}
.blog-sidebar-card h3 { font-family: var(--font-display); font-size: 16.5px; margin: 0 0 12px; color: var(--eggplant); }

/* Страница статьи блога */
.reading-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--coral);
    z-index: 250; transition: width 0.1s linear;
}
.article-wrap { max-width: 820px; margin: 0 auto; }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; margin: 22px 0 28px; background: var(--bg-soft); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

.article-toc {
    background: var(--bg-soft); border: 1px solid var(--divider); border-radius: var(--radius-md);
    padding: 20px 24px; margin-bottom: 28px;
}
.article-toc-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--eggplant); margin: 0 0 10px; }
.article-toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.article-toc a { font-size: 14px; color: var(--ink-muted); font-weight: 500; }
.article-toc a:hover { color: var(--coral); }
.article-toc li.lvl-3 { padding-left: 16px; font-size: 13.5px; }

.article-content { font-size: 16.5px; line-height: 1.75; color: var(--ink); }
.article-content h2 { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--eggplant); margin: 34px 0 12px; scroll-margin-top: 100px; }
.article-content h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--eggplant); margin: 24px 0 10px; scroll-margin-top: 100px; }
.article-content p { margin: 0 0 16px; }
.article-content ul, .article-content ol { margin: 0 0 18px; padding-left: 22px; }
.article-content li { margin-bottom: 7px; }
.article-content blockquote {
    margin: 22px 0; padding: 18px 22px; border-left: 4px solid var(--coral);
    background: var(--coral-soft); border-radius: 0 16px 16px 0; color: var(--eggplant); font-weight: 500;
}
.article-content .callout-box {
    margin: 22px 0; padding: 18px 22px; border-radius: 16px;
    background: var(--pistachio); color: var(--eggplant);
}
.article-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14.5px; }
.article-content th, .article-content td { padding: 11px 14px; border: 1px solid var(--divider); text-align: left; }
.article-content th { background: var(--bg-soft); font-weight: 700; color: var(--eggplant); }
.article-content img { border-radius: 16px; margin: 18px 0; }
.article-content hr { border: none; border-top: 1px solid var(--divider); margin: 28px 0; }

/* ---------- Каталог & Рецепт & Вспомогательные страницы ---------- */
.page-hero { padding: 34px 0 26px; border-bottom: 1px solid var(--divider); background: var(--bg-soft); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-muted); margin-bottom: 10px; }
.breadcrumbs a:hover { color: var(--coral); }

.catalog-layout { display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
.catalog-sidebar { background: var(--bg-soft); border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 22px; position: sticky; top: 96px; }
.catalog-sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.catalog-sidebar h2 { font-family: var(--font-display); font-size: 19px; margin: 0; color: var(--eggplant); }
.mobile-filter-close, .mobile-filter-open { display: none; }

.filter-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.filter-field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); }
.filter-field input, .filter-field select { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--divider); background: #FFFFFF; color: var(--ink); font-size: 14px; }
.filter-field input:focus, .filter-field select:focus { outline: none; border-color: var(--eggplant); }

.catalog-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.active-filters-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.active-filter-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill);
    background: var(--eggplant); color: #FFFFFF; font-size: 12.5px; font-weight: 600; cursor: pointer; border: none;
}
.active-filter-chip:hover { background: var(--coral); }
.catalog-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 34px; flex-wrap: wrap; }
.page-btn {
    min-width: 40px; height: 40px; padding: 0 13px; border-radius: 12px;
    border: 1px solid var(--divider); background: #FFFFFF; color: var(--eggplant);
    font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.page-btn:hover, .page-btn.is-active { background: var(--coral); border-color: var(--coral); color: #FFFFFF; }

.recipe-hero { padding: 32px 0 38px; }
.recipe-hero-grid { display: grid; grid-template-columns: 1fr 1.06fr; gap: 40px; align-items: start; }
.recipe-hero-photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3.3; background: var(--bg-soft); }
.recipe-hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.pill-cat { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--pistachio); color: var(--eggplant); font-size: 12px; font-weight: 700; }
.recipe-title { font-family: var(--font-display); font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.1; margin: 0 0 12px; color: var(--eggplant); }
.recipe-lead { font-size: 16px; color: var(--ink-muted); margin: 0 0 20px; line-height: 1.62; }
.recipe-meta-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.recipe-meta-box { background: var(--bg-soft); border-radius: 14px; padding: 11px 14px; }
.recipe-meta-label { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.recipe-meta-val { font-size: 15.5px; font-weight: 700; color: var(--eggplant); margin-top: 2px; }
.recipe-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.nutrition-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 8px; }
.nutrition-card { background: var(--pistachio); border-radius: 14px; padding: 12px 8px; text-align: center; }
.nutrition-card.is-kcal { background: var(--vanilla); }
.nutrition-val { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--eggplant); line-height: 1.1; }
.nutrition-label { font-size: 11.5px; color: var(--ink-muted); margin-top: 3px; font-weight: 600; }
.nutrition-note { font-size: 12px; color: var(--ink-muted); margin: 6px 0 0; }

.recipe-body-grid { display: grid; grid-template-columns: 0.92fr 1.38fr; gap: 36px; align-items: start; }
.ingredients-panel { background: var(--bg-soft); border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 24px; position: sticky; top: 96px; }
.ing-progress { font-size: 12.5px; font-weight: 700; color: var(--coral); margin-bottom: 10px; }
.servings-control { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: #FFFFFF; border: 1px solid var(--divider); margin-bottom: 16px; }
.servings-stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--divider); background: var(--bg-soft); color: var(--eggplant); font-size: 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.stepper-btn:hover { background: var(--eggplant); color: #FFFFFF; }

.ingredient-list { list-style: none; padding: 0; margin: 0 0 18px; }
.ingredient-item { display: flex; align-items: flex-start; gap: 11px; padding: 10px 8px; border-radius: 10px; border-bottom: 1px dashed var(--divider); cursor: pointer; }
.ingredient-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--coral); margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.ingredient-item.is-checked { background: var(--pistachio); }
.ingredient-item.is-checked .ingredient-text { text-decoration: line-through; color: var(--ink-muted); }
.ingredient-text { display: flex; justify-content: space-between; gap: 10px; flex: 1; font-size: 14.8px; }
.ingredient-amount { font-weight: 700; color: var(--eggplant); white-space: nowrap; }

.steps-list { display: flex; flex-direction: column; gap: 16px; }
.step-card { background: #FFFFFF; border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; }
.step-card.is-done { background: var(--pistachio); border-color: var(--pistachio); }
.step-num-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--divider); background: var(--bg-soft); color: var(--eggplant); font-family: var(--font-display); font-size: 16px; font-weight: 800; flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.step-card.is-done .step-num-btn { background: var(--eggplant); color: #FFFFFF; border-color: var(--eggplant); }
.step-body { flex: 1; }
.step-body p { margin: 0; font-size: 15.2px; line-height: 1.65; }
.step-photo { margin: 14px 0 0; border-radius: 14px; overflow: hidden; max-width: 520px; }
.step-photo img { width: 100%; height: auto; max-height: 340px; object-fit: cover; }

.tags-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--bg-soft); color: var(--eggplant); font-size: 12px; font-weight: 600; }
.tag-chip-diet { background: var(--lavender); }
.allergen-box { margin-top: 14px; padding: 12px 15px; border-radius: 14px; background: var(--coral-soft); font-size: 13.5px; color: var(--eggplant); }

.categories-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.category-tile { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-soft); display: flex; align-items: flex-end; padding: 16px; }
.category-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.category-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(66, 48, 68, 0.78) 100%); }
.category-tile-body { position: relative; z-index: 2; color: #fff; }
.category-tile-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin: 0 0 2px; }
.category-tile-count { font-size: 12px; font-weight: 600; color: var(--vanilla); }

.empty-state { background: var(--bg-soft); border: 1px dashed var(--divider); border-radius: var(--radius-md); padding: 48px 28px; text-align: center; max-width: 600px; margin: 24px auto; }
.empty-state h2 { font-family: var(--font-display); font-size: 24px; margin: 0 0 8px; color: var(--eggplant); }
.empty-state p { color: var(--ink-muted); margin: 0 0 22px; }

.shopping-box, .prose-card { background: #FFFFFF; border: 1px solid var(--divider); border-radius: var(--radius-md); padding: 32px; max-width: 820px; margin: 0 auto; }
.shopping-add-form { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.shopping-add-form input { flex: 1; min-width: 200px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--divider); background: var(--bg-soft); font-size: 15px; }
.shopping-list-items { list-style: none; padding: 0; margin: 0; }
.shopping-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--divider); }
.shopping-row label { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.shopping-row.is-bought .shopping-item-name { text-decoration: line-through; color: var(--ink-muted); }

.prose-card h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 26px 0 10px; color: var(--eggplant); }
.prose-card h2:first-child { margin-top: 0; }
.prose-card p, .prose-card li { color: var(--ink-muted); line-height: 1.7; }

.ad-slot-wrapper { margin: 24px auto; padding: 16px; border-radius: 16px; background: var(--bg-soft); border: 1px dashed var(--divider); text-align: center; }

.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--eggplant); color: #FFFFFF; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); }

/* ---------- Светлый воздушный футер ---------- */
.site-footer {
    background: var(--bg-soft);
    color: var(--ink);
    border-top: 1px solid var(--divider);
    padding: 52px 0 32px;
    margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 30px; border-bottom: 1px solid var(--divider); }
.footer-brand { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: 0.04em; color: var(--eggplant); margin: 0 0 10px; }
.footer-text { font-size: 14px; color: var(--ink-muted); max-width: 310px; margin: 0; line-height: 1.62; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--eggplant); margin: 0 0 12px; font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--ink-muted); font-weight: 500; }
.footer-col a:hover { color: var(--coral); }
.footer-bottom { padding-top: 20px; font-size: 12.5px; color: var(--ink-muted); }

/* ---------- Адаптивность (360 / 390 / 430 / 768 / 1024 / 1440) ---------- */
@media (max-width: 1080px) {
    .vk-hero-intro, .vk-hero-carousel-wrap { grid-column: span 12; }
    .recipes-grid, .recipes-grid-4, .blog-grid, .blog-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .catalog-layout, .blog-layout, .blog-featured, .vk-dual-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    body { padding-bottom: 72px; }
    .site-header { top: 10px; margin-top: 10px; padding: 0 12px; }
    .header-inner { height: 60px; padding: 0 14px; border-radius: 16px; }
    .main-nav { display: none; }
    .mobile-bottom-nav { display: block; }
    .toast-container { bottom: 82px; right: 14px; left: 14px; }

    .mobile-filter-open, .mobile-filter-close { display: inline-flex; }
    .catalog-sidebar {
        position: fixed; inset: 0; z-index: 230; border-radius: 0; overflow-y: auto;
        transform: translateX(-100%); transition: transform 0.28s var(--ease);
    }
    .catalog-sidebar.is-open { transform: translateX(0); }

    .vk-cat-mosaic { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
    .vk-cat-card, .vk-cat-card:nth-child(1), .vk-cat-card:nth-child(6), .vk-cat-card:nth-child(7), .vk-cat-card:nth-child(8) {
        flex: 0 0 210px; min-height: 195px; flex-direction: column; align-items: stretch; scroll-snap-align: start;
    }
    .vk-cat-card:nth-child(1) .vk-cat-thumb, .vk-cat-card:nth-child(6) .vk-cat-thumb,
    .vk-cat-card:nth-child(7) .vk-cat-thumb, .vk-cat-card:nth-child(8) .vk-cat-thumb { width: 100%; height: 102px; margin-top: 10px; }

    .vk-col-card, .vk-col-card:nth-child(1), .vk-col-card:nth-child(2),
    .vk-col-card:nth-child(6), .vk-col-card:nth-child(7) { grid-column: span 12; }
    .mood-groups, .recipe-hero-grid, .recipe-body-grid, .catalog-grid-2, .blog-grid-2 { grid-template-columns: 1fr; }
    .ingredients-panel { position: static; }
    .nutrition-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .section { padding: 42px 0; }
    .vk-hero-intro { padding: 26px 20px; }
    /* Сохраняем 3-плиточную композицию на смартфоне: большая сверху, 2 маленькие рядом снизу */
    .vk-hero-stage { grid-template-columns: 1fr 1fr; grid-template-rows: 260px auto; gap: 12px; min-height: auto; }
    .vk-hero-photo-main { grid-column: span 2; grid-row: auto; min-height: 260px; }
    .vk-hero-tile-top img, .vk-hero-tile-bot img { height: 82px; }
    .vk-search-hub, .mood-box, .prose-card, .shopping-box { padding: 20px 16px; }
    .vk-search-bar { flex-direction: column; }
    .recipes-grid, .recipes-grid-4, .blog-grid, .blog-grid-4, .footer-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .recipe-meta-bar { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    .site-header, .site-footer, .mobile-bottom-nav, .recipe-action-bar, .related-section,
    .ad-slot-wrapper, .toast-container, .servings-stepper button, .reading-progress { display: none !important; }
    body { background: #fff; color: #000; padding-bottom: 0; }
}

/* Анимация зелёного лепестка логотипа */
.brand-petal .petal-blade {
    transform-origin: 20px 46px;
    animation: petalSway 4.8s ease-in-out infinite;
}
.brand-logo:hover .brand-petal .petal-blade {
    animation-duration: 1.4s;
}
@keyframes petalSway {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(-6deg) scale(1.04); }
}

/* Полировка визуальной глубины v10 */
.vk-hero-intro {
    position: relative;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid var(--divider);
    box-shadow: 0 2px 6px rgba(66, 48, 68, 0.03), 0 14px 36px rgba(66, 48, 68, 0.06);
}
.vk-hero-intro::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 190px; height: 190px;
    border-radius: 50%;
    background: var(--coral-soft);
    opacity: 0.7;
    pointer-events: none;
}
.vk-hero-intro > * { position: relative; z-index: 1; }

.recipe-card, .blog-card {
    box-shadow: 0 2px 6px rgba(66, 48, 68, 0.03), 0 8px 24px rgba(66, 48, 68, 0.045);
}
.recipe-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(66, 48, 68, 0.04), 0 18px 40px rgba(66, 48, 68, 0.09);
    border-color: #DDD7D2;
}
.recipe-card-metrics { gap: 8px; }
.rc-pill {
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--bg-soft);
    font-size: 12px;
}
.rc-pill.is-prot { background: var(--pistachio); color: var(--eggplant); }

.vk-cat-card, .vk-col-card {
    box-shadow: 0 2px 8px rgba(66, 48, 68, 0.03);
}
.vk-cat-thumb, .vk-col-thumb {
    box-shadow: 0 6px 16px rgba(66, 48, 68, 0.08);
}

/* Разные нежные пастели для каждой карточки КБЖУ на странице рецепта */
.nutrition-grid .nutrition-card:nth-child(1) { background: var(--vanilla); }
.nutrition-grid .nutrition-card:nth-child(2) { background: var(--pistachio); }
.nutrition-grid .nutrition-card:nth-child(3) { background: var(--lavender); }
.nutrition-grid .nutrition-card:nth-child(4) { background: var(--sky); }
.nutrition-grid .nutrition-card:nth-child(5) { background: var(--coral-soft); }

.step-card {
    box-shadow: 0 2px 8px rgba(66, 48, 68, 0.03);
    transition: transform 0.18s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.step-card:hover { border-color: #DCD6D0; }


/* ==========================================================================
   БЛЮДОТЕКА — CLEAN LIQUID GLASS DESIGN SYSTEM (v21)
   Чистый белый фон (#FFFFFF), деликатное верхнее свечение только в зоне шапки,
   чёткие фарфорово-стеклянные карточки с выразительным контуром и мягкими тенями
   ========================================================================== */
:root {
    --lg-surface: rgba(255, 255, 255, 0.88);
    --lg-surface-strong: rgba(255, 255, 255, 0.96);
    --lg-border: rgba(66, 48, 68, 0.075);
    --lg-border-hover: rgba(242, 138, 118, 0.35);
    --lg-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 1px 3px rgba(66, 48, 68, 0.03),
        0 10px 28px rgba(66, 48, 68, 0.05);
    --lg-shadow-hover:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 10px rgba(66, 48, 68, 0.045),
        0 20px 44px rgba(66, 48, 68, 0.095);
    --lg-blur: blur(20px) saturate(165%);
}

/* Чистый ровный белый фон с едва заметной воздушной аурой только вверху (без пятен по странице) */
body {
    background-color: #FFFFFF;
    background-image:
        radial-gradient(ellipse 70% 420px at 18% 0%, rgba(210, 232, 188, 0.22) 0%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(ellipse 65% 420px at 84% 0%, rgba(252, 224, 216, 0.24) 0%, rgba(255, 255, 255, 0) 72%);
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Спокойное чередование секций без грязного наложения цветов */
.section-soft {
    background: #FAFBF9;
    border-top: 1px solid rgba(66, 48, 68, 0.045);
    border-bottom: 1px solid rgba(66, 48, 68, 0.045);
}
.section-pastel-vanilla {
    background: #FFFFFF;
}
.section-pastel-lavender {
    background: #FAF9FC;
    border-top: 1px solid rgba(66, 48, 68, 0.045);
    border-bottom: 1px solid rgba(66, 48, 68, 0.045);
}

/* Анимация Liquid Glass логотипа «Чаша баланса» */
.brand-blyudoteka {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    filter: drop-shadow(0 3px 8px rgba(66, 48, 68, 0.09));
    transition: transform 0.28s var(--ease);
}
.brand-logo:hover .brand-blyudoteka { transform: scale(1.06); }
.brand-blyudoteka .blyudoteka-bowl { transform-origin: 32px 44px; animation: lgBowlBalance 5.2s ease-in-out infinite; }
.brand-blyudoteka .blyudoteka-orb { transform-origin: 24px 23.5px; animation: lgOrbFloat 3.8s ease-in-out infinite; }
.brand-blyudoteka .blyudoteka-leaf { transform-origin: 33px 28px; animation: lgLeafSway 4.4s ease-in-out infinite; }
.brand-logo:hover .brand-blyudoteka .blyudoteka-bowl,
.brand-logo:hover .brand-blyudoteka .blyudoteka-orb,
.brand-logo:hover .brand-blyudoteka .blyudoteka-leaf { animation-duration: 1.8s; }
@keyframes lgBowlBalance { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-2.8deg); } 75% { transform: rotate(2.8deg); } }
@keyframes lgOrbFloat { 0%, 100% { transform: translateY(0px) scale(1); } 50% { transform: translateY(-2.4px) scale(1.05); } }
@keyframes lgLeafSway { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-5.5deg); } }

/* Кристально чистая плавающая Liquid Glass шапка */
.site-header {
    top: 16px;
    margin-top: 16px;
}
.header-inner {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(26px) saturate(190%);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    border: 1px solid rgba(66, 48, 68, 0.08);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.98),
        0 8px 28px rgba(66, 48, 68, 0.065),
        0 1px 3px rgba(66, 48, 68, 0.03);
}
.site-header.is-scrolled .header-inner {
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 1),
        0 14px 36px rgba(66, 48, 68, 0.09);
}
.main-nav a {
    border-radius: 999px;
    border: 1px solid transparent;
}
.main-nav a:hover {
    background: rgba(66, 48, 68, 0.045);
    color: var(--eggplant);
}
.main-nav a.is-active {
    background: rgba(252, 224, 216, 0.78);
    border-color: rgba(242, 138, 118, 0.22);
    color: var(--eggplant);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.icon-btn {
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(66, 48, 68, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 2px 8px rgba(66, 48, 68, 0.04);
}
.icon-btn:hover {
    background: rgba(252, 224, 216, 0.75);
    border-color: rgba(242, 138, 118, 0.42);
    transform: translateY(-1px);
}

/* Кнопки и стеклянные чипсы */
.btn { border-radius: 999px; }
.btn-primary {
    background: linear-gradient(180deg, #F59481 0%, #E9725C 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.45), 0 8px 22px rgba(242, 138, 118, 0.30);
}
.btn-primary:hover {
    background: linear-gradient(180deg, #F78A75 0%, #E0624B 100%);
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.55), 0 12px 28px rgba(242, 138, 118, 0.40);
}
.btn-secondary, .quick-chip, .mood-chip {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--lg-border);
    box-shadow: inset 0 1px 0 #FFFFFF, 0 2px 8px rgba(66, 48, 68, 0.04);
}
.btn-secondary:hover, .quick-chip:hover, .mood-chip:hover {
    background: #FFFFFF;
    border-color: var(--lg-border-hover);
    box-shadow: 0 6px 16px rgba(66, 48, 68, 0.07);
    transform: translateY(-1px);
}

/* Чистые стеклянные карточки с чётким разделением от белого фона */
.vk-hero-intro,
.vk-hero-tile-top,
.vk-hero-tile-bot,
.recipe-card,
.blog-card,
.vk-search-hub,
.mood-box,
.catalog-sidebar,
.ingredients-panel,
.step-card,
.prose-card,
.shopping-box,
.search-modal-box,
.blog-featured {
    background: var(--lg-surface);
    backdrop-filter: var(--lg-blur);
    -webkit-backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
}

.vk-hero-intro {
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 249, 247, 0.90) 100%);
}
/* Убираем лишнее круглое пятно в углу hero-карточки */
.vk-hero-intro::after {
    display: none;
}

.vk-hero-photo-main {
    border: 1px solid rgba(66, 48, 68, 0.06);
    box-shadow: 0 16px 40px rgba(66, 48, 68, 0.12);
}
.vk-hero-overlay {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    background: linear-gradient(180deg, rgba(42, 30, 44, 0.08) 0%, rgba(42, 30, 44, 0.66) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.hero-nav-btn {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    border: 1px solid rgba(66, 48, 68, 0.09);
    box-shadow: inset 0 1px 0 #FFFFFF, 0 6px 16px rgba(66, 48, 68, 0.08);
}

.recipe-card, .blog-card { border-radius: 22px; }
.recipe-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    background: var(--lg-surface-strong);
    border-color: var(--lg-border-hover);
    box-shadow: var(--lg-shadow-hover);
}
.rc-badge, .blog-badge {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px) saturate(175%);
    -webkit-backdrop-filter: blur(14px) saturate(175%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(42, 30, 44, 0.12);
}
.rc-pill {
    background: #F7F7F5;
    border: 1px solid rgba(66, 48, 68, 0.06);
}
.rc-pill.is-prot {
    background: #E2F1D3;
    border-color: rgba(121, 186, 99, 0.25);
    color: var(--eggplant);
}

.vk-cat-card, .vk-col-card {
    border: 1px solid rgba(66, 48, 68, 0.065);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 20px rgba(66, 48, 68, 0.045);
    border-radius: 22px;
}
.vk-cat-card:hover, .vk-col-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 16px 34px rgba(66, 48, 68, 0.085);
}

.nutrition-grid .nutrition-card {
    border: 1px solid rgba(66, 48, 68, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 14px rgba(66, 48, 68, 0.04);
}
.nutrition-grid .nutrition-card:nth-child(1) { background: #FFF5DA; }
.nutrition-grid .nutrition-card:nth-child(2) { background: #E4F2D6; }
.nutrition-grid .nutrition-card:nth-child(3) { background: #EEE8FA; }
.nutrition-grid .nutrition-card:nth-child(4) { background: #E4F1FC; }
.nutrition-grid .nutrition-card:nth-child(5) { background: #FDECE7; }

.vk-search-bar input,
.search-modal-form input,
.filter-group input,
.filter-group select {
    background: #FFFFFF;
    border: 1px solid rgba(66, 48, 68, 0.11);
    box-shadow: inset 0 1px 2px rgba(66, 48, 68, 0.03);
}
.vk-search-bar input:focus,
.search-modal-form input:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(242, 138, 118, 0.14);
}

.mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(24px) saturate(185%);
    -webkit-backdrop-filter: blur(24px) saturate(185%);
    border-top: 1px solid rgba(66, 48, 68, 0.08);
    box-shadow: 0 -8px 26px rgba(66, 48, 68, 0.06);
}
.site-footer {
    background: #FAFBF9;
    border-top: 1px solid rgba(66, 48, 68, 0.06);
}
.toast {
    background: rgba(66, 48, 68, 0.90);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Мобильная шапка: только логотип слева и кнопка поиска справа */
@media (max-width: 860px) {
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .header-actions a.icon-btn {
        display: none;
    }
}

/* Бейдж «Блог» в нижней мини-плитке первого экрана */
.vk-mini-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--eggplant);
    background: rgba(226, 217, 248, 0.72);
    border: 1px solid rgba(66, 48, 68, 0.08);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.vk-hero-tile-bot.is-blog-tile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 240, 253, 0.88) 100%);
}

/* Обновлённые Liquid Glass фото-плитки категорий на главной */
.vk-cat-mosaic.vk-cat-glass-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.vk-cat-glass-card,
.vk-cat-glass-card:nth-child(n) {
    position: relative;
    grid-column: span 1 !important;
    min-height: 215px;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 22px;
    background: #F4F5F2 !important;
    border: 1px solid rgba(66, 48, 68, 0.08);
    box-shadow: 0 8px 24px rgba(66, 48, 68, 0.06);
    transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
}
.vk-cat-glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px rgba(66, 48, 68, 0.13);
    border-color: rgba(242, 138, 118, 0.45);
}
.vk-cat-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s var(--ease);
}
.vk-cat-glass-card:hover .vk-cat-bg-img {
    transform: scale(1.06);
}
.vk-cat-glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(42, 30, 44, 0.02) 38%, rgba(42, 30, 44, 0.42) 100%);
    pointer-events: none;
}
.vk-cat-glass-bar {
    position: relative;
    z-index: 2;
    margin: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(185%);
    -webkit-backdrop-filter: blur(18px) saturate(185%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 6px 18px rgba(42, 30, 44, 0.14);
}
.vk-cat-glass-bar .vk-cat-name {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--eggplant);
    line-height: 1.2;
}
.vk-cat-glass-bar .vk-cat-count {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    margin-top: 2px;
}
.vk-cat-arrow {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(66, 48, 68, 0.08);
    color: var(--eggplant);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.vk-cat-glass-card:hover .vk-cat-arrow {
    background: var(--coral);
    color: #FFFFFF;
    border-color: var(--coral);
    transform: translateX(2px);
}
@media (max-width: 1080px) {
    .vk-cat-mosaic.vk-cat-glass-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .vk-cat-mosaic.vk-cat-glass-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
    }
    .vk-cat-glass-card, .vk-cat-glass-card:nth-child(n) {
        flex: 0 0 220px;
        min-height: 190px;
        scroll-snap-align: start;
    }
}

/* Бейдж «Сервис» в верхней мини-плитке первого экрана */
.vk-mini-badge.is-tool-badge {
    background: rgba(210, 232, 188, 0.78);
    color: var(--eggplant);
}
.vk-hero-tile-top.is-tool-tile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 247, 232, 0.88) 100%);
}

/* Общие стили интерактивных сервисов (Меню на неделю, Холодильник, КБЖУ) */
.tool-control-card {
    background: var(--lg-surface);
    backdrop-filter: var(--lg-blur);
    -webkit-backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    border-radius: 26px;
    padding: 24px;
    margin-bottom: 24px;
}
.tool-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}
.tool-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.tool-controls-grid .tool-field { margin-bottom: 0; }
.tool-field label { font-size: 13px; font-weight: 700; color: var(--eggplant); }
.tool-field input, .tool-field select {
    padding: 12px 14px; border-radius: 14px;
    border: 1px solid rgba(66, 48, 68, 0.12); background: #FFFFFF;
    font-size: 14.5px; color: var(--ink);
}
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-week-summary {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(66, 48, 68, 0.08);
    display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--ink-muted);
}
.tool-week-summary strong { color: var(--eggplant); }

/* Конструктор меню на неделю */
.mp-days-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.mp-day-card {
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    border-radius: 24px;
    padding: 20px;
}
.mp-day-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(66, 48, 68, 0.08);
}
.mp-day-head h3 { margin: 0; font-family: var(--font-display); font-size: 19px; color: var(--eggplant); }
.mp-day-totals { text-align: right; font-size: 12.5px; color: var(--ink-muted); }
.mp-day-totals strong { display: block; font-size: 14.5px; color: var(--coral-hover); }
.mp-slots-list { display: flex; flex-direction: column; gap: 10px; }
.mp-slot {
    padding: 10px; border-radius: 16px; background: #FAFBF9; border: 1px solid rgba(66, 48, 68, 0.055);
}
.mp-slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mp-slot-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); }
.mp-swap-btn {
    border: 1px solid rgba(66, 48, 68, 0.1); background: #FFFFFF; color: var(--eggplant);
    border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.mp-swap-btn:hover { border-color: var(--coral); color: var(--coral-hover); }
.mp-meal-link { display: flex; gap: 12px; align-items: center; }
.mp-meal-link img { width: 58px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.mp-meal-title { font-size: 14px; font-weight: 700; color: var(--eggplant); line-height: 1.25; }
.mp-meal-meta { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }

/* Что есть в холодильнике? */
.fridge-input-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.fridge-input-row input {
    flex: 1; min-width: 220px; padding: 12px 16px; border-radius: 999px;
    border: 1px solid rgba(66, 48, 68, 0.12); background: #FFFFFF; font-size: 15px;
}
.fridge-chips-label { font-size: 13px; font-weight: 700; color: var(--eggplant); margin-bottom: 8px; }
.fridge-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fridge-selected-wrap {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(66, 48, 68, 0.08);
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.fridge-selected-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.fridge-active-tag {
    border: none; background: var(--coral); color: #FFFFFF; border-radius: 999px;
    padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.fridge-status { margin: 0 0 18px; font-size: 15px; color: var(--ink-muted); }
.fridge-results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fridge-pct-badge { background: rgba(210, 232, 188, 0.92) !important; color: var(--eggplant) !important; }
.fridge-ing-lists { font-size: 12.5px; line-height: 1.45; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.fridge-have { color: #2E6F36; }
.fridge-miss { color: #B45309; }

/* Калькулятор нормы КБЖУ */
.kbju-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: start; }
.kbju-gender-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.kbju-radio-pill {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 14px; border: 1px solid rgba(66, 48, 68, 0.12);
    background: #FFFFFF; font-weight: 700; color: var(--eggplant); cursor: pointer;
}
.kbju-radio-pill:has(input:checked) { background: rgba(252, 224, 216, 0.72); border-color: var(--coral); }
.kbju-inputs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 6px; }
.kbju-main-kcal { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 6px; }
.kbju-main-kcal strong { font-family: var(--font-display); font-size: 52px; line-height: 1; color: var(--eggplant); }
.kbju-main-kcal span { font-size: 18px; font-weight: 700; color: var(--coral-hover); }
.kbju-bmr-note { font-size: 13.5px; color: var(--ink-muted); margin: 0 0 18px; }
.kbju-macro-grid { grid-template-columns: repeat(3, 1fr) !important; margin-bottom: 20px; }
.kbju-next-actions { display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 960px) {
    .tool-controls-grid, .mp-days-grid, .kbju-layout, .fridge-results-grid { grid-template-columns: 1fr; }
}

/* Блок «Умные инструменты» на главной (3 фото-плитки) */
.vk-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.vk-tool-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: var(--lg-surface);
    backdrop-filter: var(--lg-blur);
    -webkit-backdrop-filter: var(--lg-blur);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.vk-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--lg-shadow-hover);
    border-color: var(--lg-border-hover);
}
.vk-tool-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #F4F5F2;
}
.vk-tool-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.45s var(--ease);
}
.vk-tool-card:hover .vk-tool-media img { transform: scale(1.05); }
.vk-tool-body {
    padding: 18px 20px 20px;
    display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.vk-tool-body h3 {
    margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--eggplant);
}
.vk-tool-body p {
    margin: 0; font-size: 14px; color: var(--ink-muted); line-height: 1.5; flex: 1;
}
.vk-tool-cta {
    margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--coral-hover);
}
@media (max-width: 960px) {
    .vk-tools-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   6-ПЛИТОЧНЫЙ АСИММЕТРИЧНЫЙ BENTO ПЕРВОГО ЭКРАНА (v26)
   ========================================================================== */
.vk-bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(150px, auto);
    gap: 16px;
    transition: opacity 0.22s var(--ease);
}
.vk-bento-grid.is-transitioning .vk-bento-tall,
.vk-bento-grid.is-transitioning .vk-bento-mini,
.vk-bento-grid.is-transitioning .vk-bento-wide,
.vk-bento-grid.is-transitioning .vk-bento-extra {
    opacity: 0.45;
    transform: scale(0.99);
}

/* Плитка 1 (САМАЯ БОЛЬШАЯ — 6 колонок x 2 ряда) с сочным фото на весь фон */
.vk-bento-brand {
    grid-column: span 6;
    grid-row: span 2;
    position: relative;
    min-height: 450px;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    border: 1px solid rgba(66, 48, 68, 0.08);
    box-shadow: 0 18px 46px rgba(66, 48, 68, 0.13);
}
.vk-bento-brand-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}
.vk-bento-brand:hover .vk-bento-brand-bg {
    transform: scale(1.03);
}
.vk-bento-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(42, 30, 44, 0.04) 22%, rgba(42, 30, 44, 0.56) 100%);
    pointer-events: none;
}
.vk-bento-brand-glass {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 24px 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(22px) saturate(190%);
    -webkit-backdrop-filter: blur(22px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.98), 0 12px 32px rgba(42, 30, 44, 0.18);
}
.vk-bento-brand-glass .vk-hero-title {
    margin: 8px 0 8px;
    font-size: clamp(28px, 3vw, 40px);
}
.vk-bento-brand-glass .vk-hero-lead {
    margin: 0 0 16px;
    font-size: 14.5px;
    color: #4D4550;
}

/* Плитка 2 (Высокая 3x2): Рецепт */
.vk-bento-tall {
    grid-column: span 3;
    grid-row: span 2;
    min-height: 450px;
    border-radius: 26px;
    transition: opacity 0.22s var(--ease), transform 0.25s var(--ease);
}

/* Плитки 3 и 4 (Компактные правые 3x1): Сервис + Блог */
.vk-bento-mini {
    grid-column: span 3;
    grid-row: span 1;
    border-radius: 24px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    transition: opacity 0.22s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.vk-bento-mini img {
    width: 100%;
    height: 98px;
    border-radius: 14px;
    object-fit: cover;
}

/* Плитка 5 (Широкая нижняя 7x1): Второй сервис */
.vk-bento-wide {
    grid-column: span 7;
    border-radius: 24px;
    padding: 14px 18px 14px 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(238, 247, 232, 0.86) 100%);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    transition: opacity 0.22s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.vk-bento-wide:hover, .vk-bento-extra:hover {
    transform: translateY(-4px);
    box-shadow: var(--lg-shadow-hover);
    border-color: var(--lg-border-hover);
}
.vk-bento-wide img {
    width: 168px;
    height: 122px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}
.vk-bento-wide-body { flex: 1; min-width: 0; }
.vk-bento-wide-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    color: var(--eggplant);
    line-height: 1.2;
    margin: 2px 0 6px;
}
.vk-bento-wide-desc {
    margin: 0;
    font-size: 13.5px;
    color: var(--ink-muted);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Плитка 6 (Средняя нижняя 5x1): Идея / быстрый рецепт */
.vk-bento-extra {
    grid-column: span 5;
    border-radius: 24px;
    padding: 14px 14px 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(252, 236, 231, 0.82) 100%);
    border: 1px solid var(--lg-border);
    box-shadow: var(--lg-shadow);
    transition: opacity 0.22s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.vk-bento-extra-body { flex: 1; min-width: 0; }
.vk-bento-extra img {
    width: 132px;
    height: 122px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}
.vk-mini-badge.is-coral-badge {
    background: rgba(252, 224, 216, 0.85);
    color: var(--eggplant);
}

@media (max-width: 1080px) {
    .vk-bento-brand { grid-column: span 12; grid-row: span 1; min-height: 380px; }
    .vk-bento-tall { grid-column: span 6; grid-row: span 2; min-height: 340px; }
    .vk-bento-mini { grid-column: span 6; }
    .vk-bento-wide, .vk-bento-extra { grid-column: span 12; }
}
@media (max-width: 640px) {
    .vk-bento-brand { min-height: 340px; padding: 14px; }
    .vk-bento-brand-glass { padding: 18px; }
    .vk-bento-tall { grid-column: span 12; grid-row: span 1; min-height: 270px; }
    .vk-bento-mini { grid-column: span 6; padding: 12px; }
    .vk-bento-mini img { height: 78px; }
    .vk-bento-wide, .vk-bento-extra { flex-direction: column; align-items: stretch; padding: 14px; }
    .vk-bento-wide img, .vk-bento-extra img { width: 100%; height: 140px; }
}

/* ==========================================================================
   ПОЛИРОВКА v27: Нулевые скачки при перелистывании (CLS=0), спокойный
   интерфейс без визуального шума, компактная полоса инструментов и промо-плитки
   ========================================================================== */

/* Строго фиксированные высоты всех 6 Bento-плиток — страница не дёргается ни на пиксель */
.vk-bento-grid {
    grid-template-rows: 222px 222px 146px;
}
.vk-bento-brand {
    height: 460px;
    min-height: 460px;
    max-height: 460px;
}
.vk-bento-tall {
    height: 460px;
    min-height: 460px;
    max-height: 460px;
    overflow: hidden;
}
.vk-bento-mini {
    height: 222px;
    min-height: 222px;
    max-height: 222px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94) !important;
}
.vk-bento-mini img {
    height: 88px;
    min-height: 88px;
    max-height: 88px;
    flex-shrink: 0;
}
.vk-bento-wide, .vk-bento-extra {
    height: 146px;
    min-height: 146px;
    max-height: 146px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94) !important;
}
.vk-bento-wide img { width: 158px; height: 116px; }
.vk-bento-extra img { width: 126px; height: 116px; }

/* Ограничиваем строки текста, чтобы заголовки никогда не меняли размер плитки */
.vk-bento-mini .vk-mini-title,
.vk-bento-wide-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vk-bento-wide-desc {
    -webkit-line-clamp: 1;
}

/* Мягкое плавное перелистывание только через opacity (без scale-дёргания) */
.vk-bento-tall,
.vk-bento-mini,
.vk-bento-wide,
.vk-bento-extra {
    transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1), transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.vk-bento-grid.is-transitioning .vk-bento-tall,
.vk-bento-grid.is-transitioning .vk-bento-mini,
.vk-bento-grid.is-transitioning .vk-bento-wide,
.vk-bento-grid.is-transitioning .vk-bento-extra {
    opacity: 0.18;
    transform: none;
}

/* Успокаиваем бейджи в Bento — без пестроты и визуального шума */
.vk-mini-badge {
    background: #F4F3F6 !important;
    color: var(--ink-muted) !important;
    border-color: rgba(66, 48, 68, 0.06) !important;
    font-size: 10.5px;
    padding: 2px 8px;
}
.vk-mini-badge.is-tool-badge {
    background: #ECF5E4 !important;
    color: #365A2B !important;
}
.vk-mini-badge.is-coral-badge {
    background: #FDECE7 !important;
    color: #A64937 !important;
}

/* Компактная отдельная полоса «Умные инструменты» */
.vk-tools-strip-section {
    padding: 22px 0 18px;
}
.vk-tools-strip-head {
    margin-bottom: 12px;
}
.vk-tools-compact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.vk-tool-compact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--lg-border);
    box-shadow: 0 4px 16px rgba(66, 48, 68, 0.04);
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.vk-tool-compact:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(66, 48, 68, 0.08);
    border-color: var(--lg-border-hover);
}
.vk-tool-compact img {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}
.vk-tool-compact-text {
    flex: 1;
    min-width: 0;
}
.vk-tool-compact-text strong {
    display: block;
    font-family: var(--font-display);
    font-size: 15.5px;
    font-weight: 800;
    color: var(--eggplant);
    line-height: 1.2;
}
.vk-tool-compact-text span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Компактная рекламная плитка на главной (если создана в админке) */
.vk-promo-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.vk-promo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px dashed rgba(242, 138, 118, 0.45);
    box-shadow: 0 4px 16px rgba(66, 48, 68, 0.04);
}
.vk-promo-card img { width: 76px; height: 60px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.vk-promo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vk-promo-body strong { font-size: 15px; color: var(--eggplant); }
.vk-promo-body span { font-size: 12.5px; color: var(--ink-muted); }
.vk-promo-body small { font-size: 11px; color: #9C95A0; }

@media (max-width: 1080px) {
    .vk-bento-grid { grid-template-rows: auto; }
    .vk-bento-brand { height: 380px; min-height: 380px; max-height: 380px; }
    .vk-bento-tall { height: 380px; min-height: 380px; max-height: 380px; }
    .vk-bento-mini { height: 182px; min-height: 182px; max-height: 182px; }
    .vk-bento-wide, .vk-bento-extra { height: 144px; min-height: 144px; max-height: 144px; }
    .vk-tools-compact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .vk-bento-brand { height: 340px; min-height: 340px; max-height: 340px; }
    .vk-bento-tall { height: 260px; min-height: 260px; max-height: 260px; }
    .vk-bento-mini { height: 174px; min-height: 174px; max-height: 174px; }
    .vk-bento-wide, .vk-bento-extra { height: auto; max-height: none; min-height: 220px; }
}

/* Индивидуальное плавное затухание одной плитки при последовательной смене */
.vk-bento-tall.is-tile-fading,
.vk-bento-mini.is-tile-fading,
.vk-bento-wide.is-tile-fading,
.vk-bento-extra.is-tile-fading {
    opacity: 0.16;
}

/* ==========================================================================
   МОБИЛЬНАЯ АДАПТИВНОСТЬ v31: Нулевой горизонтальный скролл (100% по ширине
   экрана) + плотно приклеенная нижняя панель без щели под меню на iOS/Android
   ========================================================================== */
html {
    overflow-x: clip;
    max-width: 100%;
}
body {
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
}
main, section {
    max-width: 100%;
}
.container {
    max-width: var(--container);
}
/* Защита всех grid/flex-блоков от растягивания экрана вбок */
.vk-bento-grid > *,
.recipe-hero-grid > *,
.recipe-body-grid > *,
.recipes-grid > *,
.blog-grid > *,
.catalog-layout > *,
.blog-layout > *,
.kbju-layout > *,
.mp-days-grid > *,
.fridge-results-grid > *,
.vk-tools-compact-grid > *,
.footer-grid > * {
    min-width: 0;
    max-width: 100%;
}

/* Таблицы и длинные слова в статьях и рецептах никогда не ломают ширину */
.article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.recipe-title,
.section-title,
.breadcrumbs,
.article-content,
.step-card,
.ingredient-item,
.prose-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
}

/* Нижняя мобильная панель: идеально приклеена к нижнему краю, без щели под ней */
@media (max-width: 860px) {
    body {
        padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 999;
        background: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        border-top: 1px solid rgba(66, 48, 68, 0.09);
        padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 24px rgba(66, 48, 68, 0.07);
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
    /* Непрозрачная "юбка" на 80px вниз под панелью — полностью исключает щель при резиновом скролле Safari/Chrome */
    .mobile-bottom-nav::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 80px;
        background: #FFFFFF;
        pointer-events: none;
    }
    .mobile-bottom-nav-inner {
        max-width: 100%;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
    }
    .mbn-item {
        min-width: 0;
        padding: 6px 2px;
        font-size: 10.5px;
    }
    .mbn-item span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mbn-item .badge-count {
        right: 6px;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }
    .site-header {
        top: 10px;
        margin-top: 10px;
        padding: 0 10px;
    }
    .header-inner {
        height: 58px;
        padding: 0 12px;
        border-radius: 18px;
    }
    .brand-logo {
        font-size: 16px;
        gap: 8px;
    }
    .brand-balansika {
        width: 32px;
        height: 32px;
    }

    /* Кнопки на узких экранах могут переноситься и не раздувают страницу */
    .btn {
        white-space: normal;
        text-align: center;
        max-width: 100%;
    }
    .recipe-action-bar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .recipe-action-bar .btn {
        flex: 1 1 auto;
        padding: 9px 12px;
        font-size: 13px;
    }

    /* Чёткая 2-колоночная мобильная сетка Bento строго в ширину экрана */
    .vk-bento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        gap: 12px;
    }
    .vk-bento-brand,
    .vk-bento-tall,
    .vk-bento-wide,
    .vk-bento-extra {
        grid-column: 1 / -1;
        width: 100%;
    }
    .vk-bento-mini {
        grid-column: span 1;
        width: 100%;
        height: 176px;
        min-height: 176px;
        max-height: 176px;
    }
    .vk-bento-brand {
        height: 330px;
        min-height: 330px;
        max-height: 330px;
    }
    .vk-bento-tall {
        height: 255px;
        min-height: 255px;
        max-height: 255px;
    }
    .vk-bento-wide,
    .vk-bento-extra {
        height: auto;
        min-height: 0;
        max-height: none;
    }
    .vk-bento-wide .vk-cat-arrow {
        display: none;
    }

    /* Страница рецепта: идеальная подгонка под ширину смартфона */
    .recipe-hero-grid,
    .recipe-body-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .recipe-meta-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .nutrition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px;
    }
    .ingredients-panel,
    .step-card,
    .tool-control-card,
    .mp-day-card {
        padding: 16px;
        border-radius: 20px;
    }
    .ingredient-item {
        gap: 8px;
    }
    .kbju-inputs-grid {
        grid-template-columns: 1fr;
    }
    .shopping-add-form {
        flex-direction: column;
    }
    .shopping-add-form input,
    .fridge-input-row input {
        min-width: 0;
        width: 100%;
    }
    .vk-promo-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
