/* Рецептуры — основной стиль.
   Палитра: тёплая бумага, тёмная хвоя, терракота и горчица. */

@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-text-cyrillic.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  src: url('../fonts/golos-text-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-italic-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora-italic-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f4efe4;
  --bg-deep: #ece4d4;
  --surface: #fffdf7;
  --surface-2: #faf6ec;
  --ink: #203027;
  --ink-2: #3d4b40;
  --muted: #7a7b6d;
  --line: #ddd4c2;
  --line-strong: #c9bda6;
  --pine: #214b37;
  --pine-2: #2d6349;
  --terracotta: #bb5b3b;
  --terracotta-2: #a84d31;
  --gold: #d9a63f;
  --gold-soft: #f7e7b0;
  --sage: #e7efde;
  --danger: #a63f34;
  --shadow: 0 26px 60px -36px rgba(32, 48, 39, 0.38);
  --shadow-sm: 0 12px 28px -22px rgba(32, 48, 39, 0.34);
  --radius: 22px;
  --font-ui: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Lora', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 0%, rgba(217, 166, 63, 0.12), transparent 30rem),
    radial-gradient(circle at 96% 4%, rgba(187, 91, 59, 0.08), transparent 26rem);
  background-attachment: fixed;
}

h1, h2, h3, p, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img, svg {
  max-width: 100%;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid rgba(187, 91, 59, 0.55);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

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

.wrap--narrow {
  width: min(960px, calc(100% - 48px));
}

.page-main {
  flex: 1;
  padding-bottom: 80px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  background: var(--pine);
  border-radius: 0 0 12px 12px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------- демо-полоса */

.demo-strip {
  color: #f2ead9;
  background: var(--pine);
  font-size: 12px;
}

.demo-strip__inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-strip__tag {
  padding: 2px 7px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-strip__text {
  opacity: 0.82;
}

.demo-strip__spacer {
  flex: 1;
}

.demo-strip__hint {
  opacity: 0.58;
}

.demo-strip__reset .link-button {
  color: var(--gold-soft);
  font-size: 11.5px;
}

.link-button {
  padding: 0;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover {
  color: var(--gold-soft);
}
.link-button--danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}
.link-button--danger .icon {
  width: 16px;
  height: 16px;
}
.link-button--danger:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------- шапка */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 228, 0.9);
  border-bottom: 1px solid rgba(201, 189, 166, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand__mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: var(--pine);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px -10px rgba(33, 75, 55, 0.7);
}
.brand__mark .icon {
  width: 25px;
  height: 25px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__text strong {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.brand__text span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(255, 253, 247, 0.55);
  border: 1px solid rgba(201, 189, 166, 0.6);
  border-radius: 999px;
}
.main-nav a {
  padding: 7px 15px;
  color: var(--ink-2);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.main-nav a:hover {
  background: rgba(255, 253, 247, 0.85);
}
.main-nav a[aria-current="page"] {
  color: #fffdf7;
  background: var(--pine);
  box-shadow: 0 6px 14px -10px rgba(33, 75, 55, 0.8);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-print {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  color: var(--ink-2);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease;
}
.header-print:hover {
  background: rgba(255, 253, 247, 0.8);
}
.header-print .icon {
  width: 18px;
  height: 18px;
}
.header-print.is-muted {
  opacity: 0.55;
}
.header-print__badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: var(--terracotta);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}
.btn .icon {
  width: 17px;
  height: 17px;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #fffdf7;
  background: var(--pine);
  box-shadow: 0 10px 20px -14px rgba(33, 75, 55, 0.9);
}
.btn-primary:hover {
  background: var(--pine-2);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: #fff;
  border-color: var(--pine);
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--ink);
  background: rgba(32, 48, 39, 0.06);
}

.btn-print {
  color: #fff;
  background: var(--terracotta);
  box-shadow: 0 10px 20px -14px rgba(187, 91, 59, 0.85);
}
.btn-print:hover {
  background: var(--terracotta-2);
}

.btn-light {
  color: var(--pine);
  background: #f7f1e3;
}
.btn-light:hover {
  background: #fff;
}

.btn-soft {
  color: var(--pine);
  background: var(--sage);
}
.btn-soft:hover {
  background: #dce9cf;
}

.btn-block {
  width: 100%;
}

.btn-compact {
  padding: 8px 12px;
  font-size: 12.5px;
}
.btn-compact .icon {
  width: 15px;
  height: 15px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.icon-button:hover {
  color: var(--ink);
  background: rgba(32, 48, 39, 0.07);
}
.icon-button--add {
  color: var(--pine);
  background: var(--sage);
}
.icon-button--add:hover {
  color: #fff;
  background: var(--pine);
}

/* ------------------------------------------------------------------ flash */

.flash-stack {
  position: fixed;
  top: 86px;
  right: max(16px, calc((100vw - 1240px) / 2));
  z-index: 60;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  pointer-events: none;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--pine);
  border-radius: 12px;
  box-shadow: 0 18px 38px -22px rgba(32, 48, 39, 0.55);
  font-size: 13.5px;
  pointer-events: auto;
  animation: flash-in 0.25s ease both;
}
.flash .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--pine);
}
.flash--error {
  border-left-color: var(--danger);
}
.flash--error .icon {
  color: var(--danger);
}
.flash span {
  flex: 1;
}
.flash__close {
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.flash__close:hover {
  background: rgba(32, 48, 39, 0.07);
}
.flash__close .icon {
  width: 14px;
  height: 14px;
}

@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------- заголовки */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 44px 0 28px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--terracotta);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow > span:first-child:not(.cat-dot) {
  width: 22px;
  height: 1px;
  display: inline-block;
  background: currentColor;
}
.eyebrow .cat-dot {
  width: 6px;
  height: 6px;
}

.lede {
  max-width: 660px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}

.page-head__meta {
  display: flex;
  gap: 20px;
  flex: none;
  padding-bottom: 4px;
}

.meta-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 16px;
  border-left: 1px solid var(--line-strong);
}
.meta-link strong {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}
.meta-link span {
  color: var(--muted);
  font-size: 11px;
}
.meta-link:hover span {
  color: var(--pine);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding-bottom: 5px;
}

