@font-face{font-family:'Unbounded';font-style:normal;font-weight:200 900;font-display:swap;src:url('/fonts/Unbounded.woff2') format('woff2')}
@font-face{font-family:'Golos Text';font-style:normal;font-weight:400 900;font-display:swap;src:url('/fonts/GolosText.woff2') format('woff2')}
/* Рецепты для аэрогриля — стили приложения */

:root {
  --bg: #F4F4F1;
  --bg-deep: #E9E8E3;
  --surface: #FFFFFF;
  --surface-2: #F8F8F5;
  --line: #E2E1DB;
  --line-strong: #CFCEC7;
  --text: #1B1B1A;
  --text-2: #6B6A66;
  --text-3: #9C9B95;
  --accent: #F26B1D;
  --accent-ink: #FFFFFF;
  --accent-soft: #FDE9DC;
  --panel: #161512;
  --panel-2: #26241F;
  --led: #FFB454;
  --led-dim: #8A6A3A;
  --green: #2E7D4F;
  --green-soft: #E3F1E8;
  /* «Дисплей» прибора (панель температуры/времени, бейджи шагов, таймеры) и режим готовки */
  --dev-bg: #FFF3E8;
  --dev-bg-2: #FCE1CC;
  --dev-line: #F4D5BD;
  --dev-fg: #C2410C;
  --dev-fg-live: #EA580C;
  --dev-lbl: #A0663F;
  --dev-glow: rgba(242, 107, 29, .08);
  --cook-bg: #F4F4F1;
  --cook-fg: #1B1B1A;
  --cook-muted: #6B6A66;
  --cook-card: #FFFFFF;
  --cook-line: #E2E1DB;
  --cook-track: #E2E1DB;
  --cook-accent: #F26B1D;
  --cook-accent-text: #C2410C;
  --cook-accent-ink: #FFFFFF;
  /* Панель рецепта (температура / время / порции): тёмный дисплей прибора в обеих темах */
  --pn-bg: #161512;
  --pn-border: transparent;
  --pn-divider: transparent;
  --pn-glow: rgba(255, 180, 84, .10);
  --pn-fg: #FFB454;
  --pn-lbl: #A88554;
  --pn-unit: #FFB454;
  --pn-btn-bg: #26241F;
  --pn-btn-fg: #FFB454;
  --pn-font: var(--font-display);
  --pn-val-size: 20px;
  --pn-val-weight: 500;
  --pn-lbl-size: 10px;
  --pn-lbl-case: uppercase;
  --pn-lbl-ls: .12em;
  --pn-pad: 6px 4px;
  --pn-cell-pad: 8px 12px;
  --shadow: 0 10px 30px rgba(27, 27, 26, .12);
  --shadow-sm: 0 2px 8px rgba(27, 27, 26, .08);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-h: 60px;
  --font-display: 'Unbounded', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Golos Text', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210;
    --bg-deep: #0C0C0B;
    --surface: #1C1B18;
    --surface-2: #232220;
    --line: #2E2D29;
    --line-strong: #3E3C36;
    --text: #EDEAE3;
    --text-2: #A9A59C;
    --text-3: #75726A;
    --accent: #FF7A2F;
    --accent-ink: #1B1B1A;
    --accent-soft: #3A2417;
    --panel: #0A0A09;
    --panel-2: #1A1916;
    --led: #FFB454;
    --led-dim: #6B5230;
    --green: #6CC48E;
    --green-soft: #1E3327;
    --dev-bg: #161512;
    --dev-bg-2: #26241F;
    --dev-line: rgba(255, 180, 84, .18);
    --dev-fg: #FFB454;
    --dev-fg-live: #FFD08A;
    --dev-lbl: #8A6A3A;
    --dev-glow: rgba(255, 180, 84, .10);
    --cook-bg: #0A0A09;
    --cook-fg: #F3EFE6;
    --cook-muted: #C9C2B4;
    --cook-card: #1A1916;
    --cook-line: transparent;
    --cook-track: #3A362E;
    --cook-accent: #FFB454;
    --cook-accent-text: #FFB454;
    --cook-accent-ink: #161512;
    --pn-bg: #0A0A09;
    --pn-border: transparent;
    --pn-divider: transparent;
    --pn-glow: rgba(255, 180, 84, .10);
    --pn-fg: #FFB454;
    --pn-lbl: #9C7A4A;
    --pn-unit: #FFB454;
    --pn-btn-bg: #1A1916;
    --pn-btn-fg: #FFB454;
    --pn-font: var(--font-display);
    --pn-val-size: 20px;
    --pn-val-weight: 500;
    --pn-lbl-size: 10px;
    --pn-lbl-case: uppercase;
    --pn-lbl-ls: .12em;
    --pn-pad: 6px 4px;
    --pn-cell-pad: 8px 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121210;
  --bg-deep: #0C0C0B;
  --surface: #1C1B18;
  --surface-2: #232220;
  --line: #2E2D29;
  --line-strong: #3E3C36;
  --text: #EDEAE3;
  --text-2: #A9A59C;
  --text-3: #75726A;
  --accent: #FF7A2F;
  --accent-ink: #1B1B1A;
  --accent-soft: #3A2417;
  --panel: #0A0A09;
  --panel-2: #1A1916;
  --led: #FFB454;
  --led-dim: #6B5230;
  --green: #6CC48E;
  --green-soft: #1E3327;
  --dev-bg: #161512;
  --dev-bg-2: #26241F;
  --dev-line: rgba(255, 180, 84, .18);
  --dev-fg: #FFB454;
  --dev-fg-live: #FFD08A;
  --dev-lbl: #8A6A3A;
  --dev-glow: rgba(255, 180, 84, .10);
  --cook-bg: #0A0A09;
  --cook-fg: #F3EFE6;
  --cook-muted: #C9C2B4;
  --cook-card: #1A1916;
  --cook-line: transparent;
  --cook-track: #3A362E;
  --cook-accent: #FFB454;
  --cook-accent-text: #FFB454;
  --cook-accent-ink: #161512;
  --pn-bg: #0A0A09;
  --pn-border: transparent;
  --pn-divider: transparent;
  --pn-glow: rgba(255, 180, 84, .10);
  --pn-fg: #FFB454;
  --pn-lbl: #9C7A4A;
  --pn-unit: #FFB454;
  --pn-btn-bg: #1A1916;
  --pn-btn-fg: #FFB454;
  --pn-font: var(--font-display);
  --pn-val-size: 20px;
  --pn-val-weight: 500;
  --pn-lbl-size: 10px;
  --pn-lbl-case: uppercase;
  --pn-lbl-ls: .12em;
  --pn-pad: 6px 4px;
  --pn-cell-pad: 8px 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }

