/* EGUN — menu on the Ağ Şəhər v3 design: photo-first cards, terracotta-rim plates, palette and type from egun.az */
:root {
  --paper: #f6f1e9;     /* chalk, as on egun.az */
  --card: #fffdf9;
  --ink: #1f1714;
  --ink-2: #4a3d37;
  --muted: #6e5e55;
  --line: #e8e0d3;      /* stone */
  --brand: #6b3427;     /* brick: titles, dark buttons */
  --on-brand: #ffffff;
  --accent: #a45e4d;    /* terracotta: add buttons, active chips */
  --accent-2: #8a4a3a;  /* accent as text/icon colour */
  --accent-hover: #8a4a3a;
  --tint: #f6e4d9;      /* pale apricot */
  --track: color-mix(in srgb, var(--line) 70%, var(--paper));
  --ok: #2fa36b;
  --ok-ink: #1f7a4d;     /* status text on white: AA */
  --danger-ink: #b8463a;
  --danger: #d0574a;
  --shadow: 0 1px 2px rgba(22, 26, 34, .04), 0 8px 24px rgba(107, 52, 39, .07);
  --shadow-lift: 0 2px 4px rgba(22, 26, 34, .06), 0 12px 28px rgba(107, 52, 39, .12);
  --font: 'Geologica', system-ui, sans-serif;
  --font-display: 'Piazzolla', Georgia, serif;  /* headings, as on egun.az */
  --r: 20px;
  --nav-h: 64px;
  --maxw: 760px;        /* ширина колонки; растёт на больших экранах */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
:root[data-theme='dark'] {
  --paper: #1a1310;
  --card: #261c18;
  --ink: #f6f1e9;
  --ink-2: #dccfc3;
  --muted: #a8958a;
  --line: #3b2d27;
  --brand: #f6f1e9;
  --on-brand: #2a1a14;
  --accent: #a45e4d;
  --accent-2: #f0b49b;
  --accent-hover: #8a4a3a;
  --tint: #3a2620;
  --ok-ink: #2fa36b;
  --danger-ink: #e07468;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); }
html.locked { overflow: hidden; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--paper);
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-x: clip; font-variant-numeric: tabular-nums;
  transition: background .3s, color .3s;
  display: flex; flex-direction: column;
}
#menu { flex: 1 0 auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a, button, input { touch-action: manipulation; }
img { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
[role=dialog]:focus { outline: none; }
.icon { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.emo { display: block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--accent-2); }
.badge.new .emo { color: inherit; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter-l); }
@media (min-width: 900px) { :root { --maxw: 940px; --gutter-l: 24px; --gutter-r: 24px; } }
@media (min-width: 1280px) { :root { --maxw: 1120px; } }
.sicon { display: block; width: 1em; height: 1em; background: currentColor; -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); }
.logo img { width: 34px; height: auto; }
.brand-text { min-width: 0; display: flex; flex-direction: column; }
.brand-text h1 { font: 700 18px/1.15 var(--font-display); color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { flex: none; display: flex; align-items: center; gap: 8px; }
.round { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); font-size: 18px; color: var(--ink); }
.round.sm { width: 40px; height: 40px; font-size: 17px; }
/* язык: кнопка с текущим языком и выпадающий список */
.lang { position: relative; z-index: 35; }
.lang-btn { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 12px 0 11px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); transition: background .2s; }
.lang-btn .globe { font-size: 18px; color: var(--accent-2); }
.lang-btn .code { font: 700 12px var(--font); letter-spacing: .06em; text-transform: uppercase; }
.lang-btn .caret { font-size: 14px; color: var(--muted); transform: rotate(90deg); transition: transform .25s; }
.lang-btn[aria-expanded="true"] .caret { transform: rotate(-90deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; padding: 6px; border-radius: 18px;
  background: var(--card); box-shadow: 0 2px 6px rgba(22, 26, 34, .08), 0 16px 34px rgba(107, 52, 39, .16);
  animation: menu-in .2s cubic-bezier(.25, 1, .5, 1) both;
}
.lang-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 13px;
  font: 600 14px var(--font); color: var(--ink-2); text-align: left; transition: background .2s, color .2s;
}
.lang-menu button .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-menu button .icon { font-size: 16px; color: var(--accent-2); opacity: 0; }
.lang-menu button[aria-checked="true"] { background: var(--tint); color: var(--brand); }
.lang-menu button[aria-checked="true"] .icon { opacity: 1; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 374px) {
  .brand-text small { display: none; }
  .logo { width: 40px; height: 40px; }
  .logo img { width: 30px; }
  .lang-btn { height: 38px; padding: 0 10px 0 9px; gap: 5px; }
  .round { width: 38px; height: 38px; }
}

