/* Dinner Party — дизайн-система */
@font-face { font-family: 'Lora'; src: url('../fonts/lora.woff') format('woff'); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('../fonts/lora-italic.woff') format('woff'); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('../fonts/sourcesans.woff') format('woff'); font-weight: 300 800; font-style: normal; font-display: swap; }

:root {
  --cream: #f8f2e8;
  --cream-2: #f1e8da;
  --paper: #fffcf6;
  --ink: #2b2a27;
  --ink-2: #5b5850;
  --ink-3: #8a857a;
  --line: #e3d9c8;
  --sage: #7f9274;
  --sage-d: #5f7356;
  --sage-l: #dfe6d6;
  --peach: #f0c6a8;
  --peach-l: #f9e3d3;
  --butter: #f3e2ad;
  --butter-l: #f8efcf;
  --danger: #a8503b;
  --serif: 'Lora', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --r: 14px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgba(43, 42, 39, .05), 0 6px 20px rgba(43, 42, 39, .05);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.18; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--sage-d); outline-offset: 2px; border-radius: 6px; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(248, 242, 232, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; padding-top: var(--safe-t); }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { display: flex; align-items: center; gap: 10px; height: 58px; }
.logo { font-family: var(--serif); font-size: 23px; font-weight: 500; text-decoration: none; letter-spacing: -.01em; margin-right: auto; }
.logo { display: inline-flex; align-items: baseline; gap: 7px; color: var(--ink); white-space: nowrap; }
.logo .sp { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: lowercase; color: var(--sage-d); }
.top-nav { display: none; gap: 4px; margin-right: 8px; }
.top-nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-2); }
.top-nav a.on { background: var(--paper); color: var(--ink); }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink); text-decoration: none; }
.icon-btn:hover { background: var(--cream-2); }
.icon-btn svg, .nav svg { width: 22px; height: 22px; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink-2); font-size: 15px; min-height: 44px; }

/* Нижняя навигация */
.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: rgba(255, 252, 246, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav-in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 560px; margin: 0 auto; height: var(--nav-h); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11.5px; color: var(--ink-3); position: relative; }
.nav a.on { color: var(--ink); }
.nav a.on::before { content: ''; position: absolute; top: 0; width: 28px; height: 2px; border-radius: 2px; background: var(--sage-d); }
.badge { position: absolute; top: 8px; left: 50%; margin-left: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--sage-d); color: #fff; font-size: 10.5px; line-height: 17px; text-align: center; }

/* Типографика страниц */
.page { padding-top: 10px; }
.page-head { margin: 14px 0 18px; }
.page-head h1 { font-size: 32px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.kicker { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.section { margin: 34px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.section-head a { font-size: 15px; color: var(--sage-d); text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.98); }
.btn:hover { background: #3d3b37; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--paper); }
.btn.sage { background: var(--sage-d); border-color: var(--sage-d); }
.btn.danger { background: transparent; color: var(--danger); border-color: #e7c7bd; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--sage-d); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Промо-слайдер */
.promo { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; scrollbar-width: none; border-radius: var(--r); }
.promo::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; border-radius: var(--r); padding: 26px 22px; min-height: 230px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; text-decoration: none; position: relative; overflow: hidden; }
.slide.sage { background: var(--sage-l); }
.slide.peach { background: var(--peach-l); }
.slide.butter { background: var(--butter-l); }
.slide h2 { font-size: 29px; margin: 8px 0 8px; max-width: 16ch; }
.slide p { margin: 0 0 16px; color: var(--ink-2); max-width: 40ch; }
.slide .btn { align-self: flex-start; }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 6px; }
.dots button { width: 28px; height: 28px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; }
.dots button::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.dots button.on::after { background: var(--ink); width: 18px; border-radius: 4px; }

/* Поиск */
.search { position: relative; }
.search input { width: 100%; height: 50px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 0 46px 0 46px; font-size: 16px; }
.search input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-l); }
.search > svg { position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; color: var(--ink-3); }
.search .clear { position: absolute; right: 4px; top: 3px; }