.page-head--row {
  align-items: flex-end;
}

/* ------------------------------------------------------------------- меню */

.menu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

.menu-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.menu-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 15px 17px;
  background: linear-gradient(180deg, #fffdf7, #faf6ec);
  border-bottom: 1px solid var(--line);
}

.menu-toolbar__count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
}
.menu-toolbar__count strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
}
.menu-toolbar__count.is-empty {
  font-size: 12px;
}

.menu-list {
  padding: 2px 8px;
}

.menu-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 104px 34px;
  align-items: center;
  gap: 13px;
  padding: 15px 10px;
  border-bottom: 1px dashed var(--line);
  transition: background 0.15s ease;
}
.menu-row:last-child {
  border-bottom: 0;
}
.menu-row:hover {
  background: #fbf7ee;
}

.menu-row__index {
  color: #b8aa92;
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  text-align: center;
}

.menu-row__main {
  min-width: 0;
}

.menu-row__title {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-row__title:hover {
  color: var(--terracotta);
}

.menu-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.cat-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  flex: none;
  background: var(--cat-color, var(--pine));
  border-radius: 50%;
}

.dot-sep {
  opacity: 0.55;
}

.portion-control {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  height: 40px;
  padding: 0 2px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(32, 48, 39, 0.04);
}
.portion-step {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 50%;
}
.portion-step:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.portion-step .icon {
  width: 14px;
  height: 14px;
}
.portion-form {
  display: flex;
}
.portion-input {
  width: 42px;
  height: 31px;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  outline: 0;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}
.portion-input::-webkit-outer-spin-button,
.portion-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.portion-input:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
  border-radius: 6px;
}
.portion-unit {
  padding-right: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.menu-row__sum {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.menu-row__sum span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 400;
}

.menu-row__remove {
  opacity: 0.32;
  transition: opacity 0.15s ease;
}
.menu-row:hover .menu-row__remove {
  opacity: 1;
}

.menu-total {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 18px 20px;
  color: #f7f1e3;
  background: var(--pine);
}
.menu-total__label {
  display: block;
  margin-bottom: 2px;
  color: rgba(247, 241, 227, 0.58);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.menu-total strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
}
.menu-total__yield {
  padding-left: 28px;
  border-left: 1px solid rgba(247, 241, 227, 0.18);
}
.menu-total .btn {
  margin-left: auto;
}

.menu-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 18px;
  color: var(--muted);
  background: #fbf7ee;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.menu-hint .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--gold);
}

/* --------------------------------------------------------- пустое меню */

