/* QR-меню «Одильён». Палитра — из дизайн-проекта интерьера: зелёные рифлёные стены,
   латунь, светлая штукатурка. Шрифты: Golos Text (текст), El Messiri (заголовки). */

/* ── Шрифты (свои файлы, облегчённые) ─────────────────────────────── */
@font-face { font-family: 'Golos Text'; src: url('/fonts/golos-cyrillic.woff2') format('woff2'); font-weight: 400 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: 'Golos Text'; src: url('/fonts/golos-cyrillic-ext.woff2') format('woff2'); font-weight: 400 600; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Golos Text'; src: url('/fonts/golos-latin.woff2') format('woff2'); font-weight: 400 600; font-display: swap; unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+2010-2014, U+2018-201E, U+2026, U+2116; }
@font-face { font-family: 'El Messiri'; src: url('/fonts/messiri-cyrillic-600.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1; }
@font-face { font-family: 'El Messiri'; src: url('/fonts/messiri-latin-600.woff2') format('woff2'); font-weight: 600; font-display: swap; unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+2010-2014, U+2018-201E, U+2026, U+2116; }

/* ── Переменные ─────────────────────────────────────────────────────── */
:root {
  --bg: #f5f1e8;
  --surface: #fffdfa;
  --surface-subtle: #ede7da;
  --forest: #283f35;
  --forest-dark: #1c2e26;
  --brass: #b49969;
  --brass-ink: #7a6238;
  --brass-light: #d6c196;
  --spice: #a2462e;
  --ink: #222a25;
  --ink-muted: #5d6862;
  --line: #e4dbc9;
  --on-wall: #f5f1e8;
  --on-wall-muted: rgba(245, 241, 232, 0.74);
  --fluting: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1px, rgba(255, 255, 255, 0.04) 1px 2px, transparent 2px 7px);
  --lamp-glow: radial-gradient(120% 70% at 50% 0%, rgba(230, 204, 150, 0.18), transparent 62%);
  --font-sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'El Messiri', 'Golos Text', Georgia, serif;
  --header-h: 56px;
  --nav-h: 48px;
  --sticky-offset: 104px;
  --gutter: 16px;
  --column: 680px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
}

/* ── База ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
html.is-locked { overflow: hidden; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
h1, h2, p, figure, dl, dd { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }
.wall :focus-visible, .cover :focus-visible { outline-color: var(--brass-light); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 60; padding: 10px 14px; border-radius: 6px; background: var(--surface); color: var(--forest); }
.skip-link:focus { top: 8px; }
.noscript { padding: 24px; text-align: center; }

/* ── Стена: зелёные рифлёные панели ─────────────────────────────────── */
.wall, .cover { background-color: var(--forest); background-image: var(--fluting); color: var(--on-wall); }
.side { display: contents; }

/* ── Шапка ──────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--header-h); }
.topbar__inner { height: 100%; max-width: 1080px; margin: 0 auto; padding: 0 6px 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; color: var(--on-wall); }
.brand__name { font: 600 22px/1 var(--font-display); letter-spacing: 0.01em; padding-top: 3px; }
.mark-bowl { fill: var(--brass); }
.mark-foot { stroke: var(--brass); }
.topbar__actions { display: flex; align-items: center; gap: 2px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; color: var(--on-wall); transition: background-color var(--dur-fast) ease; }
.icon-button:active { background: rgba(255, 255, 255, 0.1); }
.lang-switch { min-width: 44px; height: 32px; padding: 0 10px; border: 1px solid rgba(214, 193, 150, 0.6); border-radius: 999px; color: var(--brass-light); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; transition: background-color var(--dur-fast) ease; }
.lang-switch:active { background: rgba(255, 255, 255, 0.08); }

.search { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.search__field { flex: 1; min-width: 0; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; border-radius: 10px; background: var(--bg); color: var(--ink-muted); transition: box-shadow var(--dur-fast) ease; animation: field-in var(--dur) var(--ease-out); }
.search__field:focus-within { box-shadow: 0 0 0 2px var(--brass); }
.search__field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px/1 var(--font-sans); appearance: none; }
.search__field input::placeholder { color: var(--ink-muted); }
.search__field input::-webkit-search-cancel-button { display: none; }
.search__clear { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 999px; color: var(--ink-muted); }
.search__cancel { height: 44px; padding: 0 10px; color: var(--on-wall); font-size: 15px; font-weight: 500; }
@keyframes field-in { from { opacity: 0; transform: translateX(10px); } }

/* ── Обложка: арки зала ─────────────────────────────────────────────── */
.cover { position: relative; padding: 14px var(--gutter) 22px; text-align: center; background-image: var(--lamp-glow), var(--fluting); overflow: hidden; }
.arcade { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 400px; margin: 0 auto; padding: 0 4px; }
.arcade::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--brass); transform-origin: center; }
.arcade__niche { padding: 3px 3px 0; border: 1px solid var(--brass); border-bottom: 0; border-radius: 999px 999px 0 0; }
.arcade__niche .photo { display: block; aspect-ratio: 3 / 4; border-radius: 999px 999px 0 0; background-color: var(--forest-dark); }
.cover__title { margin-top: 16px; font: 600 32px/1.05 var(--font-display); letter-spacing: 0.005em; }
.cover__lead { margin-top: 6px; font-size: 15px; line-height: 1.4; color: var(--on-wall-muted); }
.cover__notice { max-width: 34ch; margin: 10px auto 0; font-size: 13px; line-height: 1.45; color: var(--brass-light); }