#app { min-height: 100%; }
.view { display: none; }
.view.is-active { display: block; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 10px 16px 8px;
  display: grid;
  gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "mark name" "mark tag";
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.logo-mark { grid-area: mark; width: 40px; height: 40px; border-radius: 9px; }
/* В тёмной теме тёмная плашка знака сливается с фоном — тонкий контур */
:root[data-theme="dark"] .logo-mark { box-shadow: 0 0 0 1px var(--line-strong); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-mark { box-shadow: 0 0 0 1px var(--line-strong); } }
.logo .logo-name { grid-area: name; align-self: end; }
.logo .logo-tag { grid-area: tag; align-self: start; }
/* Телефон: знак и слоган чуть меньше, чтобы слоган остался в одну строку */
@media (max-width: 1023px) {
  .brand .logo { column-gap: 9px; }
  .brand .logo-mark { width: 36px; height: 36px; border-radius: 8px; }
  .brand .logo-tag { font-size: 11.5px; white-space: nowrap; }
}
@media (max-width: 350px) {
  .brand .logo-name { font-size: 18px; }
  .brand .logo-tag { font-size: 11px; white-space: normal; }
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -.015em;
  white-space: nowrap;
}
.logo-name em { font-style: normal; color: var(--accent); }
.logo-tag { font-size: 12px; line-height: 1.25; color: var(--text-2); }
.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-2);
  display: grid;
  place-items: center;
  align-self: center;
}
.theme-btn { flex: 0 0 auto; padding: 0; line-height: 0; }
.theme-btn .ico { display: grid; place-items: center; width: 18px; height: 18px; }
.theme-btn svg { display: block; width: 18px; height: 18px; }
.theme-btn:active { background: var(--bg-deep); }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
  height: 44px;
  transition: border-color .15s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { flex: 0 0 auto; color: var(--text-3); }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 15px;
}
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search .clear { display: none; width: 28px; height: 28px; border-radius: 50%; color: var(--text-2); }
.search.has-value .clear { display: grid; place-items: center; }
.search .clear:active { background: var(--bg-deep); }

.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px 4px;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background .15s, color .15s, border-color .15s;
}
.chip.is-on {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.chip .count { color: inherit; opacity: .55; margin-left: 5px; font-size: 12px; }
/* На сайте чипы — ссылки на разделы (/recipes/<code>/): выглядят как кнопки.
   Кнопка ставит строку (1.5em) по центру 34 px (36 − рамка) — повторяем отступом сверху, одна базовая линия у названия и числа */
a.chip { display: inline-block; padding-top: calc((34px - 1.5em) / 2); text-decoration: none; }

/* ---------- Панель под чипами ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 10px;
}
.toolbar .result { font-size: 13px; color: var(--text-2); }
.toolbar .actions { display: flex; gap: 8px; }
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 500;
}
.btn-ghost.has-badge { border-color: var(--accent); color: var(--accent); }
.btn-ghost .badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

/* ---------- Сетка карточек ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
  padding: 0 16px 8px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:active { transform: scale(.985); }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow); } }
.card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-deep);
  overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Кадр из листа миниатюр или пакета: картинка шире контейнера, сдвиг на нужный кадр */
.frame { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-deep); }
.frame > img {
  position: absolute;
  left: 0; top: 0;
  width: calc(100% * var(--cols, 1));
  height: auto;
  max-width: none;
  transform: translate(calc(-100% * var(--col, 0) / var(--cols, 1)), calc(-100% * var(--row, 0) / var(--rows, 1)));
}
.card-photo.frame > img { object-fit: unset; height: auto; }
.card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  color: #1B1B1A;
  display: grid;
  place-items: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.card-fav.is-on { color: var(--accent); }
.card-fav svg { width: 18px; height: 18px; }
.card-photo .led { position: absolute; left: 8px; bottom: 8px; }
.card-body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.card-title {
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}
.card-cat { font-size: 12px; color: var(--text-2); }