.empty-menu {
  padding: 46px 24px 32px;
  text-align: center;
}

.empty-menu__art {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: var(--pine);
  background: radial-gradient(circle at 40% 30%, #fffdf7, #efe6d4);
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}
.empty-menu__art .icon {
  width: 66px;
  height: 66px;
}

.empty-menu h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-menu p {
  max-width: 540px;
  margin: 9px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.empty-menu__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.category-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.category-chips--center {
  justify-content: center;
  margin-top: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.chip:hover {
  border-color: var(--pine);
}
.chip small {
  color: var(--muted);
  font-size: 10px;
}
.chip.is-active {
  color: #fffdf7;
  background: var(--pine);
  border-color: var(--pine);
}
.chip.is-active small {
  color: rgba(255, 253, 247, 0.6);
}

/* --------------------------------------------------------- быстрые блюда */

.suggested {
  padding: 20px 20px 22px;
  background: #fbf7ee;
  border-top: 1px solid var(--line);
}

.suggested__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.suggested__head h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
}
.suggested__head a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.suggested__head a .icon {
  width: 14px;
  height: 14px;
}

.suggested-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.suggested-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.suggested-item__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cat-color);
  background: #f2ede1;
  border-radius: 10px;
}
.suggested-item__icon .icon {
  width: 19px;
  height: 19px;
}
.suggested-item__body {
  min-width: 0;
  flex: 1;
}
.suggested-item__body a {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggested-item__body a:hover {
  color: var(--terracotta);
}
.suggested-item__body span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

/* --------------------------------------------------------------- сводка */

.summary-stack {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 22px;
  color: #f5efe4;
  background-color: var(--pine);
  background-image:
    radial-gradient(circle at 88% 4%, rgba(217, 166, 63, 0.24), transparent 16rem),
    radial-gradient(circle at 8% 100%, rgba(45, 99, 73, 0.9), transparent 18rem);
  border-radius: 26px;
  box-shadow: 0 30px 50px -34px rgba(33, 75, 55, 0.75);
}

.summary-card__glow {
  position: absolute;
  top: -60px;
  right: -40px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(247, 231, 176, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(247, 231, 176, 0.04), 0 0 0 54px rgba(247, 231, 176, 0.03);
  pointer-events: none;
}

.summary-card__eyebrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d9c9a8;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.summary-card__eyebrow .icon {
  width: 14px;
  height: 14px;
  color: var(--gold-soft);
}

.summary-card__big {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 14px;
}
.summary-card__big strong {
  font-family: var(--font-display);
  font-size: 55px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.summary-card__big span {
  color: rgba(245, 239, 228, 0.65);
  font-size: 12px;
}

.summary-card__yield {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 11px 0;
  border-top: 1px solid rgba(245, 239, 228, 0.13);
  border-bottom: 1px solid rgba(245, 239, 228, 0.13);
  font-size: 12px;
}
.summary-card__yield span {
  color: rgba(245, 239, 228, 0.55);
}
.summary-card__yield b {
  font-weight: 600;
  text-align: right;
}

.breakdown-bar {
  display: flex;
  gap: 2px;
  height: 7px;
  margin: 18px 0 15px;
  overflow: hidden;
  background: rgba(245, 239, 228, 0.12);
  border-radius: 999px;
}
.breakdown-bar span {
  height: 100%;
  min-width: 3px;
  border-radius: 999px;
}

.breakdown-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.breakdown-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
}
.breakdown-list__name {
  flex: 1;
  color: rgba(245, 239, 228, 0.82);
}
.breakdown-list__value {
  color: rgba(245, 239, 228, 0.55);
  font-variant-numeric: tabular-nums;
}

.summary-card__actions {
  position: relative;
  margin-top: 20px;
}
.summary-card__actions p {
  margin-top: 9px;
  color: rgba(245, 239, 228, 0.5);
  font-size: 10.5px;
  text-align: center;
}

.summary-card__empty {
  position: relative;
  margin: 16px 0 4px;
  color: rgba(245, 239, 228, 0.7);
  font-size: 12.5px;
  line-height: 1.55;
}

.how-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}
.how-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.steps li > span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--pine);
  background: var(--sage);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.steps strong {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
}
.steps p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.how-card__footer {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.how-card__footer a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.how-card__footer .icon {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------- каталог */

.catalog-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 13px;
  background: #fbf7ee;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-form:focus-within {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(33, 75, 55, 0.08);
}
.search-form__icon {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.search-form__icon .icon {
  width: 18px;
  height: 18px;
}
.search-form input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.search-form input::placeholder {
  color: #a69f8f;
}
.search-form__clear {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 50%;
}
.search-form__clear:hover {
  background: rgba(32, 48, 39, 0.07);
}
.search-form__clear .icon {
  width: 15px;
  height: 15px;
}

.catalog-tools .category-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.catalog-tools .category-chips::-webkit-scrollbar {
  display: none;
}

.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 2px 14px;
  color: var(--muted);
  font-size: 11.5px;
}
.result-line a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-weight: 600;
}
.result-line a .icon {
  width: 14px;
  height: 14px;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.recipe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 21px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.recipe-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.recipe-card__bar {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--cat-color);
}
.recipe-card__watermark {
  position: absolute;
  right: -16px;
  bottom: -20px;
  color: var(--cat-color);
  opacity: 0.07;
  pointer-events: none;
}
.recipe-card__watermark .icon {
  width: 112px;
  height: 112px;
}
.recipe-card__top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.recipe-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cat-color);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge--selected {
  color: var(--pine);
  background: var(--sage);
}

