/* Бліндаж by Ristero. Стиль по референсу references/style-reference-sweetgreen.webp:
   кремовый фон, бежевые карточки, тёмно-зелёный, салатовый акцент, шалфейный блок, крупные лёгкие заголовки.
   Отступы 4/8: 8, 12, 16, 24, 32, 48, 64. Радиусы: 12 карточки и фото, кнопки-таблетки по референсу. */
:root {
  --bg: #f5f1e6;
  --card: #ece2cf;
  --ink: #1d2620;
  --muted: #5d625a;
  --green: #0f4a30;
  --on-green: #f5f1e6;
  --lime: #dcf36b;
  --on-lime: #1d2620;
  --sage: #a9c2a6;
  --on-sage: #14251b;
  --foot: #0f4a30;
  --on-foot: #eef0e1;
  --wrap: 1280px;
  --pad: 16px;
  --gap: 12px;
  --block: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: only light;
}
@media (min-width: 600px) { :root { --pad: 24px; --gap: 24px; --block: 64px; } }
@media (min-width: 1024px) { :root { --pad: 32px; --block: 80px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 "Onest", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--pad), env(safe-area-inset-left)); padding-right: max(var(--pad), env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 16px; height: 16px; fill: currentColor; flex: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* type */
.display { font-weight: 300; font-size: clamp(40px, 9vw, 80px); line-height: 0.98; letter-spacing: -0.035em; }
.label { font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; padding: 8px 0; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* pills (по референсу) */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; }
.pill-green { background: var(--green); color: var(--on-green); }
.pill-lime { background: var(--lime); color: var(--on-lime); }
.pill-line { box-shadow: inset 0 0 0 1px currentColor; }

/* header */
.top { background: var(--bg); }
.top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; }
.nav { display: flex; gap: 24px; }
.nav a, .nav-fav { position: relative; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; padding: 12px 0; }
.wordmark { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; color: var(--green); text-decoration: none; line-height: 1; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.top-call { height: 36px; padding: 0 16px; font-size: 12px; }
@media (max-width: 767px) {
  .top-row { grid-template-columns: auto 1fr auto; }
  .wordmark { order: -1; font-size: 22px; }
  .nav { justify-content: flex-end; gap: 16px; }
  .top-call { display: none; }
}

/* hero */
.hero { position: relative; overflow: hidden; background: #2a2116; color: #fffdf6; min-height: min(78svh, 620px); display: flex; align-items: flex-end; }
.hero-photos { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr; }
.hero-photos img { width: 100%; height: 100%; object-fit: cover; }
.hero-photos img + img { display: none; }
@media (min-width: 768px) {
  .hero { min-height: 560px; }
  .hero-photos { grid-template-columns: 1.2fr 1fr 1fr; }
  .hero-photos img + img { display: block; }
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(20deg, rgba(20, 14, 6, .72) 0%, rgba(20, 14, 6, .35) 45%, rgba(20, 14, 6, 0) 70%); pointer-events: none; }
.hero-text { position: relative; z-index: 1; padding-top: 48px; padding-bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.hero .display { font-size: clamp(48px, 11vw, 96px); }
.hero .pill { margin-top: 8px; }

/* text tabs */
.tabs { position: relative; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--pad); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: none; position: relative; padding: 8px 0 16px; border: 0; background: none; cursor: pointer;
  font: 300 clamp(26px, 4.4vw, 40px)/1.1 "Onest", system-ui, sans-serif; letter-spacing: -0.03em;
  color: var(--muted); opacity: .7; text-decoration: none; white-space: nowrap; scroll-snap-align: start;
}
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); opacity: 1; }

/* showcase on home */
.showcase { padding: var(--block) 0; }
.showcase .tabs { justify-content: safe center; margin-bottom: 24px; }
.showcase-row { position: relative; }
.cards { display: grid; gap: 32px var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.cards-row { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding-left: 0; }
.cards-row::-webkit-scrollbar { display: none; }
.cards-row > * { flex: 0 0 min(78%, 340px); scroll-snap-align: start; }
@media (min-width: 1024px) { .cards-row > * { flex-basis: calc((100% - 2 * var(--gap)) / 3); } }
.row-arrows { display: none; }
@media (min-width: 1024px) {
  .row-arrows { display: flex; gap: 8px; position: absolute; top: 16px; right: calc(var(--pad) + 16px); z-index: 2; }
}
.arrow { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; cursor: pointer; }
.arrow:disabled { opacity: .35; cursor: default; }
.arrow .ic { width: 18px; height: 18px; }
.showcase-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; margin-top: 16px; }

