:root {
  /* Цвета и шрифты — в tokens.css (общие с админкой); здесь только раскладка меню. */
  --sidebar: 280px;
  --radius: 28px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--surface) var(--noise);
  color: var(--fg);
  font: var(--type-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
/* manipulation: на телефоне масштаб разрешён, и без этого каждое касание кнопки ждёт двойного. */
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
img { -webkit-user-drag: none; }

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100dvh; }

/* ---------- Боковая панель ---------- */
.sidebar {
  display: flex; flex-direction: column;
  background: transparent;
  border-right: 1px solid var(--line);
  padding: max(28px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  min-height: 0;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 0 26px 10px; }
/* Знак кафе — как в шапке madicake.ru: сам рисунок, цветом текста-акцента, без подложки. */
.brand-mark { width: 52px; flex: none; color: var(--accent-strong); display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: auto; display: block; fill: currentColor; }
/* Кнопка витрины — только планшет: сотрудник включает её сам, не дожидаясь бездействия. */
/* Кнопки шапки меню — столбиком справа: название кафе не уступает им ширину. */
.brand-actions { margin-left: auto; flex: none; display: flex; flex-direction: column; gap: 6px; }
.showcase-btn {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-strong);
}
.showcase-btn[hidden] { display: none; }
.showcase-btn svg { width: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.showcase-btn:active { background: var(--pistachio-soft); }
.nav-toggle {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--accent-strong);
}
.nav-toggle[hidden] { display: none; }
.nav-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.nav-toggle:active { background: var(--pistachio-soft); }
/* Свёрнутое меню — полоса с одной кнопкой: каталогу и крупному плану весь экран. Только при меню слева. */
@media (min-width: 700px) and (min-height: 600px) {
  /* Знак и название чуть меньше: в строке ещё кнопки витрины и сворачивания. */
  .brand { gap: 10px; padding-left: 4px; }
  .brand > div { min-width: 0; }
  .brand-mark { width: 40px; }
  .brand-name { font-size: 17px; }
  .nav-hidden .app { grid-template-columns: 76px minmax(0, 1fr); }
  .nav-hidden .sidebar { padding-left: 14px; padding-right: 14px; }
  .nav-hidden .sidebar > :not(.brand), .nav-hidden .brand > :not(.brand-actions), .nav-hidden .brand-actions > :not(.nav-toggle) { display: none; }
  .nav-hidden .brand { padding: 0; justify-content: center; }
  .nav-hidden .brand-actions { margin: 0; }
  .nav-hidden .nav-toggle { width: 48px; height: 48px; background: var(--fg); color: var(--surface-2); border-color: var(--fg); }
  /* Раскрытые аллергены не помещаются в панель рядом с разделами и QR (1280×800, 1024×768): панель
     сжималась, и разделы ложились поверх чипов. Пока список открыт, разделы и QR уступают ему место —
     найденные блюда и так видны справа, — а «Показать N блюд» прилипает к низу и сворачивает список. */
  body:not(.view-lookbook) .sidebar:has(.allergens:not([hidden])) > :is(.cats, .phone-qr) { display: none; }
  /* С фильтрами на 1024×768 последний раздел уходит под QR: низ списка тает — видно, что он листается. */
  .sidebar > .cats {
    padding-bottom: 20px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 20px), transparent);
  }
  .sidebar .allergens:not([hidden]) ~ .filters-done {
    display: block; position: sticky; bottom: 0; flex-basis: 100%; min-height: 50px; margin-top: 4px;
    border-radius: 999px; background: var(--accent-strong); color: #fff; font-size: 16px; font-weight: 600;
    box-shadow: 0 -6px 14px 4px var(--surface);
  }
}
/* Планшет в портрете: меню уже, карточки в две колонки (со свёрнутым меню — в три). */
@media (orientation: portrait) and (min-width: 700px) and (min-height: 600px) {
  .app { grid-template-columns: 260px minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-hidden .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.brand-name { font: var(--type-logo); letter-spacing: var(--logo-tracking); text-transform: uppercase; white-space: nowrap; }
.brand-sub { font-size: 13px; color: var(--fg-muted); margin-top: 6px; }

.cats { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  text-align: left; padding: 11px 18px; border-radius: 999px;
  font: var(--type-category); letter-spacing: var(--display-tracking); color: var(--fg-muted);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  transition: background .2s, color .2s;
}
.cat small { font: 500 12px/1 var(--font-text); letter-spacing: 0; color: inherit; opacity: .7; }
.cat:active { background: rgba(38, 44, 30, .05); }
.cat[aria-current="true"] { background: var(--fg); color: #fff; }

.status {
  margin-top: 14px; padding: 10px 14px; border-radius: 14px;
  background: rgba(226, 212, 168, .55); color: #5e4f2a; font-size: 13px; line-height: 1.35;
  display: flex; gap: 10px; align-items: center;
}
.status[hidden] { display: none; }
.status.preview { background: #e9e3f6; color: #5a4793; }
.status.preview::before { background: #7a66b8; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b89a4a; flex: none; }

/* ---------- Контент ---------- */
/* Плавная прокрутка — только по просьбе кода (переход к категории), не в CSS: иначе после обновления
   меню список на глазах у гостя едет от начала к прежнему месту. */
.content { overflow-y: auto; overscroll-behavior: contain; padding: 0 clamp(20px, 3vw, 44px) 48px; min-height: 0; }
.section { padding-top: clamp(28px, 4vh, 44px); scroll-margin-top: 0; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font: 600 clamp(36px, 3.6vw, 52px)/1 var(--font-display); letter-spacing: var(--display-tracking); }
.section-head p { margin: 0; color: var(--fg-muted); font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: clamp(14px, 1.6vw, 22px); }

.card {
  text-align: left; display: flex; flex-direction: column;
  transition: transform .15s ease;
}
.card:active { transform: scale(.98); }
.card-media { aspect-ratio: 1 / 1; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--tint); }
.card-body { padding: 16px 4px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
/* Длинное слово без пробелов переносится, а не распирает колонку. */
.card-name { font: var(--type-card-title); overflow-wrap: anywhere; }
.card-desc {
  font: var(--type-card-text); color: var(--fg-muted);
  /* Состав — важная информация для гостя: на планшете показываем целиком, обрезаем только очень длинный. */
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; }
.price { font: var(--type-price); color: var(--accent-soft); white-space: nowrap; }
.card-foot .price::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%;
  background: var(--accent); vertical-align: middle; transform: translateY(-2px);
}
.weight { font: var(--type-meta); color: var(--fg-muted); }

.tags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  background: var(--accent-strong); color: #fff;
  font: var(--type-badge); letter-spacing: .025em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}

/* Закончилось (стоп-лист iiko) */
.card.sold-out .media, .card.sold-out .placeholder { filter: grayscale(.8); opacity: .55; }
.card.sold-out .card-name, .card.sold-out .price { opacity: .55; }
.soldout {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: rgba(38, 44, 30, .88); color: var(--surface-2); padding: 7px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
}
.soldout-note { margin: -6px 0 0; color: var(--accent-soft); font-weight: 600; }
.size.sold-out b, .size.sold-out > div { opacity: .5; }

/* QR на планшете: меню на телефоне гостя */
.phone-qr {
  margin: 14px 0 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px;
  border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font: var(--type-card-title);
}
.phone-qr[hidden] { display: none; }
.phone-qr img { width: 96px; height: 96px; flex: none; border-radius: 8px; background: #fff; }
.phone-qr small { display: block; margin-top: 2px; font: var(--type-meta); color: var(--fg-muted); }

/* Вызов официанта */
.call-btn {
  margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 18px; border-radius: 999px; background: var(--accent-strong); color: #fff; font-weight: 500; font-size: 16px;
  box-shadow: var(--shadow);
}
.call-btn[hidden] { display: none; }
.call-btn svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.call-btn:disabled { background: var(--tint); color: var(--fg-muted); }
.sheet-card.call-card { display: block; width: min(520px, 100%); padding: 36px 32px 30px; }
.call-card h3 { margin: 0 0 18px; font: 600 36px/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.call-reasons { display: grid; gap: 10px; }
.call-reasons button { text-align: left; padding: 16px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 17px; font-weight: 500; }
.call-reasons button:active { background: var(--pistachio-soft); }
/* Ответ на вызов — на месте кнопок, по центру, фирменным начертанием (как заголовки и цены). */
.call-result { margin: 0; padding: 18px 8px 6px; text-align: center; font: 600 28px/1.25 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
.call-result.bad { color: var(--accent-soft); }
.brand-sub span::before { content: " · "; }
.brand-sub span:empty { display: none; }

/* Экран загрузки при первом запуске */
.splash { position: fixed; inset: 0; z-index: 30; background: var(--surface) var(--noise); display: grid; place-items: center; padding: 24px; }
.splash[hidden] { display: none; }
.splash-card { width: min(420px, 100%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.splash-card .brand-mark { width: 88px; }
.splash-card h2 { margin: 8px 0 0; font: 600 40px/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.splash-card p { margin: 0; color: var(--fg-muted); }
.splash-bar { width: 100%; height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; margin-top: 14px; }
.splash-bar span { display: block; height: 100%; width: 0; background: var(--accent-strong); border-radius: inherit; transition: width .3s ease; }
.splash-count { font-variant-numeric: tabular-nums; }
.splash-skip { margin-top: 18px; padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 500; }

/* Видео: значок на обложке */
.play {
  position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(251, 250, 245, .92); color: var(--fg); display: grid; place-items: center;
  font-size: 15px; padding-left: 3px; box-shadow: var(--shadow); pointer-events: none;
}
video.media { background: var(--tint); }

/* «С этим берут» */
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pair { text-align: left; background: var(--surface); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.pair:active { transform: scale(.98); }
.pair-media { position: relative; aspect-ratio: 4 / 3; display: block; }
.pair-media .placeholder span { font-size: 32px; }
.pair-name { padding: 8px 10px 0; font: var(--type-card-title); }
.pair-price { padding: 2px 10px 10px; font: var(--type-price); font-size: 20px; color: var(--accent-soft); }

/* Галерея в карточке блюда */
.gallery { position: absolute; inset: 0; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; overflow: hidden; }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(251, 250, 245, .55); box-shadow: 0 0 0 1px rgba(38, 44, 30,.15); }
.dot[aria-current="true"] { background: var(--surface-2); }

/* Фото и заглушка */
.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--tint); }
/* Фото другой формы, чем рамка крупного вида, вписывается целиком (fitPhoto в app.js): по центру,
   а поля заполняет то же фото, размытое, — без пустых полос и без отрезанного торта. */
.media-backdrop {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none;
  filter: blur(32px) saturate(1.1) brightness(.92); transform: scale(1.15);
}
.fit-contain > .media-backdrop { display: block; }
.fit-contain > .media[data-fit] { object-fit: contain; object-position: center !important; background: transparent; }
.placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.35) 0 18%, transparent 19%),
    radial-gradient(circle at 80% 85%, rgba(122,138,74,.16) 0 22%, transparent 23%),
    linear-gradient(135deg, #eeebdf, #e2e6cf);
}
.placeholder span { font: 600 64px/1 var(--font-display); color: rgba(79, 93, 60, .4); }

/* ---------- Карточка блюда ---------- */
.sheet { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(31, 36, 24, .45); animation: fade .2s ease; }
.sheet-card {
  position: relative; width: min(1040px, 100%); max-height: min(720px, 100%);
  background: var(--surface-2); border-radius: 30px; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr; box-shadow: 0 30px 80px rgba(31, 36, 24,.35);
  animation: rise .28s cubic-bezier(.2,.8,.2,1);
}
.sheet-media { position: relative; min-height: 420px; overflow: hidden; }
.sheet-body { padding: 40px 40px 36px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.sheet-body h3 { margin: 0; font: 600 44px/1.05 var(--font-display); letter-spacing: var(--display-tracking); padding-right: 40px; }
.sheet-body .lead { margin: 0; font: var(--type-lead); color: var(--fg-muted); user-select: text; }
.sheet-close {
  position: absolute; top: 18px; right: 18px; z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(251, 250, 245,.95); display: grid; place-items: center; box-shadow: var(--shadow);
}
.sheet-close svg { width: 22px; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }

.sizes { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.size { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 18px; gap: 12px; }
.size + .size { border-top: 1px solid var(--line); }
.size b { font: var(--type-price); color: var(--accent-soft); white-space: nowrap; }
.size span { color: var(--fg-muted); font-size: 14px; margin-left: 8px; }
.big-price { display: flex; align-items: baseline; gap: 14px; }
.big-price .price { font-weight: 600; font-size: 32px; letter-spacing: var(--display-tracking); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fact { background: var(--surface); border-radius: 14px; padding: 10px 8px; text-align: center; }
.fact b { display: block; font-size: 17px; font-weight: 600; }
.fact small { font-size: 12px; color: var(--fg-muted); letter-spacing: .03em; }
.label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: -8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; color: var(--fg-muted); }
.note { margin-top: auto; font-size: 13px; color: var(--fg-muted); }

/* ---------- Загрузка / ошибки ---------- */
.loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--fg-muted); }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--tint); border-top-color: var(--accent-strong); animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* ---------- Портретная ориентация и небольшие планшеты ---------- */
/* ---------- Витрина при бездействии (планшет) ---------- */
.showcase { position: fixed; inset: 0; z-index: 40; overflow: hidden; cursor: pointer; background: var(--fg); color: var(--surface-2); animation: fade .6s ease; }
.showcase[hidden] { display: none; }
.showcase-media, .showcase-frame { position: absolute; inset: 0; }
/* Медленный наезд камеры, как в прототипе заказчика; без анимации — просто фото (prefers-reduced-motion). */
.showcase-frame { animation: fade 1s ease, showcase-zoom 14s ease-in-out infinite alternate; }
.showcase-frame .placeholder { display: none; }
.showcase-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(38, 44, 30, .9), rgba(38, 44, 30, .2) 55%, rgba(38, 44, 30, .45)); }
.showcase.empty { background: var(--surface) var(--noise); color: var(--fg); }
.showcase-top {
  position: absolute; top: max(32px, env(safe-area-inset-top)); left: 56px; right: 56px;
  display: flex; align-items: center; gap: 16px;
}
.showcase-mark { width: 64px; display: block; color: var(--pistachio); }
.showcase-mark svg { width: 100%; height: auto; display: block; fill: currentColor; }
.showcase-brand { font: var(--type-logo); font-size: 28px; letter-spacing: var(--logo-tracking); text-transform: uppercase; }
.showcase-info {
  position: absolute; left: 56px; right: 56px; bottom: max(44px, env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.showcase-dish { max-width: 680px; min-width: 0; }
.showcase-cat { display: block; margin-bottom: 10px; font: var(--type-badge); letter-spacing: .12em; text-transform: uppercase; color: var(--pistachio); }
.showcase-title { margin: 0; font: italic 400 80px/1 var(--font-showcase); letter-spacing: -.01em; text-wrap: balance; }
.showcase-desc { margin: 16px 0 0; font: var(--type-lead); font-size: 18px; opacity: .82; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.showcase-side { display: flex; flex-direction: column; align-items: flex-end; gap: 18px; flex: none; }
.showcase-price { font: var(--type-price); font-size: 44px; letter-spacing: var(--display-tracking); white-space: nowrap; }
.showcase-hint {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  background: rgba(251, 250, 245, .16); border: 1px solid rgba(251, 250, 245, .3); backdrop-filter: blur(12px);
  font: var(--type-card-title); white-space: nowrap;
}
.showcase-hint svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Без фото — только знак и приглашение по центру. */
.showcase.empty .showcase-top { inset: 0; flex-direction: column; justify-content: center; }
.showcase.empty .showcase-mark { width: 160px; color: var(--accent-strong); }
.showcase.empty .showcase-info { justify-content: center; align-items: center; }
.showcase.empty .showcase-dish, .showcase.empty .showcase-price { display: none; }
.showcase.empty .showcase-side { align-items: center; }
.showcase.empty .showcase-hint { background: var(--surface-2); border-color: var(--line); }
@keyframes showcase-zoom { from { transform: scale(1.02); } to { transform: scale(1.12); } }

/* Телефон и низкий экран: меню строкой сверху. Планшет в любой ориентации — меню слева, его можно свернуть. */
@media (max-width: 699px), (max-height: 599px) {
  /* minmax(0, …): иначе ряд категорий (nowrap) раздвигает страницу шире экрана. */
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar, .cats { min-width: 0; }
  /* Шапка телефона — три плотных ряда: каждый её пиксель отнят у меню. */
  .sidebar {
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  }
  .brand { padding: 0 4px 8px; gap: 10px; }
  .brand-mark { width: 30px; }
  /* Название и «кондитерская · стол 5» — в одну строку. */
  .brand > div:nth-child(2) { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
  .brand-name { font-size: 17px; line-height: 1.3; }
  .brand-sub { margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Край ряда тает: видно, что категории листаются вбок. */
  .cats {
    flex-direction: row; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; gap: 4px; padding-right: 28px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  .cat { white-space: nowrap; padding: 8px 14px; font-size: 17px; }
  .cat small { display: none; }
  .status { margin-top: 8px; }
  /* Снизу — место под кнопку вызова: она не должна закрывать цены последнего ряда. */
  .content { padding: 0 max(16px, env(safe-area-inset-right)) calc(88px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .section { padding-top: 22px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 14px; }
  .section-head h2 { font-size: 30px; }
  .section-head p { font-size: 14px; }
  .call-btn {
    position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5;
    margin: 0; height: 52px; padding: 0 20px 0 15px; gap: 0; font-size: 15px; box-shadow: 0 8px 24px rgba(38, 44, 30,.25); border-radius: 999px;
    transition: padding .25s ease;
  }
  .call-btn span { max-width: 220px; margin-left: 10px; overflow: hidden; white-space: nowrap; transition: max-width .25s ease, margin .25s ease, opacity .2s ease; }
  /* Гость листает меню — кнопка сжимается до колокольчика и не закрывает карточки. Ответ «Официант уже идёт» остаётся виден. */
  .scrolled .call-btn:not(:disabled) { padding: 0 15px; }
  .scrolled .call-btn:not(:disabled) span { max-width: 0; margin-left: 0; opacity: 0; }
  .nav-toggle { display: none; }
  .phone-qr { display: none; }
}
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px) {
  .sheet-card.call-card { border-radius: 30px 30px 0 0; padding: 28px 22px max(24px, env(safe-area-inset-bottom)); width: 100%; }
  .sheet { padding: 0; place-items: end center; }
  .sheet-card { display: block; border-radius: 26px 26px 0 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; transition: transform .2s ease; }
  .sheet-card.dragging { transition: none; }
  /* Шторка прокручивается целиком, а крестик остаётся на экране (sticky), иначе закрыть её можно только вернувшись к началу. */
  #sheet .sheet-close { position: sticky; top: 14px; right: auto; margin: 0 14px -48px auto; }
  /* Ручка: шторку можно смахнуть вниз. */
  #sheet .sheet-card::before {
    content: ""; position: absolute; z-index: 2; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px;
    background: rgba(251, 250, 245, .9); box-shadow: 0 0 0 1px rgba(38, 44, 30, .12); pointer-events: none;
  }
  .sheet-media { min-height: 0; aspect-ratio: 16 / 10; }
  .sheet-body { overflow: visible; padding: 24px 20px max(28px, env(safe-area-inset-bottom)); gap: 16px; }
  .sheet-body h3 { font-size: 30px; padding-right: 0; }
  .showcase-top, .showcase-info { left: 28px; right: 28px; }
  .showcase-info { flex-direction: column; align-items: flex-start; gap: 20px; }
  .showcase-side { align-items: flex-start; }
  .showcase-title { font-size: 52px; }
  .showcase-price { font-size: 36px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-name { font-size: 15px; }
  .card-media { border-radius: 22px; }
  .price { font-size: 21px; }
  .card-desc { display: none; }
  .card-body { padding: 10px 2px 4px; gap: 4px; }
  .tags { top: 10px; left: 10px; right: 10px; gap: 4px; }
  .tag { padding: 4px 9px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  /* Телефон в портрете: фото блюда крупнее — оно главное в шторке. */
  .sheet-media { aspect-ratio: 4 / 3; }
}
@media (max-width: 350px) {
  .card-name { font-size: 14px; }
  .price { font-size: 19px; }
  /* Самый узкий экран: в шапке остаётся номер стола (он важнее слова «кондитерская»), кнопка вызова — сразу колокольчиком. */
  .brand-sub { font-size: 0; }
  .brand-sub span { font-size: 13px; }
  .brand-sub span::before { content: ""; }
  .call-btn:not(:disabled) { padding: 0 15px; }
  .call-btn:not(:disabled) span { max-width: 0; margin-left: 0; opacity: 0; }
}

/* Крупный текст на телефоне даёт окно уже 300 px: логотип уступает место названию, карточки — в одну колонку. */
@media (max-width: 300px) {
  .brand-mark { display: none; }
  .brand > div:nth-child(2) { flex-wrap: wrap; row-gap: 0; }
  .brand-name { white-space: normal; font-size: 15px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
}
/* Телефон в портрете: когда гость ушёл вглубь меню, строка с названием кафе сворачивается —
   остаются поиск и категории. Класс scrolled ставит app.js. */
@media (max-width: 699px) and (min-height: 501px) {
  .brand { max-height: 40px; overflow: hidden; transition: max-height .25s ease, padding .25s ease, opacity .2s ease; }
  .scrolled .brand { max-height: 0; padding-bottom: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Поиск и фильтры ---------- */
/* На планшете в альбоме — в боковой панели над категориями; на телефоне и в портрете — строкой над категориями. */
.finder { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; min-width: 0; }
.finder[hidden] { display: none; }
/* В боковой панели длинный список аллергенов (в iiko их бывает 14) прокручивается сам: категории остаются на месте. */
.sidebar > .finder { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar > .finder > * { flex-shrink: 0; }
.sidebar > .cats { min-height: 112px; }
.search {
  display: flex; align-items: center; min-width: 0; height: 50px;
  background: rgba(251, 250, 245, .6); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .2s, background .2s;
}
.search:focus-within { border-color: var(--accent-strong); background: var(--surface-2); }
.search > svg { width: 20px; margin-left: 16px; flex: none; fill: none; stroke: var(--fg-muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 6px 0 10px; border: 0; outline: 0; background: none;
  font: var(--type-body); color: var(--fg);
  -webkit-appearance: none; appearance: none;
  -webkit-user-select: text; user-select: text; /* иначе в Safari поле не принимает ввод */
}
.search input::placeholder { color: var(--fg-muted); opacity: .85; }
.search input::-webkit-search-cancel-button, .search input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-clear { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; margin-right: 2px; }
.search-clear[hidden] { display: none; }
.search-clear svg { width: 18px; fill: none; stroke: var(--fg-muted); stroke-width: 2.2; stroke-linecap: round; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.filters[hidden], .fchip[hidden] { display: none; }
/* Обёртки ради постоянной разметки: кнопки внутри — обычные элементы ряда */
.filter-labels, .allergen-chips { display: contents; }
.filters-done { display: none; }
.filter-notice { margin: 0; font-size: 14px; line-height: 1.4; color: var(--fg-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fchip {
  min-height: 44px; max-width: 100%; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.fchip[aria-pressed="true"], .fchip.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.fchip.more span { overflow: hidden; text-overflow: ellipsis; }
.fchip.more svg { width: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.fchip.more[aria-expanded="true"] svg { transform: rotate(180deg); }
.allergens {
  flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px; border-radius: 18px; background: var(--surface);
}
.allergens[hidden] { display: none; }
.allergens .fchip { min-height: 44px; }
.allergens-title { width: 100%; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.allergens-note { width: 100%; margin: 2px 0 0; font-size: 13px; line-height: 1.4; color: var(--fg-muted); }

/* «Фильтры» — только на узких и низких экранах, где фильтры свёрнуты */
.filter-toggle {
  display: none; align-items: center; gap: 8px; flex: none; height: 50px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-weight: 500;
}
.filter-toggle svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.filter-toggle[aria-expanded="true"] { border-color: var(--fg); }
.filter-toggle b {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent-strong); color: #fff;
  font-size: 13px; font-weight: 600; display: grid; place-items: center;
}
.filter-toggle b[hidden] { display: none; }

/* Результаты */
.cat.empty { opacity: .45; }
.cat.empty[aria-current="true"] { opacity: .7; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: clamp(20px, 3vh, 32px); }
/* Поиск прячет лишнее, а не перерисовывает меню */
.section[hidden], .card[hidden], .results-head[hidden], .empty-result[hidden] { display: none; }
.results-count { margin: 0; font: 600 clamp(26px, 2.6vw, 34px)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.no-match { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: var(--fg-muted); }
.reset {
  flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--pistachio-soft); color: var(--accent-soft); font-size: 15px; font-weight: 600;
}
.reset:active { background: var(--pistachio); }
.empty-result {
  min-height: 70%; display: grid; place-content: center; justify-items: center; gap: 10px;
  padding: 48px 12px; text-align: center; color: var(--fg-muted);
}
.empty-result p { margin: 0; max-width: 440px; }
.empty-result .empty-title { font: 600 38px/1.1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--fg); }
.reset.big { margin-top: 12px; min-height: 52px; padding: 0 26px; background: var(--accent-strong); color: #fff; font-size: 16px; }

@media (max-width: 699px), (max-height: 599px) {
  .sidebar > .finder { overflow: visible; }
  .sidebar > .cats { min-height: 0; }
  .finder { flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 0 0 8px; }
  .search { flex: 1 1 260px; height: 44px; }
  .filter-toggle { height: 44px; }
  .filters { flex-basis: 100%; }
  .results-head { padding-top: 20px; }
}
/* Телефон и низкий экран: фильтры под кнопкой «Фильтры», чтобы меню оставалось на виду */
@media (max-width: 560px), (max-height: 500px) {
  .finder { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .search { flex: 1 1 0; }
  .filter-toggle:not([hidden]) { display: inline-flex; }
  .finder:not(.open) .filters { display: none; }
  .filters { flex-basis: 100%; }
  /* Лёгкое затемнение под шторкой: касание мимо неё закрывает фильтры (app.js), меню под ним читается. */
  .finder.open::before { content: ""; position: fixed; inset: 0; z-index: 7; background: rgba(31, 36, 24, .22); animation: fade .2s ease; }
  /* Открытые фильтры — шторкой поверх меню, с прокруткой: результаты остаются на виду. */
  .finder.open .filters {
    position: fixed; z-index: 8; left: 0; right: 0; bottom: 0;
    max-height: min(40dvh, 480px); overflow-y: auto; overscroll-behavior: contain; align-content: flex-start;
    padding: 18px 16px max(16px, env(safe-area-inset-bottom));
    background: var(--surface-2); border-radius: 24px 24px 0 0; box-shadow: 0 -12px 40px rgba(38, 44, 30, .2);
  }
  .filters-done {
    display: block; position: sticky; bottom: 0; flex-basis: 100%; min-height: 50px; margin-top: 4px;
    border-radius: 999px; background: var(--accent-strong); color: #fff; font-size: 16px; font-weight: 600;
  }
}
/* Телефон в портрете: пока открыта шторка, строка категорий уступает место результатам. */
@media (max-width: 560px) and (min-height: 501px) {
  .sidebar:has(.finder.open) .cats { display: none; }
}
/* Телефон в альбоме: шторка справа во всю высоту — слева видны найденные блюда. */
@media (max-height: 500px) {
  .finder.open .filters {
    top: 0; left: auto; width: min(380px, 50vw); max-height: none;
    padding-top: max(16px, env(safe-area-inset-top)); padding-right: max(16px, env(safe-area-inset-right));
    border-radius: 24px 0 0 24px; box-shadow: -12px 0 40px rgba(38, 44, 30, .2);
  }
}
@media (max-width: 560px) {
  .results-count { font-size: 26px; }
  .results-head { align-items: flex-start; }
  .empty-result .empty-title { font-size: 32px; }
}
/* Телефон в альбоме: название и поиск — в одну строку, под ними категории */
@media (max-width: 900px) and (max-height: 500px) {
  .sidebar { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 6px; }
  .brand { padding-bottom: 8px; max-width: 42vw; }
  .finder { padding-bottom: 8px; }
  .cats, .status { grid-column: 1 / -1; }
  /* «Сбросить» слева: справа внизу — плавающая кнопка вызова официанта */
  .results-head { flex-direction: row-reverse; justify-content: flex-end; }
}

/* ---------- Раскладка: телефон в альбоме и iPad 1024×768 ---------- */
/* Низкий экран: причины вызова в две колонки — все видны без прокрутки окна. */
@media (orientation: landscape) and (max-height: 500px) {
  .call-reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* iPad в альбоме (1024×768): боковая панель оставляет ~680 px — три колонки карточек вместо двух. */
@media (min-width: 901px) and (max-width: 1100px) and (min-height: 600px) and (orientation: landscape) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-name { font-size: 16px; }
}

/* ---------- Крупный план (планшет) ---------- */
.view-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.view-switch[hidden] { display: none; }
.view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; border-radius: 999px; font: var(--type-badge); color: var(--fg-muted); white-space: nowrap; }
.view-switch button[aria-pressed="true"] { background: var(--fg); color: var(--surface-2); }
.view-switch svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

.lookbook { grid-column: 2; grid-row: 1; display: grid; grid-template-columns: minmax(0, 63fr) minmax(0, 37fr); min-height: 0; overflow: hidden; }
.lookbook[hidden] { display: none; }
.view-lookbook .content { display: none; }
/* В крупном плане фильтры не к чему применить — остаётся только поиск, он ведёт к блюду. */
.view-lookbook #filterToggle, .view-lookbook #filters, .view-lookbook #filterNotice { display: none; }
.lb-stage { position: relative; overflow: hidden; background: #1f2418; border-right: 1px solid var(--line); touch-action: pan-y; }
.lb-media { position: absolute; inset: 0; cursor: zoom-in; }
.lb-media.zoomed { cursor: zoom-out; }
.lb-frame { position: absolute; inset: 0; animation: fade .4s ease; }
.lb-frame .media, .lb-frame .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-frame .media { transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.lb-media.zoomed .media { transform: scale(1.85); }
.lb-frame.sold-out .media { filter: grayscale(.6); }
.lb-frame.sold-out .media-backdrop { filter: blur(32px) grayscale(.6) brightness(.92); }
.lb-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, .22) 100%); }
.lb-pill {
  position: absolute; z-index: 2; top: 20px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px;
  border-radius: 999px; background: rgba(251, 250, 245, .82); border: 1px solid var(--line); backdrop-filter: blur(10px);
  font: var(--type-badge); color: var(--fg);
}
.lb-counter { left: 20px; font-variant-numeric: tabular-nums; }
.lb-sep { color: var(--fg-muted); }
.lb-cat { text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong); }
.lb-zoom { right: 20px; }
.lb-zoom svg { width: 16px; fill: none; stroke: var(--accent-strong); stroke-width: 1.8; stroke-linecap: round; }
.lb-nav { position: absolute; z-index: 2; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; gap: 10px; }
.lb-nav button {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(251, 250, 245, .82);
  border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 4px 14px rgba(31, 36, 24, .18);
}
.lb-nav button:active { transform: scale(.92); }
.lb-nav svg { width: 22px; fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lb-info { display: flex; flex-direction: column; min-height: 0; padding: max(32px, env(safe-area-inset-top)) clamp(24px, 3vw, 44px) max(24px, env(safe-area-inset-bottom)); }
/* Описание прокручивается, если не влезло; низ тает и полоса прокрутки видна — иначе аллергены под лентой
   раздела выглядят обрезанными, а не скрытыми ниже. Отступ снизу под затуханием: дочитанный до конца текст
   не бледнеет. */
.lb-text {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent);
}
.lb-reveal { display: flex; flex-direction: column; gap: 16px; animation: reveal .5s cubic-bezier(.16, 1, .3, 1); }
.lb-title { margin: 0; font: 500 44px/1.08 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
.lb-price { padding-bottom: 16px; border-bottom: 1px solid var(--line); font: var(--type-price); font-size: 32px; color: var(--accent-soft); }
.lb-label { font: var(--type-meta); text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); }
.lb-label + .lb-desc, .lb-label + .chips { margin-top: -8px; }
.lb-desc { margin: 0; font: var(--type-lead); color: var(--fg-muted); user-select: text; }
.lb-specs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }
.lb-spec { display: flex; flex-direction: column; gap: 4px; }
.lb-spec + .lb-spec { border-left: 1px solid var(--line); padding-left: 20px; }
.lb-spec span { font: var(--type-meta); text-transform: uppercase; letter-spacing: .08em; color: var(--fg-muted); }
.lb-spec b { font: var(--type-card-title); }
.lb-strip-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2px; padding-top: 10px; border-top: 1px solid var(--line); font: var(--type-meta); text-transform: uppercase; letter-spacing: .12em; color: var(--fg-muted); white-space: nowrap; }
.lb-strip-head button { font: var(--type-badge); color: var(--accent-strong); text-decoration: underline; text-transform: none; letter-spacing: 0; min-height: 40px; }
/* Пять миниатюр — во всю ширину ленты: раздел до пяти блюд виден целиком. Длиннее — лента листается,
   край тает, а последняя миниатюра доезжает до видимой части (отступ справа). */
.lb-strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 6px 2px 2px; scrollbar-width: thin; }
.lb-strip:has(> :nth-child(6)) {
  padding-right: 28px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.lb-thumb { position: relative; flex: 0 0 max(48px, calc((100% - 32px) / 5)); aspect-ratio: 1; max-height: 76px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.lb-thumb[aria-current="true"] { border-color: var(--accent-soft); opacity: 1; }
.lb-thumb .media, .lb-thumb .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-thumb span { position: absolute; left: 4px; bottom: 4px; min-width: 18px; padding: 0 4px; border-radius: 6px; background: rgba(31, 36, 24, .7); color: #fff; font: var(--type-meta); font-size: 12px; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Планшет в альбоме не выше 900 px (1280×800, 1024×768): описание плотнее, чтобы состав, порции и
   аллергены обычного блюда помещались над лентой раздела без прокрутки. */
@media (orientation: landscape) and (max-height: 900px) {
  .lb-info { padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .lb-reveal { gap: 12px; }
  .lb-title { font-size: 36px; }
  .lb-price { padding-bottom: 12px; font-size: 28px; }
  .lb-label + .lb-desc, .lb-label + .chips { margin-top: -6px; }
  .lb-info .size { padding: 10px 16px; }
  .lb-specs { padding: 8px 0; }
}
/* iPad в альбоме (1024×768): при колонке 37% описание шириной ~275 px — цены и подписи ломались на строки. */
@media (orientation: landscape) and (max-width: 1100px) {
  .lookbook { grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); }
  .lb-info { padding-left: 24px; padding-right: 24px; }
}
.lb-info .size b { white-space: nowrap; }
@media (orientation: portrait) {
  /* Фото забирает место, которое не нужно описанию, но не больше половины экрана: при фиксированных 54%
     у блюда с порциями аллергены и калорийность уходили под ленту раздела (800×1280). */
  .lookbook { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(38dvh, 1fr) auto; }
  .lb-stage { border-right: 0; border-bottom: 1px solid var(--line); }
  .lb-info { min-height: 50dvh; max-height: 62dvh; padding: 20px 24px max(20px, env(safe-area-inset-bottom)); }
  .lb-title { font-size: 34px; }
}
@media (max-width: 699px), (max-height: 599px) {
  .view-switch { display: none; }
}
/* Телефон в альбоме: шторка блюда в портретной раскладке показывала одно фото во весь экран — название
   и цена оставались за краем. Здесь фото слева, описание справа, прокручивается только описание. */
@media (orientation: landscape) and (max-height: 500px) {
  #sheet .sheet-card { display: grid; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); height: 100dvh; max-height: none; overflow: hidden; border-radius: 0; }
  #sheet .sheet-card::before { display: none; }
  #sheet .sheet-close { position: absolute; top: 12px; right: max(12px, env(safe-area-inset-right)); margin: 0; }
  #sheet .sheet-media { aspect-ratio: auto; height: 100%; }
  #sheet .sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 20px max(24px, env(safe-area-inset-right)) 20px 24px; }
  #sheet .sheet-body h3 { font-size: 28px; padding-right: 52px; }
}

/* ---------- Крупный план: фото и видео блюда, Б/Ж/У ---------- */
.lb-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 4px; pointer-events: none; }
/* Точка — кнопка в 32 px для пальца, видимый кружок внутри. */
.lb-dot { width: 32px; height: 32px; display: grid; place-items: center; pointer-events: auto; }
.lb-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(251, 250, 245, .55); box-shadow: 0 0 0 1px rgba(38, 44, 30, .2); }
.lb-dot[aria-current="true"]::before { background: var(--surface-2); }
.lb-specs .lb-macros { grid-column: 1 / -1; }
.lb-specs .lb-macros:not(:first-child) { margin-top: 12px; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