/* ---------- hero: greeting + the plate of the moment ---------- */
.hero { position: relative; overflow: hidden; border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.hero-main { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 158px; padding: 20px 150px 18px 20px; }
.hello { font: 700 clamp(22px, 6vw, 34px)/1.15 var(--font-display); color: var(--brand); letter-spacing: -.01em; }
.status { margin: 14px 0 0; font-size: 13px; font-weight: 400; color: var(--muted); }
.status b { font-weight: 700; color: var(--ok-ink); }
.status.closed b { color: var(--danger-ink); }
/* terracotta-rim plate, cropped by the card edge like a plate at the end of the table */
.plate {
  position: absolute; top: -14px; right: -30px; width: 172px; height: 172px; border-radius: 50%;
  background: #fff; box-shadow: 0 10px 30px rgba(107, 52, 39, .16), inset 0 0 0 1px rgba(107, 52, 39, .06);
  animation: plate-in .9s cubic-bezier(.2, .8, .2, 1) both;
}
.plate .rim-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.rim-art .r1 { fill: none; stroke: #a45e4d; stroke-width: 2; }
.rim-art .r2 { fill: none; stroke: #a45e4d; stroke-width: 1; opacity: .5; }
.rim-art .dots { fill: none; stroke: #a45e4d; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 0 11.3; }
.rim-art .leaves { fill: none; stroke: #a45e4d; stroke-width: 1.3; stroke-dasharray: 6 5.3; opacity: .7; }
/* the dish photo is cropped to a circle; known photos are positioned so their own plate sits dead centre */
.plate-food { position: absolute; inset: 27px; overflow: hidden; border-radius: 50%; background: #f1ede6; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .18); }
.plate-food img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.plate-food img.fit { inset: auto; height: auto; }
@media (min-width: 480px) {
  .hero-main { min-height: 190px; padding: 26px 210px 22px 26px; }
  .plate { width: 220px; height: 220px; top: -20px; right: -24px; }
  .plate-food { inset: 34px; }
}
@media (min-width: 900px) {
  .brand-text h1 { font-size: 21px; }
  .logo { width: 52px; height: 52px; }
  .logo img { width: 38px; }
  .hero-main { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 250px; padding: 34px 320px 34px 32px; }
  .plate { width: 290px; height: 290px; top: -26px; right: -30px; }
  .plate-food { inset: 44px; }
  .suggest { padding: 16px 20px; }
  .suggest b { font-size: 17px; }
  .ttl { font-size: 26px; }
  .section h2 { font-size: 26px; }
  .fav { width: 260px; }
}
@media (max-width: 329px) {
  .plate { display: none; }
  .hero-main { min-height: 0; padding-right: 20px; }
  .suggest b { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 374px) and (min-width: 330px) {
  .hero-main { padding-right: 124px; }
  .plate { width: 150px; height: 150px; right: -34px; }
  .plate-food { inset: 24px; }
}
.suggest {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 12px 16px; text-align: left;
  border-top: 1px dashed var(--line); transition: background .2s;
}
.suggest .s-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); }
.suggest .s-ico { color: var(--accent-2); font-size: 20px; }
.suggest .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.suggest small { font-size: 12px; font-weight: 600; color: var(--accent-2); }
.suggest b { font: 600 15px/1.25 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: 16px; transition: transform .2s; }


/* ---------- section titles ---------- */
.ttl { display: flex; align-items: center; gap: 8px; font: 700 22px/1.2 var(--font-display); color: var(--brand); }
.ttl .emo { width: 24px; height: 24px; }

/* ---------- favourites carousel ---------- */
.favs { margin-top: 26px; }
.favs .ttl { width: 100%; max-width: var(--maxw); margin: 0 auto 10px; padding: 0 var(--gutter-r) 0 var(--gutter-l); }
/* стрелки у ленты — только там, где есть мышь: пальцем лента листается смахиванием */
.rail-wrap { position: relative; }
.rail-nav { display: none; }
.rail-nav button {
  position: absolute; top: var(--arrow-y, 50%); z-index: 5; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); color: var(--brand); font-size: 18px;
  box-shadow: 0 2px 6px rgba(22, 26, 34, .1), 0 10px 24px rgba(107, 52, 39, .18);
  transition: background .2s, opacity .25s, transform .15s;
}
.rail-nav button:disabled { opacity: 0; pointer-events: none; }
.rail-nav button:not(:disabled):active { transform: translateY(-50%) scale(.92); }
.rail-nav .prev .icon { transform: rotate(180deg); }
/* стрелка стоит у края колонки — сразу за последней видимой карточкой */
.favs .rail-nav .prev { left: calc(max(var(--gutter-l), (100% - var(--maxw)) / 2 + var(--gutter-l)) + 6px); }
.favs .rail-nav .next { right: calc(max(var(--gutter-r), (100% - var(--maxw)) / 2 + var(--gutter-r)) + 6px); }
.pairs .rail-nav button { width: 34px; height: 34px; font-size: 15px; }
.pairs .rail-nav .prev { left: 26px; }
.pairs .rail-nav .next { right: 26px; }
@media (hover: hover) and (pointer: fine) { .rail-nav { display: block; } }
@media (max-width: 599px) { .rail-nav { display: none; } }
.rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 4px max(var(--gutter-r), calc((100% - var(--maxw)) / 2 + var(--gutter-r))) 14px max(var(--gutter-l), calc((100% - var(--maxw)) / 2 + var(--gutter-l)));
  scroll-padding: 0 max(var(--gutter-l), calc((100% - var(--maxw)) / 2 + var(--gutter-l)));
}
.rail::-webkit-scrollbar { display: none; }
.fav { position: relative; flex: none; width: 236px; scroll-snap-align: start; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.fav .ph { aspect-ratio: 4 / 3; border-radius: var(--r) var(--r) 0 0; }
.fav .fbody { padding: 10px 12px 12px; }
.fav h3 { font: 600 15px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav .price { margin-top: 2px; font: 700 15px var(--font); color: var(--brand); }

/* ---------- filters ---------- */
.filters {
  display: flex; gap: 18px; margin: 18px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding: 0 var(--gutter-r) 0 var(--gutter-l);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.filters::-webkit-scrollbar { display: none; }
/* plain icon + label, no pill; the pressed one is underlined in terracotta */
.filters button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--ink-2);
  text-decoration: underline 2px transparent; text-underline-offset: 6px; transition: color .2s, text-decoration-color .2s;
}
.filters button .emo { width: 18px; height: 18px; }
.filters-wrap { position: relative; }
.more-r .filters { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 20px)); mask-image: linear-gradient(to right, #000 calc(100% - 72px), transparent calc(100% - 20px)); }
.filters-more {
  position: absolute; right: 0; bottom: 0; width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--brand); font-size: 18px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.more-r .filters-more { opacity: 1; pointer-events: auto; animation: nudge 1.6s .8s cubic-bezier(.25, 1, .5, 1) 2; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .more-r .filters-more { animation: none; } }
.filters button[aria-pressed="true"] { color: var(--brand); text-decoration-color: var(--accent); }
.filters button[aria-pressed="true"] .emo { animation: pop .4s cubic-bezier(.25, 1, .5, 1); }

/* ---------- sticky nav ---------- */
.catnav { position: sticky; top: 0; z-index: 30; margin-top: 10px; padding: 8px 0 8px; background: color-mix(in srgb, var(--paper) 72%, transparent); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); transition: box-shadow .3s; }
.catnav.stuck { box-shadow: 0 .5px 0 color-mix(in srgb, var(--ink) 12%, transparent), 0 6px 16px rgba(107, 52, 39, .07); }
.navrow { display: flex; align-items: center; gap: 8px; }
.nav2 { margin-top: 8px; }

/* first screen on a phone: header, hero, favourites, filters and both nav rows fit above the fold.
   The favourite photo absorbs the leftover height (--fold = everything else); short screens also tighten spacing. */
@media (max-width: 599px) {
  .favs { --fold: 616px; --fh: clamp(80px, calc(100vh - var(--fold)), 177px); --fh: clamp(80px, calc(100svh - var(--fold)), 177px); }
  .fav { width: calc(var(--fh) * 4 / 3); min-width: 168px; }
  .fav .ph { aspect-ratio: auto; height: var(--fh); }
}
@media (max-width: 599px) and (max-height: 760px) {
  .topbar { padding: 8px 0 6px; }
  .hero-main { min-height: 132px; padding-top: 14px; padding-bottom: 14px; }
  .plate { width: 146px; height: 146px; }
  .plate-food { inset: 23px; }
  .status { margin-top: 8px; }
  .suggest { padding-top: 9px; padding-bottom: 9px; }
  .suggest .s-ico { width: 36px; height: 36px; }
  .favs { margin-top: 16px; --fold: 528px; }
  .favs .ttl { margin-bottom: 8px; }
  .fav .fbody { padding: 8px 12px 10px; }
  .rail { padding-bottom: 10px; }
  .filters { margin-top: 6px; }
  .catnav { margin-top: 2px; padding: 6px 0; }
  .nav2 { margin-top: 6px; }
}
@media (max-width: 599px) and (max-height: 620px) {
  .hero-main { min-height: 96px; padding-top: 12px; padding-bottom: 12px; padding-right: 116px; }
  .plate { width: 110px; height: 110px; top: -10px; right: -22px; }
  .plate-food { inset: 17px; }
  .suggest { padding-top: 7px; padding-bottom: 7px; }
  .suggest small { display: none; }
  .favs .ttl { margin-bottom: 6px; }
  .rail { padding-bottom: 8px; }
  .hello { font-size: 22px; }
  .favs { margin-top: 12px; --fold: 494px; }
  .ttl { font-size: 20px; }
  .filters { margin-top: 2px; }
  .filters button { min-height: 40px; }
}
.chips {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; margin: 0 -14px 0 -6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 20px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 4px; border-radius: 99px; background: var(--card); box-shadow: 0 1px 2px rgba(22, 26, 34, .05); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.chips button.on { background: var(--accent); color: #fff; }
.chips button.on .mini { box-shadow: 0 0 0 2px #fff; }
/* food / desserts / drinks: a segmented control above the category tabs */
.groups { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: var(--card); box-shadow: 0 1px 2px rgba(22, 26, 34, .05); }
.groups button { flex: 1 1 auto; min-width: 0; min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.groups button span { overflow: hidden; text-overflow: ellipsis; }
.groups button.on { background: var(--accent); color: #fff; }
.groups button.on .emo { color: inherit; }
.groups button:disabled { opacity: .4; }
.groups .emo { width: 16px; height: 16px; }
@media (min-width: 900px) { .groups { flex: 0 1 480px; } .navrow { justify-content: space-between; } }
@media (max-width: 399px) { .groups button { gap: 4px; padding: 0 5px; font-size: 12.5px; } }
@media (max-width: 359px) { .groups .emo { display: none; } .groups button { padding: 0 4px; } }
/* mini plate: photo with a white rim */
.mini { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--tint); box-shadow: 0 0 0 2px var(--card); }
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini .emo { width: 20px; height: 20px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 5px 0 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); animation: fadein .25s both; }
.search:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
.search .lens { font-size: 17px; color: var(--accent-2); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: 400 16px var(--font); color: var(--ink); caret-color: var(--accent-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--muted); }
.search button { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); font-size: 14px; }
.search button::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; }

/* ---------- menu ---------- */
.menu { padding-top: 4px; padding-bottom: 30px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 0; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--tint); color: var(--accent-2); font-size: 13px; font-weight: 600; }
.result-bar button { flex: none; padding: 7px 14px; border-radius: 99px; background: var(--card); color: var(--ink); font-size: 13px; font-weight: 600; }
.group-title { display: flex; align-items: center; gap: 10px; margin: 34px 2px 0; font: 600 12px var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); }
.group-title .emo { width: 22px; height: 22px; }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.menu > .group-title:first-child { margin-top: 18px; }
.section { scroll-margin-top: calc(var(--nav-h) + 8px); padding-top: 22px; }
.section h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 2px 12px; font: 700 22px/1.2 var(--font-display); color: var(--brand); overflow-wrap: anywhere; }
.section h2 small { font: 400 13px var(--font); color: var(--muted); white-space: nowrap; }

/* photo grid (the family-table card) */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; }
.ph { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: var(--r); background: var(--tint); }
.ph > img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
/* no photo: a porcelain saucer with the dish's initial */
.ph .saucer { position: absolute; inset: 0; display: grid; place-items: center; }
.saucer svg { width: 64%; height: auto; }
.saucer .s-out { fill: var(--card); stroke: var(--accent); stroke-width: 1.5; opacity: .9; }
.saucer .s-dots { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0 8.4; opacity: .55; }
.saucer .s-in { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .4; }
.saucer text { fill: var(--accent-2); font: 700 30px var(--font-display); }
.card .cbody { flex: 1; display: flex; flex-direction: column; padding: 10px 2px 0; }
.card .price { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font: 700 15px var(--font); color: var(--ink); }
.card h3 { font: 600 15px/1.3 var(--font); overflow-wrap: anywhere; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card p { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.marks { display: inline-flex; gap: 3px; }
.marks .emo { width: 17px; height: 17px; }
/* the name button covers the whole card: one big tap target */
.open { font: inherit; color: inherit; text-align: left; }
.open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.open:focus-visible { outline: none; }
.open:focus-visible::after { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.badge {
  position: absolute; top: 7px; left: 7px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 14px);
  padding: 3px 8px 3px 5px; border-radius: 99px; color: #6b3427; font: 600 11px/1.2 var(--font);
  /* iOS-style frosted glass: translucent, blurred and saturated backdrop, hairline light rim */
  background: rgba(255, 255, 255, .58); backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 1px 4px rgba(0, 0, 0, .1);
}
.badge span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge .emo { width: 13px; height: 13px; }
.badge.new { background: rgba(164, 94, 77, .7); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .35), 0 1px 4px rgba(0, 0, 0, .12); }

/* add / quantity control tucked into the photo's bottom-right corner (the photo's radius rounds its outer corner) */
.ctrl { position: absolute; right: 0; bottom: 0; z-index: 2; }
.add {
  width: 36px; height: 36px; border-radius: 13px 0 0 0; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 17px;
  transition: transform .15s, background .2s;
}
.add .icon { stroke-width: 2.4; }
.ctrl .add { position: relative; }
.ctrl .add::before { content: ''; position: absolute; inset: -8px 0 0 -8px; }
.add:active { background: var(--accent-hover); }
/* over a photo the control turns to frosted glass so the dish stays visible through it */
.ph .ctrl .add { background: color-mix(in srgb, var(--card) 62%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--accent-2); }
.ph .ctrl .add:active { background: color-mix(in srgb, var(--card) 85%, transparent); }
.ph .ctrl .qty { background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.qty { display: flex; align-items: center; height: 36px; padding: 0 2px; border-radius: 13px 0 0 0; background: var(--card); color: var(--ink); animation: qty-in .25s cubic-bezier(.25, 1, .5, 1); transform-origin: right bottom; }
.qty button { position: relative; width: 32px; height: 36px; display: grid; place-items: center; font-size: 15px; color: var(--accent-2); }
.qty button .icon { stroke-width: 2.4; }
.qty output { min-width: 16px; text-align: center; font: 700 15px var(--font); }
.card.flash .ph, .fav.flash .ph { animation: flash .6s; }

/* text list for categories without photos */
.list { padding: 4px 16px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; padding: 4px 22px; }
  .list .row + .row { border-top: 1px dashed var(--line); }
  .list .row:nth-child(2) { border-top: 0; }   /* первая строка второй колонки */
}
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 0; }
.row + .row { border-top: 1px dashed var(--line); }
.row .rtext { flex: 1; min-width: 0; }
.row h3 { display: flex; align-items: center; gap: 6px; font: 600 15px/1.3 var(--font); overflow-wrap: anywhere; }
.row h3 .open::after { border-radius: 12px; inset: 0 -8px; }
.row p { margin-top: 2px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row .rprice { flex: none; font: 700 15px var(--font); white-space: nowrap; }
.row .ctrl { position: relative; right: auto; bottom: auto; flex: none; }
.row .add { width: 36px; height: 36px; border-radius: 12px; font-size: 17px; }
.row .add:active { transform: scale(.9); }
.row .qty { height: 36px; border-radius: 12px; background: var(--tint); }
.row .qty button { height: 36px; width: 32px; }
.row.flash { animation: flash-row .6s; }
.empty-search { text-align: center; color: var(--muted); padding: 40px 0; }
.empty-search b { display: block; font: 600 18px var(--font); color: var(--ink); margin-bottom: 4px; }
.empty-search button { margin-top: 16px; }

/* ---------- sheets ---------- */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(31, 23, 20, .5); opacity: 0; pointer-events: none; transition: opacity .3s; }
.backdrop.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 51; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; overscroll-behavior: contain;
  transform: translate(-50%, 105%); visibility: hidden; transition: transform .4s cubic-bezier(.2, .9, .3, 1), visibility 0s .4s;
  background: var(--card); border-radius: 28px 28px 0 0;
}
.sheet.on { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
@media (min-width: 900px) {
  .sheet {
    top: 50%; bottom: auto; max-height: 86vh; border-radius: 28px;
    transform: translate(-50%, calc(-50% + 24px)); opacity: 0; transition: transform .3s cubic-bezier(.2, .9, .3, 1), opacity .25s, visibility 0s .3s;
  }
  .sheet.on { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .handle { display: none; }
  .sheet-photo { margin-top: 16px; }
  .sheet-body { padding-top: 20px; }
  .buy, .cats-body, .legal-body, .cart-empty { padding-bottom: 20px; }
  .cats-body .plates { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sheet { max-width: 620px; }
}
.sheet .handle { width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: var(--line); }
.sheet .close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--track); color: var(--ink); font-size: 17px; }
.sheet .close.on-photo { background: rgba(255, 255, 255, .58); color: #161a22; backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .12); }
.sheet-photo { margin: 12px 12px 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper); }
.sheet-photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet-body { padding: 16px 20px 18px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tagrow span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 6px; border-radius: 99px; background: var(--tint); color: var(--accent-2); font-size: 12px; font-weight: 600; }
.tagrow .emo { width: 16px; height: 16px; }
.sheet-body h2 { font: 700 24px/1.2 var(--font-display); color: var(--brand); padding-right: 40px; overflow-wrap: anywhere; hyphens: auto; }
.sheet-photo + .sheet-body h2 { padding-right: 0; }
.sheet-body .price-lg { margin-top: 6px; font: 700 20px var(--font); }
.sheet-body .desc { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.sheet-body .cat { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--paper); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.sheet-body .cat .mini { width: 24px; height: 24px; box-shadow: none; }
.sheet-body .cat .mini .emo { width: 16px; height: 16px; }
.pairs { padding: 4px 0 18px; border-top: 1px dashed var(--line); }
.pairs h3 { padding: 14px 20px 10px; font: 700 15px var(--font); color: var(--brand); }
.pairs .rail { padding: 2px 20px 6px; scroll-padding: 0 20px; gap: 10px; }
.pair { position: relative; flex: none; width: 128px; scroll-snap-align: start; }
.pair .ph { aspect-ratio: 1; border-radius: 16px; }
.pair .add { width: 30px; height: 30px; border-radius: 11px 0 0 0; font-size: 14px; }
.pair .ctrl .add::before { inset: -14px 0 0 -14px; }
.pair .qty { height: 30px; border-radius: 11px 0 0 0; }
.pair .qty button { width: 26px; height: 30px; font-size: 13px; }
.pair h4 { margin-top: 6px; font: 600 13px/1.3 var(--font); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pair .price { font: 700 13px var(--font); color: var(--muted); }
.pair .open::after { border-radius: 16px; }
.buy { display: flex; gap: 10px; padding: 14px 20px calc(20px + var(--safe-bottom)); border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 4; background: var(--card); }
.stepper { flex: none; display: flex; align-items: center; height: 50px; border-radius: 99px; background: var(--paper); }
.stepper button { width: 44px; height: 50px; border-radius: 99px; display: grid; place-items: center; font-size: 18px; color: var(--ink); }
.stepper button .icon { stroke-width: 2.2; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 26px; text-align: center; font: 700 16px var(--font); }
.stepper.sm { height: 36px; }
.stepper.sm button { width: 34px; height: 36px; font-size: 15px; }
.stepper.sm output { font-size: 14px; min-width: 20px; }
.btn { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 50px; padding: 0 20px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 15px var(--font); transition: background .2s, color .2s, box-shadow .2s; }
.btn .lbl { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn .price { flex: none; white-space: nowrap; }
.btn.dark { background: var(--brand); color: var(--on-brand); justify-content: center; }
.btn.ghost { background: var(--paper); color: var(--ink); justify-content: center; }
.btn.inline { display: inline-flex; flex: none; padding: 0 26px; }
@media (max-width: 374px) {
  .buy { gap: 8px; padding-left: 14px; padding-right: 14px; }
  .buy .stepper button { width: 38px; }
  .buy .btn { padding: 0 14px; font-size: 14px; }
}


/* cart sheet */
.cart-head { padding: 16px 70px 6px 20px; }
.cart-head h2 { color: var(--brand); font: 700 24px/1.2 var(--font-display); }
.cart-head p { color: var(--muted); font-size: 13px; }
.lines { list-style: none; padding: 6px 20px; }
.line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line .lph { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--tint); display: grid; place-items: center; font: 700 20px var(--font-display); color: var(--accent-2); box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.line .lph img { width: 100%; height: 100%; object-fit: cover; }
.line .line-text { min-width: 0; }
.line h3 { font: 600 15px/1.3 var(--font); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.line .unit { font-size: 12px; color: var(--muted); }
.line .r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line .sum { font: 700 15px var(--font); white-space: nowrap; }
@media (max-width: 359px) { .lines { padding: 6px 14px; } .line { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; } .line .lph { width: 40px; height: 40px; } }
.totals { margin: 10px 20px 0; padding: 14px 16px; border-radius: 18px; background: var(--paper); font-size: 14px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ink-2); }
.totals > div span:last-child { white-space: nowrap; }
.totals .grand { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); font: 700 19px var(--font); color: var(--brand); }
.cart-actions { display: flex; gap: 10px; padding: 16px 20px calc(22px + var(--safe-bottom)); }
.cart-actions .btn { padding: 0 14px; }
.not-order { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.not-order b { color: var(--ink); font-weight: 700; }
.cart-empty { text-align: center; padding: 26px 20px calc(34px + var(--safe-bottom)); }
.cart-empty h2 { font: 700 22px/1.2 var(--font-display); }
.cart-empty p { color: var(--muted); font-size: 14px; margin: 4px 0 18px; text-wrap: balance; }
/* empty cart: an empty plate; fork and spoon take turns tapping */
.plate-ill { display: block; width: 150px; height: auto; margin: 4px auto 14px; overflow: visible; }
.plate-ill .rim { fill: var(--card); stroke: var(--brand); stroke-width: 3; }
.plate-ill .well { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; opacity: .8; }
.plate-ill .shine { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: .6; }
.plate-ill .tool { fill: none; stroke: var(--brand); stroke-width: 6; stroke-linecap: round; }
.plate-ill .tool-head { fill: var(--card); stroke: var(--brand); stroke-width: 3; stroke-linejoin: round; }
.plate-ill .tines { stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; }
.plate-ill .shadow { fill: color-mix(in srgb, var(--brand) 10%, transparent); }
.plate-ill .fork { transform-box: view-box; transform-origin: 30px 126px; animation: fork-tap 2.6s ease-in-out infinite; }
.plate-ill .spoon { transform-box: view-box; transform-origin: 170px 126px; animation: spoon-tap 2.6s ease-in-out infinite; }
.plate-ill .spark { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; transform-box: view-box; transform-origin: 100px 7px; animation: twinkle 1.6s ease-in-out infinite; }

/* ---------- floating cart bar ---------- */
.cartbar {
  position: fixed; left: 50%; bottom: calc(14px + var(--safe-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); max-width: 528px; height: 58px; padding: 0 8px 0 10px; border-radius: 20px;
  background: color-mix(in srgb, var(--brand) 80%, transparent); color: var(--on-brand); text-align: left;
  backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22), 0 12px 30px rgba(107, 52, 39, .28);
  transform: translate(-50%, 150%); visibility: hidden; transition: transform .4s cubic-bezier(.25, 1, .5, 1), visibility 0s .4s;
}
.cartbar.on { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }
.cartbar.bump { animation: bump .45s; }
/* categories sheet: a table of plates */
.cats-head { padding: 16px 70px 0 20px; }
.cats-head h2 { font: 700 24px/1.2 var(--font-display); color: var(--brand); }
.cats-body { padding: 0 14px calc(24px + var(--safe-bottom)); }
.cats-body .group-title { margin: 22px 6px 12px; }
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.plates button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 2px; border-radius: 16px; text-align: center; transition: background .2s; }
.plates .big { flex: none; width: 78px; height: 78px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--tint); box-shadow: 0 0 0 4px var(--card), 0 0 0 5.5px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 18px rgba(107, 52, 39, .12); transition: box-shadow .2s, transform .2s; }
.plates .big img { width: 100%; height: 100%; object-fit: cover; }
.plates .big .emo { width: 40px; height: 40px; }
.plates button.on .big { box-shadow: 0 0 0 4px var(--card), 0 0 0 6.5px var(--accent), 0 8px 18px rgba(107, 52, 39, .16); }
.plates b { font: 600 13px/1.25 var(--font); overflow-wrap: anywhere; hyphens: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plates small { margin-top: -6px; font-size: 12px; color: var(--muted); }
.plates button:active .big { transform: scale(.94); }
/* stacked plates with the item count */
.cartbar .stack { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #6b3427; font: 700 15px var(--font); box-shadow: 0 0 0 3px color-mix(in srgb, #fff 25%, transparent); }
.cartbar .stack::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 1.5px dashed rgba(164, 94, 77, .45); }
.cartbar .lbl { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartbar .total { flex: none; height: 42px; padding: 0 16px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--on-brand) 14%, transparent); font: 700 15px var(--font); white-space: nowrap; }

.toast {
  position: fixed; left: 50%; top: 16px; z-index: 80; transform: translate(-50%, -20px);
  width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 16px; background: var(--brand); color: var(--on-brand);
  font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; text-wrap: balance;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.has-action { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; pointer-events: auto; text-align: left; }
.toast button { flex: none; min-height: 36px; padding: 0 14px; border-radius: 12px; background: color-mix(in srgb, var(--on-brand) 16%, transparent); color: inherit; font: 700 13px var(--font); }
.toast span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

footer { flex: none; text-align: center; padding: 20px 16px calc(24px + var(--safe-bottom)); font-size: 13px; color: var(--muted); }
/* back to top: a barely-there glass circle, shown once the guest is well down the menu; sits above the cart bar */
.totop {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + var(--safe-bottom)); z-index: 39;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px;
  color: color-mix(in srgb, var(--brand) 75%, transparent);
  background: color-mix(in srgb, var(--card) 22%, transparent);
  backdrop-filter: blur(10px) saturate(160%); -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--ink) 14%, transparent);
  opacity: 0; transform: translateY(12px); visibility: hidden; pointer-events: none;
  transition: opacity .3s, transform .3s cubic-bezier(.25, 1, .5, 1), bottom .4s cubic-bezier(.25, 1, .5, 1), visibility 0s .3s;
}
.totop.on { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.totop:active { transform: scale(.92); }
body.cart-visible .totop { bottom: calc(14px + 58px + 10px + var(--safe-bottom)); }
body.cart-visible footer { padding-bottom: calc(100px + var(--safe-bottom)); }
.visit { max-width: 420px; margin: 0 auto 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.visit .hrs { color: var(--ink-2); font-weight: 600; }
.visit a { display: inline-block; padding: 7px 2px; }
footer .sep { margin: 0 6px; color: var(--muted); }
footer a { color: var(--ink); font-weight: 600; }
.legal-links { margin-top: 6px; }
.legal-links button { padding: 6px 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.info-body { padding: 4px 20px calc(24px + var(--safe-bottom)); }
.info-hours { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.info-hours b.is-open { color: var(--ok-ink); }
.info-hours b.is-closed { color: var(--danger-ink); }
.info-hours span { color: var(--muted); font-size: 13px; }
.info-links { list-style: none; margin-top: 12px; border-top: 1px dashed var(--line); }
.info-links a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 2px; border-bottom: 1px dashed var(--line); color: var(--ink); }
.info-links .ii { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent-2); font-size: 18px; }
.info-links .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.info-links b { font: 600 15px/1.3 var(--font); }
.info-links small { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.info-links > li > a > .icon { flex: none; color: var(--muted); font-size: 16px; }
.legal-head { padding: 16px 70px 4px 20px; }
.legal-head h2 { color: var(--brand); font: 700 24px/1.2 var(--font-display); }
.legal-body { padding: 0 20px calc(26px + var(--safe-bottom)); font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.legal-body .legal-updated { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.legal-body section { padding-top: 14px; }
.legal-body h3 { font: 700 15px/1.35 var(--font); color: var(--brand); margin-bottom: 4px; }
.legal-body p + p, .legal-body ul + p { margin-top: 6px; }
.legal-body ul { margin: 6px 0 0 18px; }
.legal-body li + li { margin-top: 4px; }
.legal-body b { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .lang-btn:hover, .lang-menu button:hover { background: var(--track); }
  .lang-menu button[aria-checked="true"]:hover { background: var(--tint); }
  .card:hover .ph > img, .fav:hover .ph > img, .pair:hover .ph > img { transform: scale(1.05); }
  .add:hover { background: var(--accent-hover); }
  .ph .ctrl .add:hover { background: var(--accent); color: #fff; }
  .qty button:hover { color: var(--ink); }
  .suggest:hover { background: color-mix(in srgb, var(--tint) 45%, transparent); }
  .suggest:hover .go { transform: translateX(3px); }
  .chips button:not(.on):hover { color: var(--accent-2); }
  .plates button:hover .big { transform: translateY(-2px); }
  .btn:hover { background: var(--accent-hover); }
  .btn.dark:hover { background: color-mix(in srgb, var(--brand) 88%, var(--accent)); }
  .btn.ghost:hover { background: var(--track); }
  .row:hover h3 { color: var(--accent-2); }
  footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .legal-links button:hover { color: var(--ink); }
}

@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes plate-in { from { opacity: 0; transform: translateX(30px) rotate(40deg); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes qty-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes bump { 0%, 100% { transform: translate(-50%, 0) scale(1); } 40% { transform: translate(-50%, 0) scale(1.04); } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(164, 94, 77, .55); } 100% { box-shadow: 0 0 0 12px rgba(164, 94, 77, 0); } }
@keyframes flash-row { 0% { background: color-mix(in srgb, var(--tint) 100%, transparent); } 100% { background: transparent; } }
@keyframes fork-tap { 0%, 40%, 100% { transform: rotate(0); } 14% { transform: rotate(10deg); } 24% { transform: rotate(-2deg); } }
@keyframes spoon-tap { 0%, 50%, 90%, 100% { transform: rotate(0); } 64% { transform: rotate(-10deg); } 74% { transform: rotate(2deg); } }
@keyframes twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
@media (min-width: 600px) and (hover: hover) and (pointer: fine) {
  /* лента шириной с колонку: следующие карточки спрятаны за краем, их открывает стрелка */
  .favs .rail {
    width: calc(100% - var(--gutter-l) - var(--gutter-r) + 20px);
    max-width: calc(var(--maxw) - var(--gutter-l) - var(--gutter-r) + 20px);
    margin: 0 auto; padding: 4px 10px 14px; scroll-padding: 0 10px;
    -webkit-mask-image: none; mask-image: none;
  }
  .favs .fav { width: calc((100% - 25px) / 3); }
  /* подборка в карточке блюда: тоже только целые карточки */
  .pairs .rail { margin: 0 20px; padding: 2px 0 6px; scroll-padding: 0; -webkit-mask-image: none; mask-image: none; }
  .pairs .pair { width: calc((100% - 31px) / 4); }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .favs .fav { width: calc((100% - 37px) / 4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