/* dish card */
.dish { display: flex; flex-direction: column; gap: 6px; }
.dish-photo { position: relative; aspect-ratio: 7 / 5; border-radius: 12px; overflow: hidden; background: var(--card); margin-bottom: 10px; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .5s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.dish-photo img.ready { opacity: 1; transform: none; }
.dish-name { font-size: 15px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.3; }
.dish-price { font-size: 15px; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); }
@media (max-width: 599px) {
  .cards:not(.cards-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .cards:not(.cards-row) .dish-name { font-size: 13px; }
}

/* text list (no photo) */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 48px; }
@media (min-width: 840px) { .list.two { grid-template-columns: 1fr 1fr; } }
.list li { display: flex; align-items: baseline; gap: 16px; padding: 12px 0; }
.li-name { flex: 1; min-width: 0; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; font-size: 14px; }
.li-name .note { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 2px; }
.sizes { display: flex; gap: 12px; }
.size { min-width: 76px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.size small { color: var(--muted); font-size: 12px; margin-right: 4px; }
.cards + .list { margin-top: 40px; }

/* pages */
.page { padding-top: 24px; padding-bottom: var(--block); }
.page-flush { padding-bottom: 0; }
.page-head { display: grid; gap: 24px; margin-bottom: 40px; }
.page-head .label { margin-bottom: 12px; color: var(--muted); }
@media (min-width: 840px) { .page-head { grid-template-columns: 1fr minmax(320px, 420px); align-items: end; } }

/* search */
.search { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 6px 0 20px; border-radius: 999px; background: var(--card); color: var(--muted); }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.search .ic { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.search-clear[hidden] { display: none; }

/* category tiles (menu page) */
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; }
.tile-media { aspect-ratio: 7 / 5; border-radius: 12px; overflow: hidden; background: var(--card); margin-bottom: 10px; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-preview { height: 100%; padding: 20px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.tile-preview span { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.tile-preview b { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-preview i { flex: none; white-space: nowrap; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile-name { font-size: 15px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; }
.tile-count { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 599px) {
  .tile-preview { padding: 12px; gap: 4px; }
  .tile-preview span { font-size: 12px; }
  .tile-name { font-size: 13px; }
}
.result-group + .result-group { margin-top: var(--block); }
.result-group h2 { margin-bottom: 24px; }
.result-group h2 a { text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.h-light { font-weight: 300; font-size: clamp(28px, 5vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }

/* category page */
.back { color: var(--muted); }
.tabs-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 8px; margin-bottom: 24px; }
.group + .group { margin-top: var(--block); }
.group h2 { margin-bottom: 24px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: var(--block); }
.pager a { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 96px; padding: 20px; border-radius: 12px; background: var(--card); text-decoration: none; }
.pager strong { font-weight: 300; font-size: clamp(20px, 3vw, 28px); letter-spacing: -0.02em; line-height: 1.1; }
.pager .label { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pager .next { grid-column: 2; align-items: flex-end; text-align: right; }

/* states */
.state { padding: 48px 0; max-width: 480px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.state strong { font-weight: 300; font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; }
.state p { color: var(--muted); }
.skeleton .sk { aspect-ratio: 7 / 5; border-radius: 12px; background: var(--card); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }

/* visit (sage block) */
.visit { background: var(--sage); color: var(--on-sage); padding: var(--block) 0; }
.visit-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
.visit-grid > * { min-width: 0; }
.visit-text { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.visit-text .display { font-size: clamp(40px, 7vw, 72px); }
.visit-sub { font-size: 16px; max-width: 36ch; }
.visit-sub a { white-space: nowrap; }
.visit .btn-row { margin-top: 8px; }
.visit .pill-green { background: var(--on-sage); color: var(--sage); }
.map { width: 100%; height: clamp(280px, 80vw, 420px); border-radius: 12px; overflow: hidden; background: var(--bg); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (min-width: 900px) {
  .visit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: center; }
  .map { height: auto; aspect-ratio: 5 / 4; }
}
@media (max-width: 399px) { .visit .btn-row { display: grid; width: 100%; } }

/* footer: всё по центральной оси */
.foot-brand { display: block; }
.foot { background: var(--foot); color: var(--on-foot); padding: var(--block) 0 calc(32px + env(safe-area-inset-bottom)); }
/* логотип слева, колонки справа, строка с примечанием внизу через всю ширину */
.foot-inner { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .foot-inner { grid-template-columns: auto minmax(0, 1fr); column-gap: 64px; row-gap: 48px; } }
/* светлый логотип на прозрачном фоне (img/logo-light.png из logo.jpeg): без фильтров и наложения, поэтому анимация появления не даёт чёрной подложки */
.foot-logo { width: clamp(104px, 11vw, 144px); height: auto; }
.foot-grid { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 15px; }
.foot-col .label { opacity: .7; margin-bottom: 4px; }
.foot-col a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.foot-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot-note { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--on-foot) 20%, transparent); font-size: 13px; opacity: .7; }

/* 404 */
.notfound { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 24px; padding-bottom: var(--block); }
.notfound .label { color: var(--muted); }
.nf-text { font-size: 17px; max-width: 46ch; color: var(--muted); }
.notfound .btn-row { margin-top: 8px; }
@media (max-width: 399px) { .notfound .btn-row { display: grid; width: 100%; } }
.nf-picks .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 599px) { .nf-picks .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } .nf-picks .tile-name { font-size: 12px; } }

/* позиция без фото: типографская карточка того же размера */
.dish-type { display: flex; align-items: flex-end; padding: 20px; background: var(--card); }
.dish-type-name { font-weight: 300; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: anywhere; }
@media (max-width: 599px) { .dish-type { padding: 14px; } .dish-type-name { font-size: 17px; } }

/* разделы без фото: таблицы цен */
.panels { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 840px) { .panels.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.panel { background: var(--card); border-radius: 12px; padding: 8px 24px; }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: baseline; gap: 16px; padding: 14px 0; }
.panel.sized .prow { grid-template-columns: minmax(0, 1fr) 72px 72px 36px; }
.phead { padding: 16px 0 4px; font-size: 12px; font-weight: 500; letter-spacing: 0.06em; color: var(--muted); }
.phead span { text-align: right; }
.pname { font-size: 14px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; }
.pname .note { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; margin-top: 2px; }
.pcell { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pspan { grid-column: 2 / 4; }
.muted-dash { color: var(--muted); }
@media (max-width: 599px) {
  .panel { padding: 4px 16px; }
  .panel.sized .prow { grid-template-columns: minmax(0, 1fr) 56px 56px 36px; gap: 8px; }
  .prow { gap: 8px; }
  .pname { font-size: 13px; }
  .pcell { font-size: 14px; }
}
.cards + .panels { margin-top: 40px; }

/* контакты: одна шалфейная композиция сразу под шапкой */
.page-contacts { display: flex; flex-direction: column; }
.visit-page { flex: 1; display: flex; align-items: center; padding: 48px 0 var(--block); }
@media (min-width: 900px) { .visit-page { min-height: calc(100vh - 64px); padding: 64px 0; } }
.visit-page .display { font-size: clamp(40px, 5.4vw, 76px); }

/* ---------- движение ----------
   Одна кривая --ease. Блоки .reveal всплывают по очереди при попадании в экран (app.js ставит --d),
   заголовки .display выезжают построчно из-под маски, строки таблиц идут лесенкой.
   По просьбе владельца анимации не отключаются при prefers-reduced-motion. */
.reveal {
  --delay: calc(var(--base, 0ms) + var(--d, 0ms) * var(--k, 1));
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease var(--delay), transform .7s var(--ease) var(--delay);
}
.reveal.in { opacity: 1; transform: none; }
.quick { --k: .4; }
.quick .reveal { transform: translateY(10px); transition-duration: .35s, .4s; }

/* заголовки построчно */
.reveal.lines { opacity: 1; transform: none; }
.lines .ln { display: block; overflow: hidden; padding: .08em 0 .22em; margin: -.08em 0 -.22em; }
.lines .ln > span { display: block; transform: translateY(110%); transition: transform .9s var(--ease) calc(var(--delay) + var(--i) * 90ms); }
.lines.in .ln > span { transform: none; }

/* карта раскрывается шторкой снизу вверх */
.reveal.reveal-mask { opacity: 1; transform: none; clip-path: inset(100% 0 0 0 round 12px); transition: clip-path 1.1s var(--ease) var(--delay); }
.reveal.reveal-mask.in { clip-path: inset(0 0 0 0 round 12px); }

/* главная: фото раскрываются по очереди, текст идёт следом */
.hero { --base: 350ms; }
.hero-photos img { animation: photo-in 1.4s var(--ease) both; }
.hero-photos img:nth-child(2) { animation-delay: .12s; }
.hero-photos img:nth-child(3) { animation-delay: .24s; }
@keyframes photo-in { from { clip-path: inset(100% 0 0 0); transform: scale(1.14); } to { clip-path: inset(0 0 0 0); transform: none; } }

/* строки таблиц цен лесенкой после появления панели */
.panel .prow { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .5s var(--ease); transition-delay: calc(var(--delay, 0ms) + 120ms + var(--i, 0) * 35ms); }
.panel.in .prow { opacity: 1; transform: none; }

/* точка под активной вкладкой переезжает */
.tab-dot { position: absolute; left: 0; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: 0; pointer-events: none; transform: translateX(var(--x, 0px)); transition: transform .5s var(--ease), opacity .2s ease; }
.tab-dot.on { opacity: 1; }
#chips .tab-dot { view-transition-name: tab-dot; }
.tabs a, .tabs button { transition: color .25s ease, opacity .25s ease; }

/* витрина: старые карточки уходят, новые приходят */
.cards-row.out > .reveal { opacity: 0; transform: translateY(-12px); transition: opacity .18s ease, transform .18s ease; }

/* переходы между страницами: шапка стоит, содержимое наплывает */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }
::view-transition-group(tab-dot) { animation-duration: .5s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* отклик на нажатие и наведение */
.pill { position: relative; isolation: isolate; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s ease, color .2s ease; }
.pill::before { content: ""; position: absolute; inset: 0; z-index: -1; background: currentColor; opacity: 0; transition: opacity .2s ease; }
.pill:active { transform: scale(.97); }
.pill .ic, .link .ic, .tile-count .ic, .pager .ic, .foot-col a .ic { transition: transform .3s var(--ease); }
.arrow { transition: transform .2s var(--ease), opacity .2s ease; }
.arrow:not(:disabled):active { transform: scale(.92); }
.pager a { transition: background-color .25s ease, transform .2s var(--ease); }
.pager a:active { transform: scale(.98); }
.nav a::after, .nav-fav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 7px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a[aria-current="page"]::after, .nav-fav[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) {
  .pill:hover::before { opacity: .12; }
  .pill:hover .ic, .link:hover .ic, .tile:hover .tile-count .ic, .foot-col a:hover .ic, .pager .next:hover .ic { transform: translateX(3px); }
  .pager .prev:hover .ic, .back:hover .ic { transform: translateX(-3px); }
  .arrow:not(:disabled):hover { transform: scale(1.06); }
  .pager a:hover { background: color-mix(in srgb, var(--card) 85%, var(--ink)); }
  .nav a:hover::after, .nav-fav:hover::after { transform: scaleX(1); transform-origin: left; }
  .tabs a:hover, .tabs button:hover { color: var(--ink); opacity: 1; }
}

/* ---------- обране ---------- */
.fav { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--bg); color: var(--ink); cursor: pointer; transition: transform .2s var(--ease), color .2s ease; }
.fav .ic { width: 18px; height: 18px; }
.fav .ic-on, .fav[aria-pressed="true"] .ic-off { display: none; }
.fav[aria-pressed="true"] .ic-on { display: block; }
.fav[aria-pressed="true"] { color: var(--green); }
.fav:active { transform: scale(.9); }
.fav.pop .ic-on { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.3); } }
.dish-photo .fav { position: absolute; top: 8px; right: 8px; z-index: 1; }
/* кнопка не раздувает строку: отрицательные поля по вертикали, центр по строке */
.prow .fav { width: 36px; height: 36px; margin: -8px 0; align-self: center; background: none; }
.leaving { opacity: 0 !important; transform: scale(.96) !important; transition: opacity .25s ease, transform .25s ease !important; }

.nav-fav { display: inline-flex; align-items: center; gap: 6px; }
.nav-fav .ic { width: 16px; height: 16px; }
.fav-n { font-variant-numeric: tabular-nums; }
.fav-n:empty { display: none; }
.fav-n.bump { display: inline-block; animation: pop .45s var(--ease); }
@media (max-width: 767px) { .nav-fav-text { display: none; } .nav-fav .ic { width: 18px; height: 18px; } }

#favRoot .state { padding-top: 0; }
.fav-picks { margin-top: var(--block); }
.fav-picks h2 { margin-bottom: 24px; }
/* полоса итога: слева сколько позиций и очистка, справа сумма */
.fav-head { margin-bottom: 24px; }
.fav-head .label { margin-bottom: 12px; color: var(--muted); }
.fav-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-radius: 12px; background: var(--card); }
.fav-bar[hidden], .fav-note[hidden] { display: none; }
.fav-bar-left { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.fav-count { font-size: 16px; font-weight: 500; }
.fav-clear { width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: inline-grid; place-items: center; background: none; color: var(--muted); cursor: pointer; transition: color .2s ease, background-color .2s ease, transform .2s var(--ease); }
.fav-clear .ic { width: 20px; height: 20px; }
.fav-clear:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.fav-clear:active { transform: scale(.92); }
.fav-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.fav-total .label { color: var(--muted); }
.fav-total strong { font-weight: 300; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fav-note { margin: 12px 0 32px; }
@media (max-width: 599px) { .fav-bar { padding: 12px 16px; } }
/* сетка обраного: три в ряд на широком экране */
@media (min-width: 1024px) { .fav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* выбор объёма на карточке напитка */
.size-pick { display: flex; gap: 8px; }
.size-pick button { flex: 1; min-width: 0; height: 36px; padding: 0 8px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.size-pick button[aria-pressed="true"] { background: var(--green); color: var(--on-green); box-shadow: none; }
@media (max-width: 399px) { .size-pick { flex-direction: column; } }

/* ---------- «Обране»: 5 варіантів блоку «Разом» (тимчасовий перемикач) ---------- */
.variant-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 13px; color: var(--muted); }
.variant-switch button { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent); font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.variant-switch button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

.fav-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.fav-inline[hidden], .fav-receipt[hidden] { display: none; }
body:not([data-v="1"]):not([data-v="2"]) .fav-bar { display: none; }
body:not([data-v="5"]) .fav-inline { display: none; }
body:not([data-v="3"]):not([data-v="4"]) .fav-receipt { display: none; }
body[data-v="3"] .fav-note, body[data-v="4"] .fav-note { display: none; }
body[data-v="3"] .fav-head, body[data-v="4"] .fav-head { margin-bottom: 32px; }

/* 2: панель прилипає до низу екрана, як кошик */
body[data-v="2"] .fav-bar { position: fixed; left: var(--pad); right: var(--pad); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; max-width: calc(var(--wrap) - 2 * var(--pad)); margin: 0 auto; background: var(--green); color: var(--on-green); box-shadow: 0 8px 32px rgba(29, 38, 32, .22); }
body[data-v="2"] .fav-bar .label, body[data-v="2"] .fav-bar .fav-clear { color: inherit; opacity: .75; }
body[data-v="2"] main { padding-bottom: 128px; }

/* 3 і 4: чек; 3 праворуч і прилипає на широкому екрані, 4 під сіткою */
.fav-receipt { background: var(--card); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.fav-receipt .label { color: var(--muted); }
.receipt-rows { list-style: none; margin: 0; padding: 0; }
.receipt-rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent); font-size: 14px; }
.receipt-rows small { color: var(--muted); font-size: 12px; }
.receipt-rows b { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 4px; font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.receipt-total strong { font-weight: 300; font-size: 36px; letter-spacing: -0.03em; text-transform: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fav-receipt .fav-clear { align-self: flex-start; }
body[data-v="4"] .fav-receipt { margin-top: var(--block); max-width: 560px; }
body[data-v="3"] .fav-receipt { margin-top: var(--block); }
@media (min-width: 1024px) {
  body[data-v="3"] .fav-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  body[data-v="3"] .fav-receipt { margin-top: 0; position: sticky; top: 24px; }
  body[data-v="3"] .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 5: сума велика в рядку із заголовком */
.fav-inline { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.fav-inline .label { color: var(--muted); }
.fav-big { font-weight: 300; font-size: clamp(44px, 7vw, 80px); line-height: .98; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fav-inline p { font-size: 15px; }
@media (max-width: 599px) { .fav-inline { align-items: flex-start; text-align: left; } }

/* временные фото и карточка с двумя объёмами */
.sample-note a { color: inherit; text-underline-offset: 3px; }
.dish-sizes { display: flex; flex-wrap: wrap; gap: 0 12px; }
.fav-inline-row { display: flex; align-items: center; gap: 8px; }
@media (max-width: 767px) { .variant-switch { display: none; } }