/* Табло прибора */
.led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--dev-bg);
  color: var(--dev-fg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--dev-line);
}
.led .sep { color: var(--dev-lbl); }
/* На фото карточек бейдж всегда тёмный — иначе не читается на снимке */
.card-photo .led { background: #161512; color: #FFB454; box-shadow: inset 0 0 0 1px rgba(255, 180, 84, .18); }
.card-photo .led .sep { color: #8A6A3A; }
.led.is-big {
  font-size: 22px;
  padding: 10px 14px;
  border-radius: 12px;
  gap: 10px;
}

/* ---------- Пустое состояние ---------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-2);
  display: grid;
  gap: 8px;
  justify-items: center;
}
.empty strong { color: var(--text); font-weight: 600; }
.btn-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Нижняя навигация ---------- */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 3px;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  align-content: center;
}
.bottom-nav .ico { position: relative; display: grid; place-items: center; width: 24px; height: 24px; }
.bottom-nav a svg { display: block; width: 24px; height: 24px; }
.bottom-nav a.is-on { color: var(--text); }
.bottom-nav a.is-on svg { color: var(--accent); }
.fav-count, .shop-count {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.bottom-nav .fav-count, .bottom-nav .shop-count {
  position: absolute;
  top: -7px;
  left: 17px;
  box-shadow: 0 0 0 2px var(--surface);
}

/* ---------- Страница рецепта ---------- */
.recipe {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 22px;
  padding-bottom: 8px;
}
.recipe-cols, .recipe-aside, .recipe-main { display: contents; }
.recipe .hero { order: 0; }
.recipe-head { order: 1; }
.recipe .panel { order: 2; }
.recipe .sec-ings { order: 3; }
.recipe .sec-steps { order: 4; }
.recipe .sec-tips { order: 5; }
.recipe .source { order: 6; }
.recipe .more { order: 7; }
.recipe .panel, .recipe .section, .recipe .source, .recipe .more { width: calc(100% - 32px); max-width: 760px; justify-self: center; min-width: 0; }
body.is-recipe .bottom-nav { display: none; }
@media (max-width: 1023px) {
  /* --tb-h — высота плашки таймера (ставит app.js): одна строка — 50 px, с кнопками — выше */
  body.has-timer .hero-bar { top: calc(env(safe-area-inset-top, 0px) + var(--tb-h, 50px) + 16px); }
  body.has-timer .topbar { padding-top: calc(var(--tb-h, 50px) + 16px); }
  body.has-timer #view-fav .page-title, body.has-timer #view-shop .shop-head { padding-top: calc(var(--tb-h, 50px) + 20px); }
}
.hero {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 62vh;
  overflow: hidden;
  background: var(--bg-deep);
}
@media (min-width: 640px) { .hero { aspect-ratio: 16 / 9; } }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero.frame { aspect-ratio: 4 / 3; }
.hero.frame img { position: absolute; left: 0; top: 0; height: auto; object-fit: unset; }
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .35));
}
.hero-bar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px; right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: #1B1B1A;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.icon-btn.is-on { color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.hero-acts { display: flex; gap: 8px; }

/* Заголовок рецепта «наезжает» на фото скруглённым листом */
.recipe-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 792px;
  justify-self: center;
  margin-top: -44px;
  padding: 20px 16px 0;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  min-width: 0;
}
/* Ни один блок карточки не должен растягивать колонку шире экрана */
.recipe-head > *, .section > * { min-width: 0; }
.eyebrow {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  display: block;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.recipe-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 5.4vw, 26px);
  line-height: 1.18;
  letter-spacing: -.012em;
}
.recipe-desc { color: var(--text-2); font-size: 15px; margin: 0; max-width: 62ch; }

/* Панель рецепта: вид целиком задают токены --pn-* темы (светлая — таблица, тёмная — дисплей прибора) */
.panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--pn-pad);
  background: var(--pn-bg);
  box-shadow: inset 0 0 0 1px var(--pn-border);
  border-radius: 14px;
  color: var(--pn-fg);
  overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, var(--pn-glow), transparent 60%);
  pointer-events: none;
}
.panel > div { position: relative; display: grid; gap: 4px; align-content: start; padding: var(--pn-cell-pad); min-width: 0; }
.panel > div + div { box-shadow: inset 1px 0 0 var(--pn-divider); }
.panel .lbl { font-size: var(--pn-lbl-size); text-transform: var(--pn-lbl-case); letter-spacing: var(--pn-lbl-ls); color: var(--pn-lbl); }
.panel .val {
  font-family: var(--pn-font);
  font-weight: var(--pn-val-weight);
  font-size: var(--pn-val-size);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  white-space: nowrap;
}
.panel .val.is-long { font-size: calc(var(--pn-val-size) - 4px); }
.panel .val small { margin-left: 3px; font-size: 12px; font-weight: 500; color: var(--pn-unit); }
.panel .stepper { display: inline-flex; align-items: center; gap: 6px; }
.panel .stepper button {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--pn-btn-bg);
  color: var(--pn-btn-fg);
  font-size: 15px;
  line-height: 1;
  display: grid; place-items: center;
}
.panel .stepper button:active { background: color-mix(in srgb, var(--pn-btn-bg) 75%, var(--pn-fg)); }
.panel .stepper .val { min-width: 20px; text-align: center; }
@media (max-width: 380px) {
  .panel .stepper { gap: 3px; }
  .panel .stepper button { width: 24px; height: 24px; }
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-2);
}
.tag.is-diet { background: var(--green-soft); border-color: transparent; color: var(--green); font-weight: 500; }

.section { display: grid; gap: 12px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
}
.section-note { font-size: 13px; color: var(--text-2); }

/* Ингредиенты */
.ingredients {
  list-style: none;
  margin: 0;
  padding: 4px 16px;
  background: var(--surface);
  border-radius: var(--radius);
}
.ingredients li { border-bottom: 1px solid var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  cursor: pointer;
}
.ingredients input { position: absolute; opacity: 0; pointer-events: none; }
.ingredients .box {
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: transparent;
  transition: background .12s, border-color .12s;
}
.ingredients .box svg { width: 14px; height: 14px; }
.ingredients input:checked + .box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ingredients .name { font-size: 15px; }
.ingredients .name small { color: var(--text-2); font-size: 13px; }
.ingredients input:checked ~ .name { color: var(--text-3); text-decoration: line-through; }
.ingredients .qty {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 14.5px;
}
.ingredients .qty.is-taste { font-weight: 400; color: var(--text-2); font-size: 13px; white-space: normal; max-width: 11em; text-align: right; }
.ingredients input:checked ~ .qty { color: var(--text-3); }

/* Шаги */
.steps { display: grid; gap: 18px; counter-reset: step; }
.step {
  display: grid;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 80px;
}
.photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-deep);
  position: relative;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.frame img { height: auto; object-fit: unset; }
.step-body { padding: 2px 14px 14px; display: grid; gap: 8px; }
.step-no {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--accent);
}
.step-text { margin: 0; font-size: 15.5px; line-height: 1.5; }
.step-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.btn-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--cook-accent-text);
  font-weight: 600;
  font-size: 13px;
}
.btn-timer svg { width: 16px; height: 16px; }