/* Вход: арки поднимаются по очереди, фото открывается снизу как занавес,
   латунный карниз прочерчивается из центра, затем — приветствие. Один раз, около секунды. */
@media (prefers-reduced-motion: no-preference) {
  .arcade__niche { animation: niche-rise 700ms var(--ease-out) backwards; }
  .arcade__niche:nth-child(1) { animation-delay: 80ms; }
  .arcade__niche:nth-child(2) { animation-delay: 0ms; }
  .arcade__niche:nth-child(3) { animation-delay: 160ms; }
  .arcade__niche img { animation: curtain 900ms var(--ease-out) 220ms backwards; }
  .arcade::after { animation: ledge 800ms var(--ease-out) 120ms backwards; }
  .cover__title { animation: rise 600ms var(--ease-out) 420ms backwards; }
  .cover__lead, .cover__notice { animation: rise 600ms var(--ease-out) 520ms backwards; }
  .cover { animation: lamp 1400ms ease-out backwards; }
}
@keyframes niche-rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes curtain { from { clip-path: inset(100% 0 0 0); transform: scale(1.08); } to { clip-path: inset(0); transform: none; } }
@keyframes ledge { from { transform: scaleX(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes lamp { from { background-image: radial-gradient(120% 70% at 50% 0%, rgba(230, 204, 150, 0), transparent 62%), var(--fluting); } }

/* ── Разделы (полоса) ───────────────────────────────────────────────── */
.catnav { position: sticky; top: var(--header-h); z-index: 20; height: var(--nav-h); background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }
.shell.is-searching .catnav, .shell.is-searching .cover { display: none; }
.catnav__list { height: 100%; max-width: var(--column); margin: 0 auto; display: flex; gap: 2px; padding: 0 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 28px), transparent 100%); }
.catnav__list::-webkit-scrollbar { display: none; }
.catnav__list li { flex: none; }
.catnav__tab { position: relative; display: inline-flex; align-items: center; height: var(--nav-h); padding: 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-muted); text-decoration: none; white-space: nowrap; transition: color var(--dur) ease; }
.catnav__tab::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brass); transform: scaleX(0); transition: transform var(--dur) var(--ease-out); }
.catnav__tab.is-active { color: var(--forest); }
.catnav__tab.is-active::after { transform: scaleX(1); }
.catnav__count { margin-left: 3px; align-self: flex-start; margin-top: 12px; font-size: 11px; color: var(--brass-ink); font-variant-numeric: tabular-nums; }