/* Категории */
.cats { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 18px 4px; margin: 0 -18px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 84px; text-decoration: none; font-size: 13.5px; text-align: center; line-height: 1.25; }
.cat span.ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--sage-d); }
.cat span.ic svg { width: 28px; height: 28px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 18px; margin: 0 -18px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 15px; white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seg { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; white-space: nowrap; border: 0; background: none; min-height: 36px; padding: 0 13px; border-radius: 999px; cursor: pointer; font-size: 14.5px; color: var(--ink-2); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 14px 0 18px; }
.select { min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 14.5px; }

/* Выпадающий список сортировки */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 15px; color: var(--ink); white-space: nowrap; }
.dd-btn:hover { border-color: var(--sage); }
.dd-btn[aria-expanded="true"] { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-l); }
.dd-btn svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform .15s; }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 12px 32px rgba(43, 42, 39, .12); animation: up .15s; }
.dd-menu button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 15px; text-align: left; color: var(--ink); }
.dd-menu button:hover, .dd-menu button:focus-visible { background: var(--cream); outline: none; }
.dd-menu button[aria-selected="true"] { color: var(--sage-d); font-weight: 600; }
.dd-menu svg { width: 18px; height: 18px; }
.price-l { font-family: var(--serif); font-size: 19px; margin: 0 0 8px; }
.locked-box { background: var(--butter-l); }
.poster { position: relative; width: 100%; height: 100%; background-size: cover; background-position: center; }
.hero .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero.hero-poster { aspect-ratio: 4 / 5; max-height: 72vh; }
@media (min-width: 640px) { .hero.hero-poster { aspect-ratio: 4 / 3; max-height: 620px; } }
.coll-body { margin-top: 14px; font-size: 17px; color: var(--ink-2); }
.coll-body p { margin: 0 0 12px; }
.tone-collection { background: linear-gradient(160deg, #e9ecdf, #cfd9c3); }
.coll-list { list-style: none; margin: 0; padding: 0; }
.coll-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.coll-list li:last-child { border-bottom: 0; }
.coll-list a { text-decoration: none; }
.buy-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--sage-l); }
.buy-box .price { font-family: var(--serif); font-size: 30px; margin: 2px 0 4px; }