.recipe-card__title {
  position: relative;
  margin: 15px 0 7px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  min-height: 2.16em;
}
.recipe-card__title a:hover {
  color: var(--terracotta);
}
.recipe-card__meta {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.recipe-card__meta strong {
  color: var(--ink-2);
  font-weight: 650;
}
.recipe-card__ingredients {
  position: relative;
  flex: 1;
  min-height: 35px;
  margin: 14px 0 15px;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  line-height: 1.5;
}
.recipe-card__footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.recipe-card__footer form {
  display: flex;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.card-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}
.card-link:hover .icon {
  transform: translateX(2px);
}

.empty-block {
  padding: 54px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
}
.empty-block__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  color: var(--pine);
  background: var(--sage);
  border-radius: 50%;
}
.empty-block__icon .icon {
  width: 28px;
  height: 28px;
}
.empty-block h2 {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 500;
}
.empty-block p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ------------------------------------------------------------- рецепт */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.back-link:hover {
  color: var(--pine);
}
.back-link .icon {
  width: 15px;
  height: 15px;
}
.back-link--light {
  margin-top: 0;
  color: rgba(247, 241, 227, 0.72);
}
.back-link--light:hover {
  color: #fff;
}

.detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 26px;
}
.detail-head h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 50px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.detail-head__actions {
  flex: none;
  padding-bottom: 3px;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 550;
}
.detail-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--cat-color, var(--pine));
}
.detail-chip--accent {
  color: #fff;
  background: var(--pine);
  border-color: var(--pine);
}
.detail-chip--accent .icon {
  color: var(--gold-soft);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}

.card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.card-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.card-eyebrow {
  margin-bottom: 4px;
  color: var(--terracotta);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.unit-badge {
  flex: none;
  padding: 5px 9px;
  color: var(--pine);
  background: var(--sage);
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ingredient-table {
  width: 100%;
  border-collapse: collapse;
}
.ingredient-table td {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.ingredient-table td:first-child {
  color: var(--ink-2);
}
.ingredient-table td:last-child {
  text-align: right;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ingredient-table tfoot td {
  padding-top: 13px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 0;
  font-weight: 700;
}
.ingredient-table tfoot td:first-child {
  color: var(--ink);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.card-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--gold);
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.method-text {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.68;
  white-space: pre-line;
}

.add-card h2 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.add-card__hint {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.add-card__hint strong {
  color: var(--ink);
}
.add-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.add-form__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.add-form__row input {
  width: 82px;
  height: 44px;
  padding: 0 10px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.add-form__row input:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(33, 75, 55, 0.08);
}
.add-form__row .btn {
  flex: 1;
}
.add-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.add-card__link .icon {
  width: 14px;
  height: 14px;
}
.add-card__danger {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.related {
  margin-top: 36px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
}
.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.section-head .icon {
  width: 14px;
  height: 14px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.related-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}
.related-card__icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cat-color);
  background: #f2ede1;
  border-radius: 10px;
}
.related-card__icon .icon {
  width: 18px;
  height: 18px;
}
.related-card__body {
  flex: 1;
  min-width: 0;
}
.related-card__body strong {
  display: block;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-card__body small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}
.related-card > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- формы */

.form-errors {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #7d2f25;
  background: #fdf0eb;
  border: 1px solid #f0c4b8;
  border-radius: 16px;
  font-size: 12.5px;
}
.form-errors__icon .icon {
  width: 20px;
  height: 20px;
  color: var(--danger);
}
.form-errors strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}
.form-errors ul {
  padding-left: 16px;
  list-style: disc;
}
.form-errors li + li {
  margin-top: 3px;
}

.recipe-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-card {
  padding: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}
.field--wide {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}
.field label span {
  color: var(--terracotta);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(33, 75, 55, 0.08);
}
.field__hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
}
.field__hint .icon {
  width: 13px;
  height: 13px;
}

.input-pair {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
}

.card-head--row {
  align-items: center;
}

.ingredient-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 104px 36px;
  gap: 8px;
  padding: 0 2px 7px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ingredient-rows {
  display: flex;
  flex-direction: column;
}

.ingredient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 104px 36px;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.ingredient-row input,
.ingredient-row select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  font-size: 13px;
}
.ingredient-row input:focus,
.ingredient-row select:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(33, 75, 55, 0.07);
}
.ingredient-row__amount input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ingredient-row__remove {
  opacity: 0.45;
}
.ingredient-row__remove:hover {
  opacity: 1;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.form-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--gold);
}