/* ── Меню ───────────────────────────────────────────────────────────── */
.menu { outline: none; padding-bottom: 8px; }
.section { max-width: var(--column); margin: 0 auto; padding: 30px var(--gutter) 2px; scroll-margin-top: var(--sticky-offset); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--brass); }
.section__title { font: 600 28px/1.15 var(--font-display); color: var(--forest); text-wrap: balance; }
.section__count { flex: none; font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.menu__empty, .load-error { padding: 48px var(--gutter); text-align: center; color: var(--ink-muted); }
.load-error .chip { margin-top: 14px; }

/* Строка блюда: фото в маленькой арке-нише, как на обложке */
.dish { display: flex; gap: 14px; align-items: flex-start; width: calc(100% + 16px); margin: 0 -8px; padding: 10px 8px; border-radius: 8px; transition: background-color var(--dur-fast) ease; }
.dish:active { background: var(--surface-subtle); }
.dish-list li + li .dish { border-top: 1px solid transparent; }
.dish__thumb { flex: none; display: block; width: 64px; aspect-ratio: 4 / 5; border-radius: 999px 999px 6px 6px; box-shadow: inset 0 0 0 1px rgba(122, 98, 56, 0.25); }
.dish__thumb--empty { background: var(--surface-subtle); }
.dish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 6px; }
.dish__line { display: flex; align-items: baseline; }
.dish__name { min-width: 0; font-size: 17px; line-height: 1.3; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.leader { flex: 1 1 20px; min-width: 16px; margin: 0 8px; border-bottom: 2px dotted rgba(122, 98, 56, 0.38); transform: translateY(-0.3em); }
.dish__value { flex: none; display: inline-flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.dish__variants { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dish__variant { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.dish__variant-label { font-size: 14px; color: var(--ink-muted); }
.dish__currency { font-size: 14px; color: var(--ink-muted); }
.dish-group { padding: 14px 0 2px; list-style: none; }
.dish-group__title { margin: 0; font: 600 17px/1.2 var(--font-display); color: var(--brass-ink); }
@media (min-width: 1100px) { .dish-group { grid-column: 1 / -1; } }
.dish__portion { font-size: 14px; color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.dish__price { font-size: 16px; font-weight: 600; color: var(--forest); font-variant-numeric: tabular-nums; }
.dish__hand { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--brass-ink); letter-spacing: 0.01em; }
.dish__desc { display: -webkit-box; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--ink-muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish__context { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-muted); }
.dish__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.tag--new { background: var(--forest); color: var(--on-wall); }
.tag--hit { background: var(--brass); color: var(--forest-dark); }
.tag--spicy { background: rgba(162, 70, 46, 0.12); color: var(--spice); }
.tag--soldout { background: var(--surface-subtle); color: var(--ink-muted); }
.is-soldout .dish__thumb, .is-soldout .feature__photo { filter: grayscale(0.85); opacity: 0.6; }
.is-soldout .dish__name, .is-soldout .feature__name { color: var(--ink-muted); }

/* Крупная карточка: фото на всю ширину, подпись как под иллюстрацией в книге */
.feature { display: block; width: calc(100% + 2 * var(--gutter)); margin: 8px calc(-1 * var(--gutter)) 8px; }
.feature__photo { display: block; aspect-ratio: 16 / 10; }
.feature__caption { display: block; padding: 10px var(--gutter) 4px; }
.feature__line { display: flex; align-items: baseline; }
.feature__name { font: 600 23px/1.2 var(--font-display); color: var(--forest); }
.feature__note { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-muted); }
.feature:active .feature__photo img { opacity: 0.92; }

/* Лента «Попробуйте»: арки-витрины, листаются пальцем */
.picks { max-width: var(--column); margin: 0 auto; padding-top: 26px; }
.picks__title { padding: 0 var(--gutter); font: 600 22px/1.2 var(--font-display); color: var(--forest); }
.picks__list { display: flex; gap: 14px; padding: 14px var(--gutter) 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.picks__list::-webkit-scrollbar { display: none; }
.picks__list li { flex: none; scroll-snap-align: start; }
.pick { display: grid; gap: 6px; width: 148px; text-align: left; -webkit-tap-highlight-color: transparent; }
.pick__photo { display: block; aspect-ratio: 4 / 5; border-radius: 999px 999px 10px 10px; box-shadow: 0 0 0 1px rgba(180, 153, 105, 0.6), 0 14px 24px -16px rgba(28, 46, 38, 0.55); transition: transform var(--dur) var(--ease-out); }
.pick:active .pick__photo { transform: scale(0.97); }
.pick__name { margin-top: 4px; font-size: 15px; line-height: 1.25; font-weight: 500; color: var(--ink); text-wrap: balance; }
.pick__price { font-size: 14px; font-weight: 600; color: var(--forest); font-variant-numeric: tabular-nums; }
.pick.is-soldout .pick__photo { filter: grayscale(0.85); opacity: 0.6; }
.pick.is-soldout .pick__price { color: var(--ink-muted); font-weight: 500; }
@media (min-width: 720px) { .pick { width: 168px; } }

/* ── Фото с размытой заглушкой ──────────────────────────────────────── */
.photo { position: relative; overflow: hidden; background-color: var(--surface-subtle); background-size: cover; background-position: center; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease; }
.photo.is-loaded img, .cover .photo img { opacity: 1; }

/* ── Заглушка при загрузке ──────────────────────────────────────────── */
.skeleton { max-width: var(--column); margin: 0 auto; padding: 30px var(--gutter); }
.skeleton__title { width: 45%; height: 30px; margin-bottom: 18px; border-radius: 6px; background: var(--surface-subtle); }
.skeleton__row { height: 72px; margin-bottom: 12px; border-radius: 8px; background: linear-gradient(90deg, var(--surface-subtle) 0 64px, transparent 64px 78px, var(--surface-subtle) 78px); opacity: 0.7; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── Поиск ──────────────────────────────────────────────────────────── */
.results { max-width: var(--column); margin: 0 auto; padding: 16px var(--gutter) 8px; }
.results.has-query { min-height: calc(100dvh - var(--header-h)); }
.results__status { min-height: 20px; font-size: 13px; color: var(--ink-muted); margin-bottom: 4px; }
.results__hint { font-size: 13px; color: var(--ink-muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--brass); border-radius: 999px; color: var(--forest); font-size: 14px; font-weight: 500; transition: background-color var(--dur-fast) ease; }
.chip:active { background: var(--surface-subtle); }
.results__empty-title { margin-top: 12px; font: 600 24px/1.2 var(--font-display); color: var(--forest); overflow-wrap: anywhere; }
.results__empty-text { margin: 6px 0 16px; font-size: 14px; color: var(--ink-muted); }

/* ── Карточка блюда ─────────────────────────────────────────────────── */
.sheet-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.sheet-dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet-dialog::backdrop { background: rgba(28, 46, 38, 0.5); }
.sheet-dialog[open]::backdrop { animation: fade-in var(--dur) ease; }
.sheet-dialog.is-closing::backdrop { animation: fade-out var(--dur) ease forwards; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); transform: translateY(var(--drag, 0px)); animation: sheet-in 300ms var(--ease-out); }
.sheet-dialog.is-closing .sheet { animation: sheet-out var(--dur) ease-in forwards; }
.sheet__grab { position: relative; min-height: 26px; touch-action: none; }
.sheet__handle { position: absolute; top: 9px; left: 50%; z-index: 1; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(34, 42, 37, 0.2); }
.sheet__grab.has-photo .sheet__handle { background: rgba(255, 253, 250, 0.85); }
.sheet__photo { display: block; aspect-ratio: 4 / 3; }
.sheet__close { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; color: var(--forest); background: rgba(255, 253, 250, 0.92); }
.sheet__body { padding: 16px 22px 24px; }
.sheet__category { font-size: 13px; color: var(--brass-ink); margin-bottom: 2px; }
.sheet__title { font: 600 30px/1.12 var(--font-display); color: var(--forest); text-wrap: balance; padding-right: 32px; }
.sheet__hand { margin-top: 4px; font-size: 14px; color: var(--ink-muted); }
.sheet__hand span { color: var(--brass-ink); }
.sheet__body .dish__tags { margin-top: 10px; }
.sheet__desc { margin-top: 12px; font-size: 15px; line-height: 1.55; color: var(--ink); white-space: pre-line; }
.sheet__facts { margin: 16px 0 12px; }
.sheet__fact { display: flex; align-items: baseline; padding: 5px 0; font-size: 15px; }
.sheet__fact dd { font-weight: 600; }
.sheet__fact dd.is-pending { font-weight: 400; color: var(--ink-muted); }
.sheet__fact dd.is-price { color: var(--forest); }
.sheet__note { font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); }
.sheet__hint { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--brass); color: var(--forest); font-size: 14px; font-weight: 500; }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes sheet-out { from { transform: translateY(var(--drag, 0px)); } to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ── Подвал с контактами ────────────────────────────────────────────── */
.footer { margin-top: 44px; padding: 34px var(--gutter) calc(34px + env(safe-area-inset-bottom)); }
.footer__inner { max-width: var(--column); margin: 0 auto; }
.footer__brand { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(180, 153, 105, 0.5); }
.footer__name { font: 600 26px/1.1 var(--font-display); }
.footer__kind { margin-top: 2px; font-size: 13px; color: var(--on-wall-muted); }
.branch { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.branch__name { font-weight: 600; margin-bottom: 2px; }
.branch__line { font-size: 14px; color: var(--on-wall-muted); }
.branch__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--brass); border-radius: 999px; color: var(--on-wall); font-size: 14px; font-weight: 500; text-decoration: none; }
.footer__text { font-size: 14px; line-height: 1.55; color: var(--on-wall-muted); margin-bottom: 10px; }
.footer__small { font-size: 12.5px; line-height: 1.5; color: var(--on-wall-muted); margin-bottom: 6px; }
.footer__credit a { display: inline-block; padding: 8px 0; text-underline-offset: 2px; }
.footer a:not(.pill-button) { color: var(--brass-light); text-underline-offset: 3px; }

/* ── Наведение мышью ────────────────────────────────────────────────── */
@media (hover: hover) {
  .dish:hover { background: rgba(237, 231, 218, 0.65); }
  .feature:hover .feature__name { text-decoration: underline 1px var(--brass); text-underline-offset: 5px; }
  .catnav__tab:hover { color: var(--forest); }
  .icon-button:hover, .lang-switch:hover { background: rgba(255, 255, 255, 0.1); }
  .chip:hover { background: var(--surface-subtle); }
  .pill-button:hover { background: rgba(255, 255, 255, 0.08); }
}

/* ── Планшет ────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .sheet-dialog[open] { align-items: center; padding: 32px; }
  .sheet { max-height: min(780px, calc(100dvh - 64px)); border-radius: 18px; padding-bottom: 0; animation: sheet-pop 260ms var(--ease-out); }
  .sheet-dialog.is-closing .sheet { animation: sheet-unpop 180ms ease-in forwards; }
  .sheet__handle { display: none; }
  .sheet__grab { touch-action: auto; }
}
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .arcade { max-width: 520px; gap: 20px; }
  .cover { padding-top: 22px; padding-bottom: 28px; }
  .cover__title { font-size: 40px; }
  .catnav__list { justify-content: safe center; }
  .feature { width: 100%; margin: 12px 0 8px; }
  .feature__photo { aspect-ratio: 2 / 1; }
  .feature__caption { padding-left: 0; padding-right: 0; }
  .dish__thumb { width: 72px; }
}
@keyframes sheet-pop { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
@keyframes sheet-unpop { to { opacity: 0; transform: translateY(12px) scale(0.985); } }

/* ── Компьютер: стена слева, меню справа в две колонки ──────────────── */
@media (min-width: 1100px) {
  :root { --sticky-offset: 28px; --column: 900px; }
  .shell { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; }
  .side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; background-image: radial-gradient(90% 45% at 50% 18%, rgba(230, 204, 150, 0.14), transparent 70%), var(--fluting); }
  .side .topbar, .side .cover { position: static; background: none; }
  .topbar__inner { padding: 0 18px 0 28px; }
  .cover { padding: 18px 28px 22px; animation: none; }
  .arcade { gap: 14px; }
  .cover__title { font-size: 36px; }
  .shell.is-searching .cover, .shell.is-searching .catnav { display: block; }
  .catnav { position: static; height: auto; background: none; border: 0; color: var(--on-wall); padding: 4px 16px 28px; }
  .catnav__list { height: auto; flex-direction: column; gap: 0; padding: 0; overflow: visible; -webkit-mask-image: none; mask-image: none; border-top: 1px solid rgba(180, 153, 105, 0.45); }
  .catnav__tab { display: flex; width: 100%; height: 42px; padding: 0 12px 0 26px; color: var(--on-wall-muted); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
  .catnav__tab::after { left: 10px; right: auto; top: 50%; bottom: auto; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; transform: scale(0); }
  .catnav__tab.is-active { color: var(--on-wall); }
  .catnav__tab.is-active::after { transform: scale(1); }
  .catnav__count { margin: 0 0 0 auto; align-self: center; font-size: 12px; color: var(--brass-light); }
  .main { min-width: 0; }
  .menu { padding-top: 12px; }
  .section { padding-top: 36px; }
  .section__title { font-size: 32px; }
  .dish-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 36px; }
  .results { padding-top: 32px; }
  .results.has-query { min-height: 100dvh; }
}
@media (min-width: 1100px) and (hover: hover) { .catnav__tab:hover { color: var(--on-wall); } }

/* ── Меньше движения — по настройке телефона ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Глубина при прокрутке: арки обложки отстают и тускнеют. Только телефоны/планшеты, где браузер это умеет. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (max-width: 1099px) {
    .arcade { animation: cover-drift linear both; animation-timeline: scroll(root); animation-range: 0 480px; }
  }
}
@keyframes cover-drift { to { transform: translateY(64px) scale(0.94); opacity: 0.5; } }