.tips { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tips li {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
}
.source { font-size: 12.5px; color: var(--text-2); padding-bottom: 8px; }
.source a { color: var(--text-2); }

/* «Ещё из раздела «X»» и «Гарнир к блюду» — обычные карточки под рецептом.
   Телефон: сетка в 2 колонки. С 640 px — дорожки по 4: из раздела в один ряд, гарнир — на 2 дорожки ниже.
   Широкий десктоп (от 1280 px, если есть гарнир) — всё в один ряд: 4 + 2 на 6 дорожках.
   Зазор внутри групп равен зазору между дорожками — карточки обеих групп одной ширины. */
.more { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 12px; margin-top: 10px; }
.more-group { display: grid; gap: 12px; align-content: start; min-width: 0; }
.more-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.more-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.more-all:active { transform: translateY(1px); }
@media (hover: hover) { .more-all:hover { border-color: var(--text-3); } }
@media (min-width: 640px) {
  .more { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 16px; }
  .more-rel { grid-column: 1 / -1; }
  .more-side { grid-column: span 2; }
  .more-cards { gap: 18px 16px; }
  .more-rel .more-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .more-all { justify-self: start; }
}

/* Плавающая кнопка «Готовить» */
.cook-cta {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 25;
  display: none;
}
.cook-cta.is-visible { display: block; }
.cook-cta::before {
  content: '';
  position: absolute;
  inset: -14px -16px -30px;
  background: linear-gradient(to top, var(--bg) 40%, transparent);
  z-index: -1;
  pointer-events: none;
}
.btn-primary {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .01em;
  box-shadow: 0 8px 24px rgba(242, 107, 29, .35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:active { transform: translateY(1px); }
@media (min-width: 640px) and (max-width: 1023px) {
  .cook-cta { left: 50%; right: auto; transform: translateX(-50%); width: 420px; }
  .cook-cta::before { left: calc(210px - 50vw); right: calc(210px - 50vw); }
}

/* ---------- Режим у плиты ---------- */
.cook {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--cook-bg);
  color: var(--cook-fg);
  display: none;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cook.is-open { display: flex; }
.cook-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 10px;
}
.cook-top .icon-btn { flex-shrink: 0; background: var(--cook-card); color: var(--cook-fg); box-shadow: inset 0 0 0 1px var(--cook-line); }
.cook-progress { display: flex; gap: 4px; flex: 1; min-width: 64px; }
.cook-progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--cook-track); }
.cook-progress i.is-done { background: var(--cook-accent); }
.cook-progress i.is-now { background: var(--cook-accent); opacity: .55; }
.cook-body {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  padding: 0 16px 16px;
}
.cook-body .photo { border-radius: var(--radius); width: min(100%, calc(48dvh * 4 / 3)); justify-self: center; }
/* Таймер другого шага внутри режима готовки */
.cook-other {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  background: var(--cook-card);
  box-shadow: inset 0 0 0 1px var(--cook-line);
  color: var(--dev-fg);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cook-other.is-ringing { animation: blink 1s steps(2) infinite; }
.cook-step-no {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cook-accent-text);
}
.cook-timer-note { font-size: 13px; color: var(--cook-muted); }
.cook-timer-note button { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cook-text { margin: 0; font-size: 19px; line-height: 1.45; max-width: 60ch; }
.cook-timer {
  display: grid;
  gap: 10px;
  background: var(--cook-card);
  box-shadow: inset 0 0 0 1px var(--cook-line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cook-timer .led { background: transparent; padding: 0; box-shadow: none; font-size: 40px; gap: 12px; }
.cook-timer .timer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cook-timer .btn-timer { background: var(--cook-accent); color: var(--cook-accent-ink); height: 40px; }
.cook-timer.is-running .led { color: var(--dev-fg-live); }
.cook-timer.is-ringing .led { animation: blink 1s steps(2) infinite; }
.cook-timer .timer-adds { display: flex; flex-wrap: wrap; gap: 8px; }
.cook-timer .timer-adds .btn-timer { flex: 1 1 0; justify-content: center; background: var(--dev-bg); color: var(--dev-fg); box-shadow: inset 0 0 0 1px var(--dev-line); }
@keyframes blink { 50% { opacity: .25; } }
.cook-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 16px 12px;
}
.cook-nav button {
  height: 52px;
  border-radius: 16px;
  background: var(--cook-card);
  color: var(--cook-fg);
  box-shadow: inset 0 0 0 1px var(--cook-line);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}
.cook-nav button.is-primary { background: var(--cook-accent); color: var(--cook-accent-ink); box-shadow: none; }
.cook-nav button:disabled { opacity: .35; }

/* ---------- Глобальный таймер (плашка) ---------- */
.timer-bar {
  position: fixed;
  left: 16px; right: 16px;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 10px;
  background: var(--cook-card);
  color: var(--dev-fg);
  border: 1px solid var(--dev-line);
  border-radius: 14px;
  padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow);
}
.timer-bar.is-visible { display: flex; }
.timer-bar .led { background: transparent; padding: 0; box-shadow: none; font-size: 18px; }
.timer-bar .name { font-size: 12px; color: var(--cook-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.timer-bar .name b { color: var(--dev-fg); font-weight: 600; }
.timer-bar button { height: 32px; padding: 0 10px; border-radius: 8px; background: var(--dev-bg); color: var(--cook-fg); font-size: 12px; font-weight: 600; }
.timer-bar button.is-main { background: var(--cook-accent); color: var(--cook-accent-ink); }
#timer-stop { position: relative; }
#timer-stop::after { content: ''; position: absolute; inset: -6px -9px; }
/* Вторая строка: кнопки по окончании («+N мин», «Готово») или «Включить звук» */
.tb-acts { flex: 1 0 100%; display: flex; gap: 8px; }
.tb-acts button { flex: 1 1 0; min-width: 0; padding: 0 6px; white-space: nowrap; }
.timer-bar.is-done { border-color: var(--cook-accent); }
.timer-bar.is-ringing { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--cook-accent) 35%, transparent); } }
@media (min-width: 640px) { .timer-bar { left: 50%; right: auto; transform: translateX(-50%); width: 420px; } }
/* «+N» — ещё таймеры (шторка), этап на плашке */
.timer-bar button.tb-more { min-width: 36px; padding: 0 8px; font-family: var(--font-display); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--dev-fg); }
.timer-bar.is-stage { border-color: var(--cook-accent); border-width: 2px; }
.timer-bar.is-stage .name b { color: var(--cook-accent-text); }