.form-actions {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  width: fit-content;
  margin-left: auto;
  padding: 9px;
  background: rgba(244, 239, 228, 0.9);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 38px -24px rgba(32, 48, 39, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ------------------------------------------------------------ категории */

.categories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.category-row__icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cat-color);
  background: #f2ede1;
  border-radius: 12px;
}
.category-row__icon .icon {
  width: 22px;
  height: 22px;
}
.category-row__body {
  flex: 1;
  min-width: 130px;
}
.category-row__body h2 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.15;
}
.category-row__body p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}
.category-row__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 10.5px;
  font-weight: 600;
}
.category-row__link .icon {
  width: 13px;
  height: 13px;
}
.category-row__delete {
  display: flex;
}

.category-edit {
  flex: none;
}
.category-edit > summary {
  list-style: none;
  cursor: pointer;
}
.category-edit > summary::-webkit-details-marker {
  display: none;
}
.category-edit[open] {
  flex-basis: 100%;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.category-edit__form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(0, 0.8fr) auto;
  align-items: end;
  gap: 12px;
  padding-top: 12px;
}
.category-edit__actions {
  padding-bottom: 1px;
}

.color-field legend {
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}
.color-swatches {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  min-height: 30px;
  align-items: center;
}
.color-swatch {
  position: relative;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.color-swatch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.color-swatch span {
  width: 27px;
  height: 27px;
  display: block;
  background: var(--swatch);
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(32, 48, 39, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.color-swatch:hover span {
  transform: scale(1.07);
}
.color-swatch input:checked + span {
  border-color: var(--surface);
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px rgba(32, 48, 39, 0.08);
}
.color-swatch input:focus-visible + span {
  outline: 3px solid rgba(187, 91, 59, 0.55);
  outline-offset: 2px;
}

.category-add {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.category-add__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}
.soft-card {
  background: #fbf7ee;
}
.soft-card h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
}
.soft-card p {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.soft-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
}
.soft-card .icon {
  width: 14px;
  height: 14px;
}

/* ---------------------------------------------------------- печать / экран */

.print-page {
  background-color: #e8e1d3;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(255, 253, 247, 0.65), transparent 28rem),
    radial-gradient(circle at 90% 100%, rgba(33, 75, 55, 0.08), transparent 24rem);
}

.print-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  color: #f7f1e3;
  background: rgba(33, 75, 55, 0.97);
  box-shadow: 0 8px 30px -18px rgba(0, 0, 0, 0.6);
}
.print-toolbar__inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.print-toolbar__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-left: 18px;
  border-left: 1px solid rgba(247, 241, 227, 0.2);
}
.print-toolbar__title strong {
  font-size: 13.5px;
  font-weight: 650;
}
.print-toolbar__title span {
  color: rgba(247, 241, 227, 0.6);
  font-size: 11.5px;
}
.print-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-left: auto;
}
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(247, 241, 227, 0.72);
  font-size: 11.5px;
  cursor: pointer;
}
.switch-label input {
  width: 15px;
  height: 15px;
  accent-color: var(--gold);
}
.print-toolbar .btn-primary {
  color: var(--pine);
  background: #f7f1e3;
  box-shadow: none;
}
.print-toolbar .btn-primary:hover {
  background: #fff;
}

