/* «Добери белок» — дизайн-система. Только светлая тема. */
:root {
  /* Цвет */
  --cream: #fff4e2;
  --paper: #fffbf3;
  --butter: #ffe7a8;
  --peach: #f9c3a6;
  --mustard: #f5b82e;
  --tomato: #d0381f;
  --tomato-ink: #b8301a;
  --oxblood: #5a1a12;
  --ink: #2e1610;
  --ink-2: #6b4a3c;
  --line: #ead9bf;
  --placeholder: #9b7a6b;
  --on-oxblood: #f3d9c9;
  --on-oxblood-2: #d9b8a8;
  /* Шрифты */
  --f-display: "Yeseva One", Georgia, serif;
  --f-body: "Golos Text", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  /* Ритм */
  --r-lg: 28px;
  --r-md: 18px;
  --r-pill: 999px;
  --max: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  --sp: clamp(56px, 8vw, 104px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 18px 40px -22px rgba(90, 26, 18, 0.45);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--mustard); color: var(--ink); }
img { display: block; max-width: 100%; }
a { color: var(--tomato-ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 4.4vw, 48px); }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }
p { text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.wrap--read { max-width: 760px; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ic { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic--sm { width: 1em; height: 1em; }
.hint { color: var(--ink-2); font-size: 14px; margin: 10px 0 0; }

/* Кнопки-пилюли */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  font: 600 16px/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s;
}
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pill:active { transform: translateY(0); }
.pill--tomato { background: var(--tomato); color: #fff; }
.pill--tomato:hover { background: var(--tomato-ink); }
.pill--ink { background: var(--ink); color: var(--cream); }
.pill--line { background: transparent; color: var(--ink); border-color: var(--ink); }
.pill--line:hover { background: var(--paper); }
.pill--sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.pill--block { width: 100%; }
.pill:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: none; }
.pill .ic { width: 20px; height: 20px; }
.link { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Стикеры — круглые наклейки с цифрами */
.sticker {
  --tilt: -8deg;
  display: inline-grid; place-items: center; text-align: center;
  width: 112px; aspect-ratio: 1; border-radius: 50%;
  font: 400 28px/0.95 var(--f-display);
  transform: rotate(var(--tilt));
  box-shadow: 0 10px 22px -12px rgba(90, 26, 18, 0.55);
  position: relative;
}
.sticker::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed currentColor; opacity: 0.45; }
.sticker small { display: block; font: 600 12px/1.2 var(--f-body); letter-spacing: 0.02em; margin-top: 4px; }
.sticker--tomato { background: var(--tomato); color: #fff; }
.sticker--mustard { background: var(--mustard); color: var(--ink); }
.sticker--butter { background: var(--butter); color: var(--ink); font-size: 20px; }
.sticker--peach { background: var(--peach); color: var(--ink); }

/* Рамки для фото */
.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.frame--tomato { background: #f6a48f; color: var(--ink); }
.frame--mustard { background: var(--mustard); color: var(--ink); }
.frame--peach { background: var(--peach); color: var(--oxblood); }
.frame--butter { background: var(--butter); color: var(--oxblood); }
.frame__art { width: 46%; max-width: 160px; opacity: 0.85; }
.frame__art svg { width: 100%; height: auto; }
.frame__note { position: absolute; bottom: 14px; font: 600 22px/1 var(--f-hand); opacity: 0.75; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--cream) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.top.is-scrolled { border-bottom-color: var(--line); }
.top__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 12px; font: 400 26px/1 var(--f-display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo span { color: var(--tomato); }
.logo--light { color: var(--cream); }
.logo--light span { color: var(--mustard); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 16px; padding: 6px 0; background: linear-gradient(var(--tomato), var(--tomato)) left bottom / 0 2px no-repeat; transition: background-size 0.4s var(--ease); }
.nav a:hover, .nav a[aria-current] { background-size: 100% 2px; }

/* Первый экран */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.2fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 78px); line-height: 0.98; letter-spacing: -0.02em; }
.hero__mark { font-style: normal; color: var(--tomato); position: relative; display: inline-block; }
.hero__mark svg { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: 0.32em; overflow: visible; }
.hero__mark path { fill: none; stroke: var(--mustard); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 0; }
.js .hero__mark path { stroke-dashoffset: 340; animation: draw 1.1s 0.35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero__lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34ch; margin: 26px 0 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { font: 600 22px/1.2 var(--f-hand); color: var(--tomato-ink); margin: 22px 0 0; transform: rotate(-1.5deg); }
.hero__collage { position: relative; min-height: clamp(420px, 44vw, 580px); }
.hero__shot { position: absolute; display: block; text-decoration: none; color: var(--ink); width: 48%; transition: transform 0.6s var(--ease); }
.hero__shot .frame { box-shadow: var(--shadow); border: 6px solid var(--paper); }
.hero__shot--1 { left: 0; top: 6%; transform: rotate(-4deg); z-index: 2; width: 52%; }
.hero__shot--2 { right: 2%; top: 0; transform: rotate(5deg); }
.hero__shot--3 { right: 8%; bottom: 0; transform: rotate(-2deg); width: 44%; z-index: 3; }
.hero__shot:hover { transform: rotate(0) translateY(-6px); z-index: 5; }
.hero__cap { display: block; font: 600 20px/1.15 var(--f-hand); margin: 8px 6px 0; }
.hero__st { position: absolute; z-index: 6; }
.hero__st--1 { left: 40%; top: -2%; }
.hero__st--2 { left: -2%; bottom: 6%; }
.hero__st--3 { right: -1%; top: 46%; width: 92px; font-size: 24px; }
.js .hero__st { animation: pop 0.9s var(--ease) both; }
.js .hero__st--2 { animation-delay: 0.15s; }
.js .hero__st--3 { animation-delay: 0.3s; }
@keyframes pop { from { transform: rotate(calc(var(--tilt) - 20deg)) scale(0.82); } to { transform: rotate(var(--tilt)) scale(1); } }

/* Бегущая строка */
.marquee { overflow: hidden; border-block: 2px solid var(--ink); padding: 14px 0; }
.marquee--mustard { background: var(--mustard); }
.marquee__track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marquee 38s linear infinite; font: 400 clamp(20px, 2.2vw, 28px)/1 var(--f-display); white-space: nowrap; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__spark { width: 22px; height: 22px; color: var(--tomato); }
.marquee__spark svg { width: 100%; height: 100%; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Секции */
.section { padding: var(--sp) 0; }
.section--tight { padding-top: 24px; }
.section--butter { background: var(--butter); }
.shead { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }

/* Категории — тарелки */
.cats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
.cat { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 6px 4px; border-radius: var(--r-md); }
.cat__plate { width: 100%; max-width: 120px; aspect-ratio: 1; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: grid; place-items: center; transition: transform 0.5s var(--ease), background-color 0.3s; }
.cat__plate svg { width: 46%; color: var(--tomato); }
.cat:nth-child(3n+2) .cat__plate svg { color: var(--oxblood); }
.cat:hover .cat__plate, .cat.is-active .cat__plate { background: var(--mustard); transform: rotate(-8deg) scale(1.04); }
.cat__name { font-weight: 600; font-size: 16px; }
.cat__count { font: 600 18px/1 var(--f-hand); color: var(--ink-2); margin-top: -6px; }

/* Блок нормы белка */
.norm { background: var(--tomato); color: #fff; padding: clamp(48px, 7vw, 88px) 0; }
.norm__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.norm h2 { font-size: clamp(34px, 5vw, 60px); }
.norm__text p { font-size: 18px; max-width: 40ch; color: #fff; }
.norm__card { background: var(--paper); color: var(--ink); border-radius: var(--r-lg); padding: clamp(22px, 3vw, 34px); display: grid; gap: 18px; box-shadow: 0 30px 60px -30px rgba(40, 8, 4, 0.7); }
.norm__w { display: flex; align-items: baseline; gap: 10px; font-weight: 600; }
.norm__w output { font: 400 52px/1 var(--f-display); color: var(--tomato); }
.norm input[type="range"] { width: 100%; accent-color: var(--tomato); height: 28px; }
.norm__goals { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.norm__goals label, .chip { position: relative; }
.norm__goals input, .chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.norm__goals span, .chip span { display: inline-block; padding: 10px 16px; border-radius: var(--r-pill); border: 2px solid var(--line); background: var(--paper); font-weight: 500; font-size: 15px; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.norm__goals input:checked + span, .chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.norm__goals input:focus-visible + span, .chip input:focus-visible + span { outline: 3px solid var(--tomato); outline-offset: 2px; }
.norm__out { margin: 0; font-size: 18px; }
.norm__out b { font: 400 44px/1 var(--f-display); color: var(--ink); display: inline-block; transition: transform 0.3s var(--ease); }
.norm__out b.bump { transform: scale(1.08); }
.norm--slim { padding: 44px 0; }
.norm--slim h2 { font-size: clamp(28px, 3.6vw, 42px); }

/* Карточки рецептов */
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(20px, 3vw, 34px); }
.rcard { text-decoration: none; color: var(--ink); display: block; }
.rcard__media { position: relative; }
.rcard__media .frame { box-shadow: var(--shadow); }
.rcard:hover .frame img { transform: scale(1.05); }
.rcard:hover .frame__art { transform: rotate(-6deg) scale(1.06); }
.frame__art { transition: transform 0.6s var(--ease); }
.rcard__sticker { position: absolute; right: -10px; top: -14px; width: 96px; font-size: 26px; transition: transform 0.5s var(--ease); }
.rcard:hover .rcard__sticker { transform: rotate(calc(var(--tilt) * -1)) scale(1.06); }
.rcard__body { padding: 16px 4px 0; }
.rcard__cat { font-size: 14px; font-weight: 600; color: var(--tomato-ink); }
.rcard h3 { margin-top: 6px; }

/* Карточки статей */
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.acard { background: var(--paper); border-radius: var(--r-lg); padding: 26px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 12px; transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease); }
.acard:hover { transform: translateY(-4px) rotate(-0.4deg); box-shadow: var(--shadow); }
.acard p { margin: 0; color: var(--ink-2); font-size: 16px; }
.acard__kind { align-self: start; font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: var(--r-pill); }
.acard__kind--tomato { background: var(--tomato); color: #fff; }
.acard__kind--mustard { background: var(--mustard); color: var(--ink); }
.acard__kind--peach { background: var(--peach); color: var(--ink); }
.acard__more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; color: var(--tomato-ink); display: inline-flex; align-items: center; gap: 6px; }

/* Заголовок раздела */
.phead { padding: clamp(36px, 6vw, 72px) 0 12px; }
.phead h1 { font-size: clamp(44px, 7vw, 84px); }
.phead p { font-size: 19px; color: var(--ink-2); max-width: 52ch; margin: 14px 0 28px; }
.phead--article { padding-bottom: 8px; }
.phead--article h1 { font-size: clamp(36px, 5.6vw, 60px); }
.crumbs { font-size: 15px; color: var(--ink-2); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.meta { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 15px; }

.empty { text-align: center; max-width: 520px; margin: 0 auto; padding: 40px 0 20px; display: grid; justify-items: center; gap: 14px; }
.empty__art { width: 160px; height: auto; }
.empty p { color: var(--ink-2); margin: 0; }

/* Статья */
.prose { padding-top: 16px; padding-bottom: var(--sp); font-size: 18px; }
.prose h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 44px 0 14px; }
.prose p { margin: 0 0 16px; max-width: 68ch; }
.atable { width: 100%; border-collapse: collapse; margin: 8px 0 16px; background: var(--paper); border-radius: var(--r-md); overflow: hidden; }
.atable td { padding: 13px 18px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.atable td:last-child { text-align: right; font-weight: 700; color: var(--tomato-ink); white-space: nowrap; }
.atable__total td { background: var(--mustard); color: var(--ink) !important; font-weight: 700; border: 0; }
.article__cta { margin-top: 30px; }

/* Страница рецепта */
.rhead { padding: clamp(24px, 4vw, 48px) 0 12px; }
.rhead__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.rhead h1 { font-size: clamp(34px, 4.6vw, 58px); }
.rhead__lead { font-size: 19px; color: var(--ink-2); max-width: 44ch; margin: 18px 0 24px; }
.rhead__media { position: relative; }
.rhead__media .frame { box-shadow: var(--shadow); transform: rotate(2deg); }
.rhead__sticker { position: absolute; left: -18px; top: -18px; width: 124px; font-size: 34px; }
.rhead__flag { font: 600 20px/1.2 var(--f-hand); color: var(--ink-2); margin-top: 20px; }
.facts { list-style: none; padding: 0; margin: 0 0 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.facts li { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md); padding: 10px 16px; display: grid; }
.facts b { font: 400 26px/1.1 var(--f-display); }
.facts span { font-size: 13px; color: var(--ink-2); }
.rbody { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-top: 36px; padding-bottom: var(--sp); scroll-margin-top: 90px; }
.ings { background: var(--paper); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px); position: sticky; top: 92px; }
.ings__head, .method__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ings h2, .method h2 { font-size: clamp(28px, 3vw, 36px); }
.servings { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--ink); border-radius: var(--r-pill); padding: 4px; font-size: 15px; }
.servings button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--mustard); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 8px; transition: transform 0.25s var(--ease); }
.servings button:active { transform: scale(0.9); }
.servings svg { width: 100%; height: 100%; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { border-bottom: 1px dashed var(--line); }
.checks label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.checks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.checks .box { width: 24px; height: 24px; flex: none; border: 2px solid var(--ink); border-radius: 8px; display: grid; place-items: center; padding: 3px; color: transparent; transition: background-color 0.2s, color 0.2s, transform 0.3s var(--ease); margin-top: 1px; }
.checks .box svg { width: 100%; height: 100%; stroke-width: 6; }
.checks input:checked + .box { background: var(--tomato); border-color: var(--tomato); color: #fff; transform: rotate(-6deg); }
.checks input:focus-visible + .box { outline: 3px solid var(--tomato); outline-offset: 2px; }
.checks input:checked ~ .ing { text-decoration: line-through; text-decoration-color: var(--tomato); color: var(--ink-2); }
.calc { margin-top: 24px; padding-top: 18px; border-top: 2px solid var(--ink); }
.calc h3 { font-size: 22px; margin-bottom: 8px; }
.calc table { width: 100%; border-collapse: collapse; font-size: 15px; }
.calc td { padding: 7px 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.calc td span { color: var(--ink-2); }
.calc td:last-child { text-align: right; font-weight: 700; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 30px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; }
.steps__n { width: 52px; height: 52px; border-radius: 50%; background: var(--mustard); display: grid; place-items: center; font: 400 26px/1 var(--f-display); }
.steps h3 { margin: 10px 0 10px; }
.steps .frame { margin: 4px 0 12px; max-width: 420px; }
.steps p { margin: 0; font-size: 18px; }
.tip { margin-top: 36px; background: var(--peach); border-radius: var(--r-lg); padding: 24px 26px; }
.tip h3 { font-size: 24px; margin-bottom: 8px; }
.tip p { margin: 8px 0 0; }

/* Режим готовки */

/* Инструмент */
.tool { padding: clamp(32px, 5vw, 64px) 0 var(--sp); }
.tool__grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.tool h1 { font-size: clamp(44px, 6.4vw, 80px); }
.tool__lead { font-size: 19px; color: var(--ink-2); max-width: 38ch; margin: 20px 0 28px; }
.tool__stickers { display: flex; gap: 16px; }
.tool__panel { background: var(--paper); border-radius: var(--r-lg); padding: clamp(22px, 3.4vw, 38px); box-shadow: var(--shadow); }
.form { display: grid; gap: 22px; }
.field { border: 0; padding: 0; margin: 0; }
.field label:not(.chip), .field legend { font-weight: 600; display: block; margin-bottom: 10px; padding: 0; }
.field input[type="number"] { width: 100%; max-width: 240px; font: 400 26px/1 var(--f-display); padding: 12px 16px; border-radius: var(--r-md); border: 2px solid var(--ink); background: var(--cream); color: var(--ink); }
.field input[type="number"]::placeholder { color: var(--placeholder); font-family: var(--f-body); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.result { margin-top: 28px; }
.result[hidden] { display: none; }
.result .total { font: 400 30px/1.15 var(--f-display); margin: 0 0 6px; }
.result .box { background: var(--cream); border-radius: var(--r-md); padding: 20px; margin-top: 18px; }
.result .box h2 { font-size: 26px; margin-bottom: 6px; }
.plan { list-style: none; padding: 0; margin: 10px 0; }
.plan li { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.plan b { white-space: nowrap; }
.plan li > b { color: var(--tomato-ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.note { color: var(--ink-2); font-size: 14px; margin-top: 18px; }

/* Telegram */
.tg { padding: var(--sp) 0 0; }
.tg__inner { background: var(--peach); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 24px; align-items: center; }
.tg h2 { font-size: clamp(32px, 4.6vw, 54px); }
.tg p { font-size: 18px; max-width: 44ch; margin: 14px 0 24px; }
.tg__stickers { display: flex; gap: 10px; justify-content: center; }
.tg__stickers .sticker:nth-child(2) { margin-top: 48px; }

/* Подвал */
.foot { background: var(--oxblood); color: var(--cream); margin-top: var(--sp); padding: 0 0 36px; }
.foot__art { display: flex; justify-content: center; gap: clamp(14px, 3vw, 36px); padding: 40px var(--gut) 34px; color: var(--mustard); border-bottom: 1px solid rgba(255, 244, 226, 0.18); overflow: hidden; }
.foot__art span { width: clamp(38px, 6vw, 64px); flex: none; }
.foot__art span:nth-child(even) { color: var(--peach); transform: translateY(8px); }
.foot__grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 28px; padding-top: 36px; }
.foot p { color: var(--on-oxblood); font-size: 15px; max-width: 34ch; }
.foot nav { display: grid; gap: 8px; align-content: start; }
.foot nav a { color: var(--cream); text-decoration: none; font-weight: 500; }
.foot nav a:hover { color: var(--mustard); }
.hs { background: rgba(255, 244, 226, 0.08); border-radius: var(--r-md); padding: 14px 18px; align-self: start; }
.hs summary { cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: center; list-style: none; }
.hs summary::-webkit-details-marker { display: none; }
.hs__cols { display: grid; gap: 12px; margin-top: 12px; font-size: 14px; color: var(--on-oxblood); }
.hs__cols ol { margin: 4px 0 0; padding-left: 18px; }
.foot__fine { margin-top: 28px; font-size: 13px; color: var(--on-oxblood); }

/* Появление при прокрутке: контент виден по умолчанию, скрываем только с JS */
.js .reveal { opacity: 0; transform: translateY(26px); filter: blur(4px); transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms), filter 0.7s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Адаптив */
@media (max-width: 1000px) {
  .cats { grid-template-columns: repeat(4, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero__grid, .norm__grid, .rhead__grid, .rbody, .tool__grid, .tg__inner { grid-template-columns: 1fr; }
  .hero__collage { min-height: 108vw; margin-top: 8px; }
  .ings { position: static; }
  .rhead__media { max-width: 460px; }
  .tg__stickers { justify-content: flex-start; }
  .top__inner { flex-wrap: wrap; justify-content: space-between; row-gap: 0; padding-bottom: 6px; }
  .nav { order: 3; width: 100%; margin: 0; gap: 20px; padding: 2px 0 6px; }
  .nav a { font-size: 15px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .cats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cat__name { font-size: 13px; }
  .sticker { width: 92px; font-size: 23px; }
  .hero__st--3 { width: 78px; font-size: 20px; }
  .rcard__sticker { width: 84px; font-size: 22px; right: -4px; }
  .foot__grid { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 44px 1fr; gap: 12px; }
  .steps__n { width: 42px; height: 42px; font-size: 22px; }
  .pill--sm { padding: 0 10px; font-size: 13px; }
  .logo { font-size: 19px; gap: 8px; }
  .top__inner { column-gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .js .hero__mark path { stroke-dashoffset: 0; }
  .marquee__track { animation: none; }
}

/* Рецепт: КБЖУ, подсказки к ингредиентам */
.kbju { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 26px; max-width: 460px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; }
.kbju__cap { grid-column: 1 / -1; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); padding: 10px 16px 0; }
.kbju > div:not(.kbju__cap) { padding: 6px 16px 12px; }
.kbju > div + div:not(:nth-child(2)) { border-left: 1px solid var(--line); }
.kbju dt { font-size: 13px; color: var(--ink-2); }
.kbju dd { margin: 2px 0 0; font: 400 26px/1.1 var(--f-display); color: var(--ink); white-space: nowrap; }
.kbju dd small { font: 500 13px var(--f-body); color: var(--ink-2); margin-left: 3px; }
.kbju > div:nth-child(3) dd { color: var(--tomato-ink); }
.calc__total td { font-weight: 700; border-top: 2px solid var(--ink); }
.tip ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.field__err { color: var(--tomato-ink); font-weight: 600; font-size: 15px; margin: 10px 0 0; }
@media (max-width: 420px) { .kbju dd { font-size: 22px; } .kbju > div:not(.kbju__cap) { padding: 6px 10px 12px; } .kbju__cap { padding: 10px 10px 0; } }

/* Готовить по шагам: окно вырастает из кнопки, на телефоне выезжает снизу */
.cook { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.cook[hidden] { display: none; }
.cook__backdrop { position: absolute; inset: 0; background: rgba(46, 22, 16, 0.42); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.cook__panel { position: relative; width: min(640px, 100%); max-height: min(860px, calc(100dvh - 48px)); display: flex; flex-direction: column; background: var(--cream); border: 2px solid var(--ink); border-radius: 28px; box-shadow: 0 30px 80px -20px rgba(46, 22, 16, 0.55), 6px 6px 0 var(--ink); overflow: hidden; transform-origin: center; }
.cook__top { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); background: var(--paper); }
.cook__progress { display: flex; gap: 6px; margin-bottom: 12px; }
.cook__progress i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); position: relative; overflow: hidden; }
.cook__progress i::after { content: ""; position: absolute; inset: 0; background: var(--tomato); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease); }
.cook__progress i.is-done::after { transform: scaleX(1); }
.cook__bar { display: flex; align-items: center; gap: 14px; }
.cook__count { margin-right: auto; font-weight: 700; }
.cook__wake { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.cook__wake input { accent-color: var(--tomato); width: 18px; height: 18px; }
.cook__close { width: 40px; height: 40px; border: 2px solid var(--ink); background: var(--cream); border-radius: 50%; padding: 9px; cursor: pointer; color: var(--ink); transition: transform 0.25s var(--ease), background-color 0.2s; }
.cook__close:hover { transform: rotate(90deg); background: var(--butter); }
.cook__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 8px; }
.cook__step { will-change: transform, opacity; }
.cook__step img { display: block; width: 100%; max-height: 46dvh; border-radius: 20px; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 18px; }
.cook__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--mustard); font: 400 18px/1 var(--f-display); margin-bottom: 10px; }
.cook__step h2 { font-size: clamp(26px, 5vw, 36px); margin: 0 0 10px; }
.cook__step p { font-size: clamp(19px, 2.8vw, 22px); line-height: 1.55; margin: 0; }
.cook__nav { display: flex; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.cook__nav .pill { flex: 1; justify-content: center; }
.cook__nav .pill svg { width: 18px; height: 18px; }
.cook__nav .pill:disabled { opacity: 0.4; pointer-events: none; }
@media (max-width: 640px) {
  .cook { padding: 0; place-items: end stretch; }
  .cook__panel { width: 100%; max-height: 92dvh; border-radius: 26px 26px 0 0; border-bottom: 0; box-shadow: 0 -20px 60px -20px rgba(46, 22, 16, 0.5); }
  .cook__panel::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 10px auto 0; position: absolute; left: 50%; translate: -50% 0; top: 0; }
  .cook__top { padding-top: 22px; }
  .cook__body { padding: 18px 18px 6px; }
  .cook__step img { max-height: 34dvh; aspect-ratio: 16 / 10; margin-bottom: 14px; }
  .cook__nav { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .cook__wake span, .cook__wake { font-size: 13px; }
}

/* Знак и персонаж */
.logo__mark { width: 52px; height: auto; margin: -6px 0; flex: none; transition: transform 0.4s var(--ease); }
.logo:hover .logo__mark { transform: rotate(-12deg); }
.logo--light .logo__mark { filter: drop-shadow(0 0 0 transparent); }
.tg__art { position: relative; justify-self: center; width: min(240px, 100%); }
.tg__art img { width: 100%; height: auto; display: block; }
.tg__art .tg__st { position: absolute; right: -6px; top: -10px; }
@media (max-width: 560px) { .logo__mark { width: 40px; margin: -4px 0; } .tg__art { width: 170px; justify-self: start; } }
@media (max-width: 370px) { .logo { font-size: 16px; gap: 6px; } .logo__mark { width: 34px; } .pill--sm { font-size: 12px; } }