/* ---------- Этапы шага: «10-я мин  Переверните — будет сигнал» ---------- */
.step-stages { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.step-stages li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.35; }
.step-stages .at { flex: none; font-family: var(--font-display); font-size: 12px; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
.cook-next { font-size: 15px; line-height: 1.4; color: var(--cook-fg); }
.cook-next b { color: var(--dev-fg); font-variant-numeric: tabular-nums; font-weight: 600; }
/* Этап наступил: крупно «Переверните», «Перевернул» и «Через минуту» */
.cook-timer.is-stage { box-shadow: inset 0 0 0 3px var(--cook-accent); }
.cook-flip-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cook-flip-top .lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--cook-muted); }
.cook-timer .cook-flip-top .led { font-size: 22px; }
.cook-flip-text { font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1.12; letter-spacing: -.01em; color: var(--dev-fg); text-wrap: balance; }
.cook-timer .timer-adds .btn-timer.is-ok { flex: 2 1 0; height: 56px; font-size: 17px; background: var(--cook-accent); color: var(--cook-accent-ink); box-shadow: none; }
.cook-timer .timer-adds .btn-timer.is-add { height: 56px; }

/* ---------- Шторка «Таймеры» (вариант 1 «Светлый список», как в приложении) ---------- */
.overlay.tsheet { z-index: 65; }
.tsheet-sub { margin-top: -8px; font-size: 14px; color: var(--text-3); font-weight: 500; }
.tsheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ts-list { list-style: none; margin: 0; padding: 0; }
.ts-it { padding: 14px 0; }
.ts-it + .ts-it { border-top: 1px solid var(--line); }
.ts-r { display: flex; align-items: center; gap: 12px; }
.ts-ph { flex: none; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--bg-deep); }
.ts-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ts-t b { font-weight: 600; font-size: 16px; line-height: 1.25; }
.ts-t small { font-size: 14px; color: var(--text-2); }
.ts-sub.is-hot { color: var(--accent); font-weight: 600; }
.ts-win {
  flex: none; height: 48px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center;
  background: var(--panel); color: var(--led); box-shadow: inset 0 0 0 1px var(--pn-border);
  font-family: var(--font-display); font-weight: 500; font-size: 22px; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.ts-win.is-dim { color: var(--led-dim); }
.ts-it.is-done .ts-win { box-shadow: inset 0 0 0 2px var(--led); }
.ts-a { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-left: 68px; }
.ts-a button { height: 44px; padding: 0 14px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 600; font-size: 14.5px; }
.ts-a .ts-go { margin-left: auto; background: none; box-shadow: none; padding: 0 4px; color: var(--accent); }


/* ---------- Фильтры (шторка) ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, .45);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.overlay.is-open { display: flex; }
.sheet-modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(24px); opacity: .6; } }
.sheet-modal .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 4px auto 0; }
.sheet-modal .head { display: flex; align-items: center; justify-content: space-between; }
.sheet-modal .head h2 { font-family: var(--font-display); font-size: 16px; font-weight: 500; }
#filters-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 18px; padding-bottom: 4px; }
.sheet-modal .head, .sheet-modal .foot, .sheet-modal .grip { flex: 0 0 auto; }
.sheet-modal .foot { padding-top: 10px; border-top: 1px solid var(--line); }
.fgroup { display: grid; gap: 8px; }
.fgroup .lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.fgroup .opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px;
}
.opt.is-on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.sheet-modal .foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.btn-secondary {
  height: 48px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 14px;
}
.sheet-modal .btn-primary { height: 48px; box-shadow: none; }

/* ---------- Страница «Избранное» ---------- */
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  padding: 14px 16px 6px;
}
.page-sub { padding: 0 16px 14px; color: var(--text-2); font-size: 14px; }