.print-main {
  flex: 1;
}

.print-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px 60px;
}

.sheet {
  width: 210mm;
  min-height: 297mm;
  padding: 14mm 13mm 12mm;
  color: #1f2a22;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 35px 80px -40px rgba(32, 48, 39, 0.72);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #24432f;
}
.sheet-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-brand__mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #f7e7b0;
  background: #214b37;
  border-radius: 9px;
}
.sheet-brand__mark .icon {
  width: 19px;
  height: 19px;
}
.sheet-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.sheet-brand strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.sheet-brand span {
  margin-top: 3px;
  color: #7c7464;
  font-size: 6.5pt;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.sheet-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  color: #6b6353;
  font-size: 8.5pt;
  text-align: right;
}

.sheet-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0 4px;
}
.sheet-title p {
  margin-bottom: 3px;
  color: #8b8372;
  font-size: 7.5pt;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sheet-title h1 {
  font-family: var(--font-display);
  font-size: 22pt;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sheet-title__total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.sheet-title__total span {
  color: #8b8372;
  font-size: 7.5pt;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sheet-title__total strong {
  font-size: 10pt;
  font-weight: 650;
}

.print-block {
  margin-top: 7mm;
  padding-top: 3mm;
  border-top: 1px solid #2a3a2e;
  break-inside: avoid;
  page-break-inside: avoid;
}
.print-block__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.print-block__cat {
  display: block;
  margin-bottom: 1.5pt;
  color: var(--cat-color);
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.print-block__name h2 {
  font-family: var(--font-display);
  font-size: 16pt;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.print-block__portions {
  flex: none;
  padding: 3pt 9pt;
  color: #3a2f12;
  background: #f7e08a;
  border: 0.5pt solid #d9b94e;
  border-radius: 3pt;
  font-size: 9.5pt;
  font-weight: 700;
  white-space: nowrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-block__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 6mm;
  align-items: start;
  margin-top: 3mm;
}

.print-ingredients table {
  width: 100%;
  border-collapse: collapse;
}
.print-ingredients td {
  padding: 2.4pt 3pt;
  border-bottom: 0.5pt solid #c9c1b0;
  font-size: 9.5pt;
  vertical-align: middle;
}
.print-ingredient-name {
  line-height: 1.25;
}
.print-ingredient-qty {
  width: 31%;
  text-align: right;
  background: #eef5e6;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.print-yield-row td {
  padding-top: 3pt;
  border-top: 1.2pt solid #2a3a2e;
  border-bottom: 0;
  background: transparent;
  font-weight: 700;
}
.print-yield-row td:first-child {
  color: #4c4a3f;
  font-size: 7.5pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}
.print-yield-row td:last-child {
  width: 31%;
  text-align: right;
  font-size: 9.5pt;
}

.print-method {
  min-width: 0;
  padding-left: 5mm;
  border-left: 0.5pt solid #c9c1b0;
}
.print-method h3 {
  margin-bottom: 4pt;
  color: #6b6353;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.print-method__text {
  color: #3d3b32;
  font-size: 8.8pt;
  line-height: 1.4;
  white-space: pre-line;
  overflow-wrap: break-word;
  orphans: 3;
  widows: 3;
}

.sheet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7mm;
  padding-top: 3mm;
  color: #7c7464;
  border-top: 0.5pt solid #c9c1b0;
  font-size: 7.5pt;
}

.sheet.no-highlight .print-ingredient-qty {
  background: transparent;
}

.print-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 210mm;
  margin-top: 16px;
  color: #625e51;
  font-size: 11px;
  line-height: 1.45;
}
.print-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--gold);
}

.print-empty {
  max-width: 480px;
  margin: 9vh auto;
  padding: 44px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.print-empty__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  color: var(--pine);
  background: var(--sage);
  border-radius: 50%;
}
.print-empty h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
}
.print-empty p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------- подвал / моб. */