/* Платный рецепт: анонс, открытие кодом, этапы */
.teaser { margin-top: 18px; color: var(--ink-2); font-size: 17px; }
.teaser p { margin: 0 0 12px; }
.teaser .quote { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--ink); }
.inside { list-style: none; padding: 0; margin: 0; }
.inside li { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.inside li:last-child { border-bottom: 0; }
.inside b { font-family: var(--serif); font-weight: 500; color: var(--sage-d); font-size: 19px; }
.inside strong { text-transform: uppercase; letter-spacing: .06em; font-size: 14px; margin-right: 4px; }
.unlock { margin-top: 16px; padding: 18px; border: 1px dashed var(--sage); border-radius: var(--r); background: var(--paper); }
.unlock label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.unlock-row { display: flex; gap: 8px; }
.unlock-row .input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.unlock .login-err { margin: 8px 0 0; }
.sec-note { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-3); }
.sec-note span { white-space: nowrap; }
.stage + .stage { margin-top: 26px; }
.stage-h { display: flex; align-items: center; gap: 10px; font-size: 21px; margin: 6px 0 4px; }
.stage-h span { width: 30px; height: 30px; border-radius: 50%; background: var(--sage-l); color: var(--sage-d); display: grid; place-items: center; font-size: 15px; font-family: var(--sans); font-weight: 700; flex: 0 0 30px; }
.step-list { margin: 8px 0 0; padding-left: 18px; }
.steps .step-list li { counter-increment: none; display: list-item; grid-template-columns: none; padding: 3px 0; border: 0; }
.steps .step-list li::before { content: none; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.gallery.g3 { grid-template-columns: repeat(2, 1fr); }
.gal-item { padding: 0; border: 0; background: var(--cream-2); border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; }
.zoom-img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; margin-bottom: 12px; }
.folds { display: grid; gap: 10px; margin-top: 22px; }
.fold { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.fold summary { cursor: pointer; padding: 16px 18px; font-family: var(--serif); font-size: 19px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; font-family: var(--sans); font-size: 22px; color: var(--sage-d); }
.fold[open] summary::after { content: '−'; }
.fold-body { padding: 0 18px 18px; }
.fold-h { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 16px 0 4px; }
.products { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.products a, .products div { width: 104px; text-decoration: none; text-align: center; font-size: 12.5px; color: var(--ink-2); }
.products img { width: 104px; height: 104px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 4px; }
.outro { background: var(--butter-l); border-radius: var(--r); padding: 22px; }
.outro h2 { font-size: 24px; margin-bottom: 8px; }
.outro p { margin: 0 0 10px; color: var(--ink-2); }
@media (min-width: 640px) { .gallery.g3 { grid-template-columns: repeat(3, 1fr); } }

/* Примеры платных и доп. блоки */
.ex-badge { position: absolute; left: 8px; bottom: 8px; z-index: 1; background: rgba(43, 42, 39, .82); color: var(--paper); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; padding: 5px 9px; border-radius: 999px; }
.ex-note { margin-bottom: 18px; }
.ex-note a { color: var(--sage-d); font-weight: 600; }
.more-intro { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); margin: 0 0 6px; }
.more-item { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.more-item:last-of-type { border-bottom: 0; }
.more-item p { margin: 6px 0; }
.more-img { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; margin-top: 14px; }
.more-list { margin: 6px 0; padding-left: 18px; }
.more-list li { padding: 3px 0; }
.more-links { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-link { width: auto !important; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

/* Карточки */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 18px; margin: 0 -18px; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { scroll-snap-align: start; }
.card { display: flex; flex-direction: column; min-width: 0; position: relative; }
.card .ph { position: relative; aspect-ratio: 2 / 3; border-radius: var(--r); overflow: hidden; background: var(--cream-2); display: block; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; background: rgba(255, 252, 246, .92); box-shadow: 0 1px 6px rgba(43, 42, 39, .12); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: transform .12s; }
.card .fav:active { transform: scale(.9); }
.card .body { padding: 10px 2px 0; display: flex; flex-direction: column; flex: 1; }
.card .cat-l { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.card h3 { font-size: 18px; margin: 4px 0 4px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a { text-decoration: none; }
.card p { margin: 0 0 12px; font-size: 14.5px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .acts { margin-top: auto; }
.card .acts .btn { width: 100%; min-height: 42px; font-size: 15px; }
.fav { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.fav svg { width: 21px; height: 21px; }
.fav.on { color: var(--danger); }
.fav.on svg path { fill: currentColor; }

/* Заглушка фото */
.placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.placeholder .mono { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; color: rgba(43, 42, 39, .55); margin-bottom: auto; margin-top: 8px; }
.placeholder .note { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(43, 42, 39, .5); }
.tone-zavtraki { background: linear-gradient(160deg, #f8efcf, #f3dcb6); }
.tone-supy { background: linear-gradient(160deg, #eef1e4, #d9e2cc); }
.tone-osnovnye { background: linear-gradient(160deg, #f9e3d3, #eec7ab); }
.tone-deserty { background: linear-gradient(160deg, #f8e8e1, #edd1c6); }
.tone-vypechka { background: linear-gradient(160deg, #f5ead6, #e8d3b0); }
.tone-napitki { background: linear-gradient(160deg, #fbeed7, #f2cfa5); }

/* Club-баннер */
.club-card { background: var(--ink); color: var(--paper); border-radius: var(--r); padding: 24px 22px; display: grid; gap: 12px; }
.club-card h2 { font-size: 26px; }
.club-card p { margin: 0; color: #d9d3c7; }
.club-card .price { font-family: var(--serif); font-size: 22px; }
.club-card .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); justify-self: start; }

/* Пустые состояния и уведомления */
.empty { text-align: center; padding: 40px 18px; border: 1px dashed var(--line); border-radius: var(--r); background: rgba(255, 252, 246, .5); }
.empty h3 { font-size: 21px; margin-bottom: 6px; }
.empty p { margin: 0 auto 16px; color: var(--ink-2); max-width: 40ch; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: var(--r-s); background: var(--butter-l); font-size: 14.5px; color: var(--ink-2); line-height: 1.45; }
.notice svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; color: #a3842d; }
.notice.sage { background: var(--sage-l); }
.notice.sage svg { color: var(--sage-d); }

/* Страница рецепта */
.hero { aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--cream-2); margin: 6px 0 18px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .placeholder .mono { font-size: 88px; }
.r-head { display: grid; gap: 8px; }
.r-head h1 { font-size: 31px; }
.r-head .lead { margin: 0; color: var(--ink-2); font-size: 17.5px; }
.r-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14.5px; color: var(--ink-3); margin-top: 4px; }
.r-title-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.r-title-row .fav { flex: 0 0 auto; background: var(--paper); border: 1px solid var(--line); width: 46px; height: 46px; }
.r-layout { display: grid; gap: 28px; margin-top: 26px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; }
.panel h2 { font-size: 23px; margin-bottom: 12px; }
.scale { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--cream); margin-bottom: 14px; }
.scale .lbl { font-weight: 600; font-size: 15.5px; }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 56px; text-align: center; font-family: var(--serif); font-size: 21px; font-variant-numeric: tabular-nums; }
.ing-sec + .ing-sec { margin-top: 16px; }
.ing-sec + .ing-sec { margin-top: 22px; }
.ing-sec h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--ink); margin: 0 0 4px; padding-bottom: 8px; border-bottom: 2px solid var(--sage); display: flex; align-items: center; gap: 8px; }
.ing-sec h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sage-d); flex: 0 0 8px; }
.ing { list-style: none; margin: 0; padding: 0; }
.ing li, .opt-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ing li:last-child { border-bottom: 0; }
.ing .nm { min-width: 0; }
.nt { display: block; font-size: 14px; color: var(--ink-3); line-height: 1.35; margin-top: 2px; }
.ing .q, .opt-row .q { flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; max-width: 48%; white-space: nowrap; }
.ing .q.txt, .opt-row .q.txt, .ing .q.long, .opt-row .q.long { white-space: normal; }
.opt-row .nm > span { min-width: 0; }
.ing .q.txt, .opt-row .q.txt { font-weight: 400; color: var(--ink-2); }
.opts { border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 12px 10px; margin: 8px 0; background: var(--cream); }
.opts.need { border-color: var(--danger); box-shadow: 0 0 0 3px #f3dcd4; }
.opts legend { padding: 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); }
.opts legend span { font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.opt-row { cursor: pointer; border-bottom: 1px solid var(--line); padding: 9px 0; }
.opt-row:last-of-type { border-bottom: 0; }
.opt-row .nm { display: flex; gap: 10px; align-items: flex-start; }
.opt-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--sage-d); flex: 0 0 auto; }
.opt-or { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); text-align: center; margin: -1px 0; }
.callout { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--peach); background: var(--peach-l); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: 14.5px; font-style: italic; font-family: var(--serif); color: var(--ink-2); }
.to-shop { margin-top: 16px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); font-family: var(--serif); font-size: 22px; color: var(--sage-d); line-height: 1.2; }
.tip { margin-top: 16px; padding: 16px; border-radius: var(--r-s); background: var(--sage-l); }
.tip.warn { background: var(--peach-l); }
.tip h3 { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sage-d); margin-bottom: 6px; }
.tip.warn h3 { color: var(--danger); }
.tip p { margin: 0; }
.tip p + p { margin-top: 8px; }
.calc { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; margin-top: 14px; padding: 14px; border-radius: var(--r-s); background: var(--butter-l); font-size: 15px; }
.calc h3 { grid-column: 1 / -1; font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #8a6d1e; font-weight: 700; margin: 0; }
.calc input { width: 92px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); padding: 0 10px; text-align: right; font-size: 16px; }
.calc b { text-align: right; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 13.5px; color: var(--ink-3); }
.input, textarea.input, select.input { width: 100%; min-height: 46px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--paper); padding: 10px 12px; font-size: 16px; }
textarea.input { resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-l); }
.saved { font-size: 13.5px; color: var(--sage-d); min-height: 20px; margin-top: 6px; }

/* Список покупок */
.shop-block { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px 8px; margin-bottom: 14px; }
.shop-block > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0 6px; border-bottom: 1px solid var(--line); }
.shop-block > header h3 { font-size: 18px; }
.shop-block > header a { text-decoration: none; }
.shop-block > header .muted { font-family: var(--sans); font-size: 13.5px; font-weight: 400; }
.si { display: grid; grid-template-columns: 30px 1fr auto 36px; gap: 8px; align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); }
.si:last-child { border-bottom: 0; }
.si input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--sage-d); margin: 0; }
.si .nm { min-width: 0; line-height: 1.3; }
.si .src { display: block; font-size: 13px; color: var(--ink-3); }
.si .qbtn { background: none; border: 0; padding: 6px 4px; text-align: right; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; border-bottom: 1px dashed var(--line); max-width: 140px; }
.si .qbtn.static { cursor: default; border-bottom: 0; }
.si.done .nm, .si.done .qbtn { color: var(--ink-3); text-decoration: line-through; }
.si .del { width: 36px; height: 36px; }
.si .del svg { width: 17px; height: 17px; color: var(--ink-3); }
.si input.qedit { width: 120px; height: 36px; border-radius: 8px; border: 1px solid var(--sage); padding: 0 8px; text-align: right; font-size: 15px; }
.add-row { display: flex; gap: 8px; margin-top: 14px; }
.add-row .input { flex: 1; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Профиль, Club, книга */
.list-menu { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list-menu a, .list-menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-decoration: none; text-align: left; cursor: pointer; font-size: 16px; }
.list-menu > :last-child { border-bottom: 0; }
.list-menu .r { color: var(--ink-3); font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.list-menu svg { width: 18px; height: 18px; color: var(--ink-3); }
.club-hero { background: var(--sage-l); border-radius: var(--r); padding: 28px 22px; }
.club-hero h1 { font-size: 34px; margin: 6px 0 10px; }
.club-hero .price { font-family: var(--serif); font-size: 40px; margin: 10px 0 2px; }
.club-hero .price small { font-size: 18px; color: var(--ink-2); }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.benefits li:last-child { border-bottom: 0; }
.benefits svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--sage-d); margin-top: 2px; }
.how { display: grid; gap: 12px; }
.how div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
.how b { font-family: var(--serif); font-size: 21px; color: var(--sage-d); font-weight: 500; }
.how p { margin: 0; }
.book-item { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; margin-bottom: 10px; }
.book-item .ini { flex: 0 0 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 26px; }
.book-item h3 { font-size: 18px; }
.book-item p { margin: 2px 0 0; font-size: 14px; color: var(--ink-3); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.steps-plain { padding-left: 22px; margin: 0; }
.steps-plain li { padding: 6px 0; }

/* Модальное окно и тост */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(43, 42, 39, .42); display: flex; align-items: flex-end; justify-content: center; padding: 12px; animation: fade .15s; }
.modal { width: 100%; max-width: 440px; background: var(--paper); border-radius: 18px; padding: 22px 20px calc(18px + var(--safe-b)); box-shadow: 0 20px 60px rgba(0, 0, 0, .2); animation: up .2s; }
.modal h2 { font-size: 23px; margin-bottom: 8px; }
.modal p { margin: 0 0 18px; color: var(--ink-2); }
.modal .acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal textarea { width: 100%; height: 180px; font-size: 13px; font-family: ui-monospace, monospace; }
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; font-size: 15px; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 28px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: up .2s; }
.toast a, .toast button { color: var(--butter); background: none; border: 0; font-weight: 600; cursor: pointer; padding: 4px; white-space: nowrap; text-decoration: none; }
.offline { position: sticky; top: calc(58px + var(--safe-t)); z-index: 19; background: var(--butter); text-align: center; font-size: 14px; padding: 6px 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(14px); opacity: 0; } }
.toast { animation-name: upx; }
@keyframes upx { from { transform: translate(-50%, 14px); opacity: 0; } }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(24px + var(--safe-t)) 18px calc(24px + var(--safe-b)); margin-bottom: calc(-1 * (var(--nav-h) + var(--safe-b) + 24px)); }
.login { width: 100%; max-width: 400px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 30px 24px 24px; box-shadow: var(--shadow); }
.login-logo { font-size: 26px; margin-bottom: 22px; }
.login h1 { font-size: 26px; margin-bottom: 4px; }
.login > p.muted { margin: 0 0 20px; }
.pw { position: relative; }
.pw .input { padding-right: 96px; }
.pw .link { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14.5px; min-height: 40px; }
.login-err { min-height: 22px; color: var(--danger); font-size: 14.5px; margin: -4px 0 10px; }
.me { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.me h2 { margin: 4px 0 0; font-size: 22px; }
footer.foot { margin: 48px 0 0; padding: 20px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-3); }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 18px; }
  .rail { grid-auto-columns: 30%; }
  .slide { min-height: 300px; padding: 40px 36px; }
  .slide h2 { font-size: 38px; }
  .page-head h1 { font-size: 40px; }
  .r-head h1 { font-size: 40px; }
  .hero { aspect-ratio: 16 / 9; }
}
@media (min-width: 960px) {
  .hero { aspect-ratio: 21 / 8; }
  .modal-bg { align-items: center; }
}
@media (min-width: 960px) {
  body { padding-bottom: 24px; }
  .nav { display: none; }
  .top-nav { display: flex; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; padding: 0; margin: 0; }
  .r-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: 36px; }
  .r-layout .ing-col { position: sticky; top: 76px; }
  .toast { bottom: 24px; }
  .cats { padding: 2px 0; margin: 0; }
  .chips { padding: 2px 0; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.toolbar .dd { margin-left: auto; }
.seg-wrap { overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; max-width: calc(100% + 36px); }
.seg-wrap::-webkit-scrollbar { display: none; }
.seg-wrap .seg { max-width: none; overflow: visible; }
@media (min-width: 960px) { .seg-wrap { margin: 0; padding: 2px 0; max-width: 100%; } }
/* Фильтр доступа на телефоне: все пункты в одну строку, без прокрутки */
@media (max-width: 639px) {
  .seg-wrap { margin: 0; padding: 2px 0; overflow: visible; width: 100%; max-width: 100%; }
  .seg-wrap .seg { display: flex; width: 100%; }
  .seg-wrap .seg { gap: 0; }
  .seg-wrap .seg button { flex: 1 1 auto; min-width: 0; padding: 0 6px; font-size: 13.5px; letter-spacing: -.005em; }
}
@media (max-width: 419px) { .seg-wrap .seg button { padding: 0 5px; font-size: 13px; } }
@media (max-width: 379px) { .seg-wrap .seg button { padding: 0 4px; font-size: 12px; } }