/* ---------- «Я готовил» (вариант 1 «Светлая шторка», как в приложении) ---------- */
.fav-seg { padding: 4px 16px 12px; }
.seg { display: flex; height: 46px; padding: 3px; border-radius: 13px; background: var(--bg-deep); max-width: 420px; }
.seg button { flex: 1; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.seg button.is-on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
@media (min-width: 640px) { .fav-seg { padding-left: 24px; padding-right: 24px; max-width: calc(1120px + 48px); margin: 0 auto; } }
@media (min-width: 1024px) { .fav-seg { padding-left: 32px; padding-right: 32px; max-width: calc(1200px + 64px); } }
.cooked-list { padding: 0 16px 8px; max-width: 760px; }
.cooked-list .page-sub { padding: 0 0 14px; }
@media (min-width: 640px) { .cooked-list { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .cooked-list { padding-left: 32px; padding-right: 32px; margin: 0 auto; max-width: calc(1200px + 64px); } }
.ck-month { font-family: var(--font-display); font-weight: 500; font-size: 18px; margin: 8px 0 10px; }
.ck-list { background: var(--surface); border-radius: 16px; overflow: hidden; margin-bottom: 14px; max-width: 760px; }
.ck-row { display: flex; gap: 12px; padding: 12px; color: inherit; text-decoration: none; align-items: flex-start; }
.ck-row + .ck-row { border-top: 1px solid var(--line); }
.ck-row img, .ck-noph { flex: none; width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--bg-deep); }
.ck-row-t { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ck-row-t b { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.ck-meta { display: flex; align-items: center; gap: 8px; }
.ck-meta small { font-size: 13px; color: var(--text-3); }
.ck-det { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-empty { display: grid; gap: 8px; padding: 12px 0; max-width: 34em; }
.ck-empty b { font-weight: 600; font-size: 17px; }
.ck-empty span { color: var(--text-2); }
.res-pill { flex: none; height: 26px; padding: 0 10px; border-radius: 13px; display: inline-grid; place-items: center; font-size: 13px; font-weight: 600; background: var(--bg-deep); color: var(--text-2); }
.res-pill.is-great { background: var(--green-soft); color: var(--green); }
.res-pill.is-fail { background: var(--accent-soft); color: var(--accent); }
/* Строка «Готовили 2 раза» под панелью рецепта */
.recipe .cooked-slot { order: 2; width: calc(100% - 32px); max-width: 760px; justify-self: center; min-width: 0; }
.recipe .cooked-slot:empty { display: none; }
.cooked-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); text-align: left; }
.cooked-row > span:first-child { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cooked-row b { font-weight: 600; font-size: 15px; }
.cooked-row small { font-size: 13.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cooked-row .chev { font-size: 24px; line-height: 1; color: var(--text-3); }
/* Шторка */
.overlay.csheet { z-index: 66; }
.csheet .sheet-modal { background: var(--surface); max-height: 92vh; }
.ck-head { display: flex; align-items: center; gap: 12px; }
.ck-head > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ck-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
.ck-head small { font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-ph { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--bg-deep); }
.ck-x { flex: none; background: var(--bg-deep); color: var(--text); }
.ck-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 10px; }
.ck-results { display: flex; gap: 8px; margin-top: 4px; }
.ck-results button { flex: 1; min-width: 0; height: 72px; border-radius: 18px; background: var(--bg-deep); font-weight: 600; font-size: 16px; }
.ck-results button.is-on { background: var(--text); color: var(--bg); }
.ck-lbl { margin-top: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.ck-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-chips button { height: 44px; padding: 0 16px; border-radius: 22px; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 500; font-size: 15px; }
.ck-chips button.is-on { background: var(--text); color: var(--bg); box-shadow: none; }
.ck-note { margin-top: 4px; width: 100%; min-height: 84px; resize: vertical; border: 0; border-radius: 16px; padding: 14px 16px; background: var(--bg-deep); color: var(--text); font: inherit; font-size: 16px; line-height: 1.4; }
.ck-note:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.ck-foot { flex: 0 0 auto; display: grid; gap: 4px; }
.ck-foot .btn-primary { box-shadow: none; height: 56px; }
.csheet .ck-skip { justify-self: center; height: 44px; padding: 0 16px; border: 0; background: none; box-shadow: none; font-size: 15px; font-weight: 600; color: var(--text-2); }
.ck-hist { gap: 10px; }
.ck-card { background: var(--bg-deep); border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; }
.ck-card-top { display: flex; align-items: center; gap: 10px; }
.ck-card-top b { flex: 1; font-weight: 600; font-size: 16px; }
.ck-card .res-pill:not(.is-great):not(.is-fail) { background: var(--surface); }
.ck-del { width: 44px; height: 32px; color: var(--text-3); font-weight: 700; letter-spacing: 1px; font-size: 13px; }
.ck-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ck-tags span { height: 30px; padding: 0 12px; border-radius: 15px; display: inline-grid; place-items: center; background: var(--surface); font-size: 14px; }
.ck-card p { margin: 0; font-size: 15px; line-height: 1.45; }
.ck-mark { height: 54px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-weight: 600; font-size: 15.5px; }
.ck-foot-note { text-align: center; font-size: 13px; color: var(--text-3); padding-bottom: 4px; }

/* ---------- Покупки (вариант 1 «Один список», как в приложении) ---------- */
.shop { max-width: 760px; margin: 0 auto; padding: 0 16px 8px; }
.shop .page-title, .shop .page-sub { padding-left: 0; padding-right: 0; max-width: none; margin: 0; }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; }
.shop-head .page-title { padding-top: 0; }
.shop-head .btn-link { padding: 6px 0 8px; font-size: 15px; }
.shop .page-sub { padding-top: 2px; }
.shop-recipes {
  display: flex; gap: 10px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px 4px;
}
.shop-recipes::-webkit-scrollbar { display: none; }
.shop-rec {
  flex: none; display: flex; align-items: center;
  height: 60px; max-width: 290px; padding: 0 4px 0 7px;
  border-radius: 30px; border: 1px solid var(--line); background: var(--surface);
}
.shop-rec a { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.shop-rec img { flex: none; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-deep); }
.shop-rec span { display: grid; min-width: 0; }
.shop-rec b { font-weight: 600; font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.shop-rec small { font-size: 12.5px; color: var(--text-3); }
.shop-rm { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--text-3); }
.shop-rm svg { width: 18px; height: 18px; }
.shop-rm:hover { color: var(--text); }
.shop .section { margin-top: 24px; }
.shop .section-title { font-size: 17px; }
.shop-list .name { display: grid; gap: 3px; min-width: 0; }
.shop-list input:checked ~ .name { text-decoration: none; }
.shop-list input:checked ~ .name .nm { text-decoration: line-through; }
.shop-list input:checked + .box, .shop-list .box.is-on { background: var(--green); border-color: var(--green); color: var(--surface); }
.shop-from { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--text-3); }
.ingredients .name small.shop-from { color: var(--text-3); font-size: 12.5px; }
.shop-from > :last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.shop-from .faces { flex: none; display: flex; }
.shop-from .faces img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--bg-deep); }
.shop-from .faces img + img { margin-left: -7px; }
.shop-bought-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.shop-open {
  flex: 1; min-width: 0; min-height: 48px;
  display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 12px;
  text-align: left;
}
.shop-open .name { display: grid; gap: 2px; min-width: 0; }
.shop-open b { font-weight: 600; font-size: 15px; }
.shop-open small { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-bought-row .btn-secondary { flex: none; height: 40px; padding: 0 14px; }
.shop-none { padding: 14px 0; color: var(--text-3); }
.shop-empty { padding: 18px 0 8px; display: grid; gap: 8px; max-width: 34em; }
.shop-empty h2 { font-weight: 600; font-size: 17px; }
.shop-empty p { color: var(--text-2); }
.shop-empty .btn-primary { margin-top: 14px; max-width: 360px; text-decoration: none; box-shadow: none; }
/* Кнопка под продуктами рецепта */
.shop-cta .shop-add { width: 100%; height: 50px; border-color: var(--accent); color: var(--accent); font-size: 15px; }
.shop-cta .shop-in {
  display: grid; place-items: center; height: 50px; border-radius: 14px;
  background: var(--green-soft); color: var(--green); font-weight: 600; font-size: 15px; text-decoration: none;
}

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 76px);
  transform: translateX(-50%) translateY(8px);
  z-index: 70;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  width: max-content;
  max-width: calc(100% - 32px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Тост с кнопками: «Таймер сброшен · Вернуть», «Уже идёт таймер… · Заменить · Оставить» */
.toast.has-acts { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: 6px; padding: 4px 6px 4px 16px; }
.toast.has-acts.is-visible { pointer-events: auto; }
.toast-msg { padding: 6px 0; }
.toast-acts { display: flex; white-space: nowrap; }
.toast-act { height: 40px; padding: 0 9px; border-radius: 8px; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
body.is-recipe .toast { bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); }

/* ---------- Появление ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card { animation: fadeUp .35s ease both; }
  .card:nth-child(2) { animation-delay: .04s; }
  .card:nth-child(3) { animation-delay: .08s; }
  .card:nth-child(4) { animation-delay: .12s; }
  .card:nth-child(5) { animation-delay: .16s; }
  .card:nth-child(6) { animation-delay: .2s; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Широкие экраны ---------- */
@media (min-width: 640px) {
  .topbar { padding-left: 24px; padding-right: 24px; }
  .topbar > * { max-width: 1120px; width: 100%; margin-left: auto; margin-right: auto; }
  .chips-row { padding-left: 0; padding-right: 0; margin: 0 auto; }
  .toolbar, .grid, .page-title, .page-sub { padding-left: 24px; padding-right: 24px; max-width: calc(1120px + 48px); margin-left: auto; margin-right: auto; }
  .recipe .hero { width: 100%; max-width: 1080px; justify-self: center; border-radius: 0 0 24px 24px; }
  .cook-body { max-width: 760px; width: 100%; margin: 0 auto; }
  .cook-nav { max-width: 760px; width: 100%; margin: 0 auto; }
  .cook-top { max-width: 760px; width: 100%; margin: 0 auto; }
}

/* ---------- Шапка для широких экранов (на телефоне скрыта) ---------- */
.site-head { display: none; }
.desk-nav { display: flex; gap: 6px; }
.desk-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-2);
}
.desk-nav a:hover { color: var(--text); background: var(--surface); }
.desk-nav a.is-on { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Десктоп ---------- */
@media (min-width: 1024px) {
  :root { --head-h: 72px; }
  .site-head {
    display: block;
    position: sticky;
    top: 0;
    z-index: 35;
    height: var(--head-h);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .site-head-in {
    max-width: calc(1200px + 64px);
    height: 100%;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .site-head .logo { margin-right: auto; }
  .site-head .logo-name { font-size: 24px; }
  .site-head .logo-mark { width: 44px; height: 44px; border-radius: 10px; }
  .site-head .logo-tag { font-size: 12.5px; }
  .bottom-nav { display: none; }

  /* Главная: поиск и разделы под шапкой */
  /* Поиск и разделы на десктопе не закреплены: с перенесёнными разделами они заняли бы треть экрана */
  .topbar { position: relative; top: auto; padding: 18px 32px 10px; background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .topbar .brand { display: none; }
  .topbar > *, .toolbar, .grid, .page-title, .page-sub { max-width: 1200px; }
  .toolbar, .grid, .page-title, .page-sub { padding-left: 32px; padding-right: 32px; max-width: calc(1200px + 64px); }
  .topbar .search { height: 48px; }
  .chips-row { flex-wrap: wrap; overflow: visible; margin: 0 auto; padding: 2px 0 4px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; padding-bottom: 0; }
  .page-title { font-size: 28px; padding-top: 28px; }
  .card-title { font-size: 15.5px; }

  /* Рецепт: слева закреплены фото, панель и продукты; справа — заголовок и шаги (.recipe-cols);
     ниже на всю ширину — «Ещё из раздела». Левая колонка липкая только в пределах .recipe-cols */
  .recipe {
    display: block;
    max-width: calc(1200px + 64px);
    margin: 0 auto;
    padding: 28px 32px 0;
  }
  .recipe-cols {
    display: grid;
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    column-gap: 48px;
    align-items: start;
  }
  .recipe-aside::after {
    content: '';
    order: 9;
    position: sticky;
    bottom: 0;
    flex: 0 0 28px;
    margin-top: -28px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
  }
  .recipe-aside {
    display: flex;
    flex-direction: column;
    gap: 18px;
    grid-column: 1;
    position: sticky;
    top: calc(var(--head-h) + 24px);
    max-height: calc(100vh - var(--head-h) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
  }
  .recipe-main { display: flex; flex-direction: column; gap: 32px; grid-column: 2; min-width: 0; }
  .recipe > .more { width: 100%; max-width: none; margin-top: 56px; column-gap: 20px; }
  .more-cards { gap: 24px 20px; }
  .more-group { gap: 14px; }
  /* Блоки колонок не сжимаются, порядок на десктопе свой: фото, панель, кнопка, продукты */
  .recipe-aside > *, .recipe-main > * { flex-shrink: 0; order: 0; }
  .recipe-aside > .hero { order: 0; }
  .recipe-aside > .panel { order: 1; }
  .recipe-aside > .cook-cta { order: 2; }
  .recipe-aside > .sec-ings { order: 3; }
  .recipe .hero { flex: 0 0 auto; width: 100%; max-width: none; max-height: none; aspect-ratio: 4 / 3; border-radius: 20px; }
  .recipe .hero::after { display: none; }
  .recipe .panel, .recipe .section, .recipe .source { width: 100%; max-width: none; }
  .recipe-head { margin: 0; padding: 0; width: auto; max-width: none; background: none; border-radius: 0; }
  .recipe-title { font-size: 34px; }
  .recipe-desc { font-size: 16px; }
  .cook-cta, .cook-cta.is-visible { position: static; display: block; width: 100%; transform: none; }
  .cook-cta::before { display: none; }
  .btn-primary { box-shadow: 0 6px 18px rgba(242, 107, 29, .28); }

  .steps { gap: 16px; }
  .step-text { font-size: 16px; }

  /* Режим у плиты: фото слева, текст и таймер справа */
  .cook-top, .cook-nav { max-width: 1200px; padding-left: 32px; padding-right: 32px; }
  .cook-body {
    max-width: 1200px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    column-gap: 40px;
    align-content: center;
    padding: 0 32px 24px;
  }
  .cook-body .photo { grid-column: 1; grid-row: 1 / span 4; align-self: center; width: min(100%, calc(64dvh * 4 / 3)); }
  .cook-body > :not(.photo) { grid-column: 2; }
  .cook-text { font-size: 23px; }
  .cook-flip-text { font-size: 32px; }
  .cook-nav { grid-template-columns: 200px 200px; justify-content: end; }

  /* Фильтры — окно по центру, а не шторка снизу */
  .overlay { align-items: center; }
  .sheet-modal { border-radius: 24px; max-height: 82vh; padding: 12px 24px 24px; }
  .sheet-modal .grip { display: none; }

  .timer-bar { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; width: 380px; }
  body.has-timer .sf-desk { padding-bottom: calc(var(--tb-h, 50px) + 60px); }
  .toast, body.is-recipe .toast { bottom: 32px; }
  body.has-timer .toast { bottom: calc(var(--tb-h, 50px) + 40px); }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .recipe-cols { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); column-gap: 32px; }
}
/* Шаги карточками «фото слева, текст справа» — когда правой колонке хватает ширины */
@media (min-width: 1280px) {
  .more.has-side { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .more.has-side .more-rel { grid-column: span 4; }
  .step { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 0; align-items: start; }
  .step .photo { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .step-body { padding: 18px 20px; align-self: center; }
}
@media (min-width: 1440px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .topbar > * { max-width: 1360px; }
  .site-head-in { max-width: calc(1360px + 64px); }
  .cook-top, .cook-nav, .cook-body { max-width: 1360px; }
  .toolbar, .grid, .page-title, .page-sub { max-width: calc(1360px + 64px); }
  .recipe { max-width: calc(1360px + 64px); }
  .recipe-cols { grid-template-columns: minmax(0, 480px) minmax(0, 1fr); }
}

/* ---------- Время на карточке: метка долгого ожидания на фото над бейджем (вариант 3) ---------- */
.card-photo .card-wait {
  position: absolute;
  left: 8px;
  bottom: 35px;
  max-width: calc(100% - 16px);
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(22, 21, 18, .78);
  color: #F3E3C8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ---------- Рецепт: строка «В аэрогриле: …» под описанием ---------- */
.air-line { margin: 0; max-width: 62ch; font-size: 15px; line-height: 1.45; color: var(--text); }
.air-line .air-lbl { color: var(--text-2); }
.air-line b { font-weight: 600; }
.air-line .air-wait { color: var(--cook-accent-text); }
@media (min-width: 1024px) { .air-line { font-size: 16px; } }

/* ---------- Подвал (вариант C «Колонки»; на телефоне — две строки) ---------- */
.site-foot { display: block; background: var(--bg); color: var(--text-2); }
.site-foot a, .site-foot .foot-q { color: inherit; text-decoration: none; }
.site-foot a:hover, .site-foot .foot-q:hover { color: var(--accent); }
.site-foot button { font-size: inherit; line-height: inherit; text-align: left; }
.sf-desk { display: none; }
.sf-logo { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.1; letter-spacing: -.015em; color: var(--text); white-space: nowrap; }
.sf-logo em { font-style: normal; color: var(--accent); }
.sf-dot { color: var(--text-3); margin: 0 8px; }
/* Заглушки: страниц «О проекте», справочников и контакта ещё нет */
.sf-stub { color: var(--text-3); cursor: default; }
.sf-soon {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--text-3);
  vertical-align: 1px;
}
.sf-n { margin-left: 6px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sf-lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sf-theme { white-space: nowrap; }
.sf-theme .sf-dot { margin: 0 6px; }
.sf-theme button { color: var(--text-2); padding: 4px 0; }
.sf-theme button:hover { color: var(--text); }
.sf-theme button.is-on { color: var(--text); font-weight: 600; }

/* Телефон и планшет: две строки; отступ под нижнюю навигацию и safe-area — здесь, а не у сетки */
.sf-mob {
  margin: 16px 16px 0;
  padding: 20px 0 calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-3);
}
.sf-mob .sf-dot { margin: 0 6px; }
.sf-mob a { color: inherit; text-decoration: none; }
.sf-mob a:hover { text-decoration: underline; }
.sf-mob .sf-soon { margin-left: 6px; font-size: 10.5px; line-height: 15px; }
/* Рецепт: нижней навигации нет, зато плавающая «Начать готовить» */
body.is-recipe .sf-mob { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }

@media (min-width: 1024px) {
  .sf-mob { display: none; }
  .sf-desk { display: block; margin-top: 56px; padding: 0 32px 28px; }
  .sf-in { max-width: 1200px; margin: 0 auto; border-top: 1px solid var(--line); font-size: 14px; }
  .sf-cols { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding: 40px 0 36px; }
  .sf-about { display: grid; gap: 12px; align-content: start; }
  .sf-about p { margin: 0; max-width: 42ch; color: var(--text-2); }
  .sf-about .sf-count { font-size: 13px; color: var(--text-3); }
  .sf-col ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
  .sf-col a, .sf-col .foot-q { color: var(--text); }
  .sf-col .sf-lbl .sf-soon { margin-left: 6px; }
  .sf-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    font-size: 12.5px;
    color: var(--text-3);
  }
}
@media (min-width: 1440px) { .sf-in { max-width: 1360px; } }
@media print { .site-foot { display: none; } }