.site-footer {
  margin-top: auto;
  padding: 38px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px 30px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-brand__mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: var(--pine);
  border-radius: 11px;
}
.footer-brand__mark .icon {
  width: 21px;
  height: 21px;
}
.footer-brand strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.footer-brand p {
  margin-top: 1px;
  font-size: 10.5px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  font-size: 11px;
}
.footer-links a:hover {
  color: var(--pine);
}
.footer-note {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.mobile-nav {
  display: none;
}

/* ------------------------------------------------------------- 404 / офлайн */

.error-page {
  padding: 10vh 0;
  text-align: center;
}
.error-page__code {
  color: var(--line-strong);
  font-family: var(--font-display);
  font-size: 90px;
  font-style: italic;
  line-height: 1;
}
.error-page h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
}
.error-page p {
  margin: 8px auto 20px;
  max-width: 520px;
  color: var(--muted);
  font-size: 14px;
}
.error-page__actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.offline-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background-color: var(--bg);
}
.offline-page {
  max-width: 420px;
  text-align: center;
}
.offline-page__mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: var(--gold-soft);
  background: var(--pine);
  border-radius: 22px;
}
.offline-page h1 {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
}
.offline-page p {
  margin: 9px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.offline-page small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ адаптив */

@media (max-width: 1120px) {
  .menu-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .categories-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

@media (max-width: 940px) {
  .main-nav {
    display: none;
  }
  body {
    padding-bottom: 72px;
  }
  .print-page {
    padding-bottom: 0;
  }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 247, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -24px rgba(32, 48, 39, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 2px;
    color: var(--muted);
    border-radius: 10px;
    font-size: 9.5px;
    font-weight: 600;
  }
  .mobile-nav a .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-nav a[aria-current="page"] {
    color: var(--pine);
    background: var(--sage);
  }
  .mobile-nav a b {
    position: absolute;
    top: 1px;
    right: calc(50% - 20px);
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--terracotta);
    border-radius: 999px;
    font-size: 8.5px;
  }
  .menu-layout {
    grid-template-columns: 1fr;
  }
  .summary-stack {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .summary-card,
  .how-card {
    height: 100%;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .categories-grid {
    grid-template-columns: 1fr;
  }
  .category-add {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    margin-top: 34px;
  }
  .page-head__meta,
  .page-head__actions {
    padding-bottom: 0;
  }
  .page-head--row {
    align-items: flex-start;
  }
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .form-card {
    padding: 22px;
  }
}

@media (max-width: 740px) {
  .wrap,
  .wrap--narrow {
    width: calc(100% - 32px);
  }
  .demo-strip__hint,
  .demo-strip__text {
    display: none;
  }
  .demo-strip__inner {
    gap: 8px;
  }
  .demo-strip__reset .link-button {
    white-space: nowrap;
  }
  .header-inner {
    min-height: 68px;
    gap: 12px;
  }
  .brand__mark {
    width: 39px;
    height: 39px;
    border-radius: 12px;
  }
  .brand__text strong {
    font-size: 21px;
  }
  .brand__text span {
    font-size: 8px;
  }
  .header-print {
    padding: 7px;
  }
  .header-print > span {
    display: none;
  }
  .header-print__badge {
    position: absolute;
    margin: -22px 0 0 17px;
    min-width: 16px;
    height: 16px;
    font-size: 8.5px;
  }
  .header-print {
    position: relative;
  }
  .page-head h1 {
    font-size: 37px;
  }
  .lede {
    font-size: 14px;
  }
  .page-head__meta {
    gap: 14px;
  }
  .meta-link {
    padding-left: 12px;
  }
  .meta-link strong {
    font-size: 23px;
  }
  .menu-toolbar {
    padding: 13px;
  }
  .menu-toolbar__count {
    width: 100%;
    margin-left: 0;
    padding-left: 3px;
  }
  .menu-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main remove"
      "portion sum";
    gap: 8px 10px;
    padding: 13px 10px;
  }
  .menu-row__index {
    display: none;
  }
  .menu-row__main {
    grid-area: main;
  }
  .portion-control {
    grid-area: portion;
    justify-self: start;
  }
  .menu-row__sum {
    grid-area: sum;
    justify-self: end;
  }
  .menu-row__remove {
    grid-area: remove;
    opacity: 0.55;
  }
  .menu-total {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .menu-total__yield {
    padding-left: 0;
    border-left: 0;
  }
  .menu-total .btn {
    width: 100%;
    margin-left: 0;
  }
  .empty-menu {
    padding: 35px 18px 26px;
  }
  .empty-menu h2 {
    font-size: 26px;
  }
  .suggested {
    padding: 16px;
  }
  .suggested-grid {
    grid-template-columns: 1fr;
  }
  .summary-stack {
    grid-template-columns: 1fr;
  }
  .summary-card__big strong {
    font-size: 48px;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
  }
  .recipe-card__title {
    min-height: 0;
  }
  .page-head__actions {
    flex-wrap: wrap;
  }
  .detail-side {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 19px;
  }
  .ingredient-table-head,
  .ingredient-row {
    grid-template-columns: minmax(0, 1fr) 72px 78px 32px;
    gap: 6px;
  }
  .ingredient-row input,
  .ingredient-row select {
    padding: 0 8px;
    font-size: 12px;
  }
  .category-edit__form {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .category-add {
    display: flex;
  }
  .form-actions {
    width: 100%;
    justify-content: center;
    border-radius: 18px;
  }
  .form-actions .btn {
    flex: 1;
  }
  .sheet {
    width: 100%;
    min-height: 0;
    padding: 22px 18px;
  }
  .sheet-title h1 {
    font-size: 22px;
  }
  .print-block__body {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .print-method {
    padding-left: 0;
    padding-top: 9px;
    border-top: 0.5pt solid #c9c1b0;
    border-left: 0;
  }
  .print-toolbar__inner {
    min-height: 58px;
    gap: 10px;
  }
  .print-toolbar__title {
    padding-left: 10px;
  }
  .print-toolbar__title span {
    display: none;
  }
  .switch-label {
    display: none;
  }
  .print-toolbar .btn-primary {
    padding: 9px 12px;
    font-size: 12px;
  }
  .print-stage {
    padding: 16px 12px 40px;
  }
  .print-note {
    padding: 0 4px;
  }
}

@media (max-width: 520px) {
  .brand__text span {
    display: none;
  }
  .brand__text strong {
    font-size: 21px;
  }
  .header-actions .btn-compact {
    padding: 8px 10px;
  }
  .header-actions .btn-compact span {
    display: none;
  }
  .demo-strip__inner {
    min-height: 32px;
  }
  .demo-strip__tag {
    font-size: 8.5px;
  }
  .demo-strip__text {
    font-size: 10.5px;
  }
  .demo-strip__reset .link-button {
    font-size: 10px;
  }
  .page-head h1 {
    font-size: 33px;
  }
  .detail-head h1 {
    font-size: 34px;
  }
  .page-head__meta {
    width: 100%;
  }
  .meta-link {
    flex: 1;
  }
  .menu-row__title {
    white-space: normal;
  }
  .portion-control {
    height: 37px;
  }
  .portion-step {
    width: 28px;
    height: 28px;
  }
  .portion-input {
    width: 37px;
  }
  .menu-row__sum {
    font-size: 12.5px;
  }
  .card {
    padding: 19px;
  }
  .card-head h2 {
    font-size: 23px;
  }
  .add-form__row {
    flex-direction: column;
  }
  .add-form__row input {
    width: 100%;
  }
  .category-row__link {
    order: 4;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-links {
    gap: 12px;
  }
  .footer-note {
    flex-direction: column;
    gap: 4px;
  }
  .sheet-head {
    align-items: flex-start;
  }
  .sheet-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
  .sheet-title__total {
    align-items: flex-start;
  }
  .sheet-title h1 {
    font-size: 20px;
  }
  .print-block__name h2 {
    font-size: 20px;
  }
  .print-block__portions {
    padding: 5px 8px;
    font-size: 11px;
  }
  .print-toolbar__title {
    display: none;
  }
  .print-toolbar__actions {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------- печать */

@page {
  size: A4 portrait;
  margin: 10mm 10mm 12mm;
}

@media print {
  html,
  body {
    min-height: 0;
    padding: 0 !important;
    color: #000;
    background: #fff !important;
  }

  body {
    display: block;
  }

  .no-print,
  .site-header,
  .site-footer,
  .demo-strip,
  .mobile-nav,
  .flash-stack,
  .skip-link,
  .print-toolbar,
  .print-stage > .print-note {
    display: none !important;
  }

  .print-main {
    padding: 0;
  }

  .print-stage {
    display: block;
    padding: 0;
  }

  .sheet {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .print-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .print-block__head {
    break-after: avoid;
    page-break-after: avoid;
  }

  .sheet-head,
  .sheet-title {
    break-after: avoid;
    page-break-after: avoid;
  }

  .print-ingredient-qty,
  .print-block__portions {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .print-method__text {
    orphans: 3;
    widows: 3;
  }
}
