/* ==========================================================================
   Park Avenue Hotel & Cafe — электронное меню. Mobile-first.
   ========================================================================== */

:root {
  --bg: #FFFFFF;
  --surface: #FAF6EE;
  --surface-2: #EDE2CF;
  --cappuccino: #A9805B;
  --cappuccino-d: #7A5A40;
  --green: #A9C96A;
  --green-d: #6F8F3A;
  --on-green: #2B2A1A;
  --text: #3A2E24;
  --muted: #6F5E4B;           /* затемнён относительно ТЗ (#7C6B5B) ради контраста ≥ 4.5:1 на бежевом */
  --line: rgba(122, 90, 64, .18);
  --gold: #C4952F;
  --forest: #3C5F43;
  --olive: #6B5E46;
  --danger: #A2412F;
  --shadow: 0 1px 2px rgba(92, 64, 38, .06), 0 6px 18px rgba(92, 64, 38, .07);
  --shadow-lg: 0 -8px 30px rgba(58, 46, 36, .16);
  --topbar-bg: rgba(255, 255, 255, .88);
  --backdrop: rgba(43, 34, 26, .45);
  --skeleton: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 70%);

  --font-serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --pad: 16px;
  --topbar-h: 56px;
  --sticky-h: 160px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --dur: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #1E2117;
  --surface: #2A2C21;
  --surface-2: #34362A;
  --cappuccino: #C9A27C;
  --cappuccino-d: #D9B48F;
  --green: #B8D67A;
  --green-d: #93B653;
  --on-green: #1E2117;
  --forest: #A9C58A;
  --olive: #C9BBA0;
  --text: #F3EBDD;
  --muted: #B8AC98;
  --line: rgba(243, 235, 221, .14);
  --gold: #D9AE4F;
  --danger: #F08F7A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .22);
  --shadow-lg: 0 -8px 30px rgba(0, 0, 0, .45);
  --topbar-bg: rgba(30, 33, 23, .86);
  --backdrop: rgba(0, 0, 0, .6);
  --skeleton: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.07) 50%, rgba(255,255,255,0) 70%);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: break-word;
}
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }

/* Блокировка прокрутки фона при открытой панели (iOS-совместимо: position: fixed + сохранение scrollY в JS) */
body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; touch-action: manipulation; }
button:focus { outline: none; }
a:focus { outline: none; }
:focus-visible { outline: 2px solid var(--green-d); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--green-d); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; flex: none; display: block; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: calc(8px + var(--safe-top)); }

.noscript { margin: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); text-align: center; }

/* ---------- Кнопки ---------- */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--cappuccino-d);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.icon-btn:active { transform: scale(.94); background: var(--surface-2); }
.icon-btn--soft { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.icon-btn--sm { min-width: 40px; height: 40px; }
.icon-btn--sm .icon { width: 19px; height: 19px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--green); color: var(--on-green); box-shadow: 0 4px 14px rgba(111, 143, 58, .28); }
.btn--primary:active { background: var(--green-d); }
.btn--ghost { background: transparent; color: var(--cappuccino-d); box-shadow: inset 0 0 0 1.5px var(--cappuccino); }
.btn--ghost:active { background: var(--surface-2); }
.btn--danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn--danger-solid { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn--danger-solid { color: #1E2117; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--cappuccino-d);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.pill-btn:active { background: var(--surface-2); }

/* ---------- Верхняя панель ---------- */
.topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--safe-top);
  background: var(--bg);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar {
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1120px;
  height: var(--topbar-h);
  margin: 0 auto;
  padding: 0 max(10px, env(safe-area-inset-right, 0px)) 0 max(10px, env(safe-area-inset-left, 0px));
}
.topbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
}
.topbar__emblem { width: 36px; height: 36px; }
.topbar__wordmark { width: 98px; height: 15px; }
.topbar.is-compact .topbar__brand {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.topbar__actions { display: flex; align-items: center; gap: 2px; flex: none; }

.lang { position: relative; }
.lang__toggle { padding: 0 8px; }
.lang__code { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.lang__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 50;
  min-width: 170px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.lang__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 600;
  text-align: left;
}
.lang__opt:active { background: var(--surface-2); }
.lang__opt[aria-pressed="true"] { background: var(--green); color: var(--on-green); }

#themeBtn .icon--sun { display: none; }
[data-theme="dark"] #themeBtn .icon--sun { display: block; }
[data-theme="dark"] #themeBtn .icon--moon { display: none; }

/* ---------- Экран приветствия ---------- */
.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 4px var(--pad) 28px;
  text-align: center;
}
.hero__logo { margin: 0 auto 14px; width: 220px; }
.hero__logo picture { display: block; }
.hero__logo .hero__logo-dark, [data-theme="dark"] .hero__logo .hero__logo-light { display: none; }
[data-theme="dark"] .hero__logo .hero__logo-dark { display: block; }
.hero__logo img { display: block; width: 100%; height: auto; aspect-ratio: 760 / 636; }
.hero__title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.15;
  color: var(--forest);
}
.hero__text { margin: 0 auto 16px; max-width: 34em; color: var(--muted); font-size: 15px; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--cappuccino-d);
}
.hero__facts .icon { width: 17px; height: 17px; }
.hero__actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.hero__actions .btn { min-width: 140px; }

/* ---------- Навигация меню ---------- */
.menu {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  outline: none;
  scroll-margin-top: calc(var(--topbar-h) + var(--safe-top));
}
.menu-nav {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-top));
  z-index: 30;
  padding: 8px 0 0;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .menu-nav {
    background: var(--topbar-bg);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}
.menu-nav__row, .search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--pad);
}
.menu-nav__row[hidden], .search[hidden] { display: none; }

.segment {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}
.segment__btn {
  flex: 1 1 50%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.segment__btn[aria-pressed="true"] { background: var(--surface); color: var(--forest); box-shadow: var(--shadow); }

.search__field {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.search__field:focus-within { box-shadow: inset 0 0 0 2px var(--green-d); }
.search__icon { position: absolute; left: 13px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0 44px 0 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 16px; /* ≥16px — иначе iOS Safari приближает страницу при фокусе */
  -webkit-appearance: none;
  appearance: none;
}
.search__input:focus, .search__input:focus-visible { outline: none; }
.search__input::-webkit-search-cancel-button, .search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__clear {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--muted);
}
.search__clear[hidden] { display: none; }
.search__clear .icon { width: 18px; height: 18px; }
.search__cancel { flex: none; min-height: 44px; padding: 0 4px; color: var(--cappuccino-d); font-weight: 700; }

.chips {
  position: relative;
  display: flex;
  gap: 8px;
  min-height: 56px;
  padding: 10px var(--pad) 10px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-padding: 0 var(--pad);
  overscroll-behavior-x: contain;
}
.chips::-webkit-scrollbar { display: none; }
.chips[hidden] { display: none; }
.menu-nav.is-searching .chips { display: none; }
.menu-nav.is-searching { padding-bottom: 10px; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.chip:active { transform: scale(.97); }
.chip[aria-current="true"] { background: var(--green); color: var(--on-green); box-shadow: none; }

/* ---------- Разделы и карточки ---------- */
.menu__service {
  margin: 14px var(--pad) 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.menu__service:empty { display: none; }
.menu__list, .menu__results { padding: 0 var(--pad); }
.menu__list[hidden], .menu__results[hidden] { display: none; }

.section { padding-top: 22px; scroll-margin-top: var(--sticky-h); }
.section__title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 12px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  color: var(--forest);
  text-align: center;
}
/* Тонкая линия с золотым ромбиком — как разделитель в логотипе */
.section__title::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(220px, 60%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cappuccino) 20%, var(--cappuccino) 80%, transparent);
  opacity: .55;
}
.section__title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold);
}
.section__sub { margin: -8px 0 14px; text-align: center; font-size: 13px; color: var(--muted); }

.list { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0; padding: 0; list-style: none; }
.list--compact {
  gap: 0;
  padding: 4px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--dur) var(--ease);
}
.card:active { transform: scale(.992); }
.card__media {
  position: relative;
  flex: none;
  width: 116px;
  aspect-ratio: 4 / 3;
  align-self: flex-start;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
@supports not (aspect-ratio: 4 / 3) { .card__media { height: 87px; } }
.card__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.card__name { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--forest); overflow-wrap: anywhere; }
.card__link {
  display: inline;
  padding: 0;
  text-align: left;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}
.card__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible::after { box-shadow: 0 0 0 2px var(--green-d); }
.card__desc {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.card__off { font-size: 13px; font-weight: 700; color: var(--danger); }
.card.is-off { cursor: default; }
.card.is-off .card__media, .card.is-off .card__name, .card.is-off .card__desc, .card.is-off .price { opacity: .5; }

/* Компактная строка (гарниры, соусы, добавки, чай и напитки без фото) */
.row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row__main { flex: 1 1 160px; min-width: 0; }
.row .card__name { font-size: 15.5px; }
.row .card__desc { -webkit-line-clamp: 3; }
.row__side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.row.is-off .card__name, .row.is-off .card__desc, .row.is-off .price { opacity: .5; }
.row .variants { flex-basis: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.tag--spicy { background: #E8B7A0; color: #4A1F10; }
.tag--new { background: var(--gold); color: #2B2210; }

.price {
  font-weight: 700;
  font-size: 16px;
  color: var(--cappuccino-d);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price__vol { font-weight: 600; font-size: 13px; color: var(--muted); margin-right: 6px; }

.variants { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.variant {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 0 0 12px;
  border-radius: 999px;
  background: var(--bg);
}
.variant__label { font-size: 14px; font-weight: 600; color: var(--muted); }
.variant .price { margin-left: auto; font-size: 15px; }

/* Кнопка «+» и степпер */
.ctrl { position: relative; z-index: 1; display: inline-flex; flex: none; }
.add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
  box-shadow: 0 3px 10px rgba(111, 143, 58, .25);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.add:active { transform: scale(.9); background: var(--green-d); }
.add[disabled] { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.add .icon { width: 20px; height: 20px; }

.stepper {
  display: inline-flex;
  align-items: center;
  height: 44px;
  border-radius: 999px;
  background: var(--green);
  color: var(--on-green);
}
.stepper__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
}
.stepper__btn:active { background: var(--green-d); }
.stepper__btn[disabled] { opacity: .4; pointer-events: none; }
.stepper__btn .icon { width: 18px; height: 18px; }
.stepper__val { min-width: 22px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper--soft { background: var(--surface-2); color: var(--text); }
.stepper--soft .stepper__btn:active { background: var(--line); }
.stepper--lg { height: 52px; }
.stepper--lg .stepper__btn { width: 52px; height: 52px; }
.stepper--lg .stepper__val { min-width: 34px; font-size: 18px; }
.pop { animation: pop 240ms var(--ease); }
@keyframes pop { 0% { transform: scale(.8); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- Фото и заглушки ---------- */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--surface-2);
  overflow: hidden;
}
.ph::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/logo/logo-emblem-160.png') center / 46% auto no-repeat;
  opacity: .12;
}
.ph--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--skeleton);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.ph.is-done::after { display: none; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.ph picture, .ph .img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph .img { object-fit: cover; opacity: 0; transition: opacity 250ms var(--ease); }
.ph .img.is-loaded { opacity: 1; }

/* ---------- Подвал ---------- */
.menu__allergy {
  margin: 28px var(--pad) 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--olive);
  font-size: 14px;
  text-align: center;
}
.menu__allergy:empty { display: none; }
/* Пока меню не отрисовано скриптом, подвал оказался бы на первом экране и потом «уехал» вниз (CLS) */
html:not(.is-ready) .footer { display: none; }
.footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 36px var(--pad) calc(110px + var(--safe-bottom));
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.footer__logo { width: 120px; height: auto; aspect-ratio: 240 / 250; margin: 0 auto 18px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--cappuccino-d);
  font-weight: 600;
  text-decoration: none;
}
.footer__link .icon { width: 19px; height: 19px; }
.footer__hours, .footer__copy { margin: 4px 0; }

/* ---------- Плавающие элементы ---------- */
.billbar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-bottom));
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 24px);
  max-width: 520px;
  min-height: 56px;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--forest);
  color: #FFFBF3;
  box-shadow: 0 10px 30px rgba(28, 44, 31, .35);
  transform: translateX(-50%);
  transition: transform var(--dur) var(--ease);
}
[data-theme="dark"] .billbar { background: var(--green); color: var(--on-green); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.billbar[hidden] { display: none; }
.billbar:active { transform: translateX(-50%) scale(.98); }
.billbar__label { font-weight: 700; }
.billbar__count { opacity: .85; font-size: 14px; }
.billbar__sum { margin-left: auto; font-size: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.billbar.pulse { animation: pulse 360ms var(--ease); }
@keyframes pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 45% { transform: translateX(-50%) scale(1.04); } }

.to-top {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 44;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--cappuccino-d);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  transition: bottom var(--dur) var(--ease);
}
.to-top[hidden] { display: none; }
body.has-bill .to-top { bottom: calc(80px + var(--safe-bottom)); }

.top-sentinel { position: absolute; top: 600px; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* ---------- Bottom sheet ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  transition: visibility 0s linear 250ms;
}
.sheet[hidden] { display: none; }
.sheet.is-open { visibility: visible; transition-delay: 0s; }
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  opacity: 0;
  transition: opacity 250ms var(--ease);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 250ms var(--ease);
  outline: none;
  will-change: transform;
}
@supports (max-height: 92dvh) { .sheet__panel { max-height: 92dvh; } }
.sheet.is-open .sheet__panel { transform: translateY(0); }
.sheet__panel.is-dragging { transition: none; }
.sheet__panel--small { max-width: 460px; }
.sheet__handle { width: 42px; height: 5px; margin: 8px auto 0; border-radius: 999px; background: var(--line); flex: none; }
.sheet__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 20px;
  flex: none;
}
.sheet__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  color: var(--forest);
  overflow-wrap: anywhere;
}
.sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 4px 20px 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sheet__foot {
  flex: none;
  padding: 12px 20px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
  border-radius: 0;
}
.sheet__foot:empty { display: none; }
.sheet__body:last-child { padding-bottom: calc(20px + var(--safe-bottom)); }

.sheet--center { align-items: center; padding: 16px; }
.sheet--center .sheet__panel {
  border-radius: 24px;
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.sheet--center.is-open .sheet__panel { transform: none; opacity: 1; }
.sheet--center .sheet__head { padding: 20px 20px 4px; }
.sheet--center .sheet__foot { border-top: 0; padding-bottom: 16px; }
.confirm__text { margin: 0; color: var(--muted); }
.confirm__actions { display: flex; gap: 10px; }
.confirm__actions .btn { flex: 1 1 0; padding-left: 12px; padding-right: 12px; }

/* Карточка блюда в панели */
.dish__media { margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
@supports not (aspect-ratio: 4 / 3) { .dish__media { height: 60vw; max-height: 420px; } }
.dish__media .ph::before { background-size: 30% auto; }
.dish__gallery { aspect-ratio: auto; overflow: visible; border-radius: 0; }
@supports not (aspect-ratio: 4 / 3) { .dish__gallery { height: auto; max-height: none; } }
.gallery {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  border-radius: var(--radius);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline: 2px solid var(--cappuccino); outline-offset: 2px; }
.gallery__slide { flex: 0 0 100%; aspect-ratio: 4 / 3; scroll-snap-align: start; scroll-snap-stop: always; }
@supports not (aspect-ratio: 4 / 3) { .gallery__slide { height: 60vw; max-height: 420px; } }
.gallery__dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.gallery__dot { position: relative; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.gallery__dot::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--cappuccino);
  transition: transform 200ms var(--ease), background 200ms var(--ease);
}
.gallery__dot[aria-current="true"]::before { background: var(--cappuccino); transform: scale(1.25); }
.dish__cat { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cappuccino-d); }
.dish__desc { margin: 0 0 14px; font-size: 16px; color: var(--text); }
.dish__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; }
.dish__facts dt { color: var(--muted); }
.dish__facts dd { margin: 0; font-weight: 600; }
.dish__off { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--danger); font-weight: 700; }
.dish__variants { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.dish__variant {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 52px;
  padding: 8px 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}
.dish__variant[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--green-d); background: var(--surface); }
.dish__variant-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.dish__variant .price { font-size: 16px; }
.dish__price { margin: 0 0 6px; font-size: 22px; }
.dish__buy { display: flex; align-items: center; gap: 12px; }
.dish__buy .btn { flex: 1 1 auto; min-height: 52px; padding-left: 14px; padding-right: 14px; }
.dish__inbill { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.dish__inbill:empty { display: none; }

/* Счёт */
.bill__meta { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 8px 0 16px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}
.field[hidden] { display: none; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--green-d); }
.field__label { flex: none; font-weight: 600; color: var(--muted); }
.field__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  border: 0;
  background: transparent;
  font-size: 18px; /* ≥16px — без автозума в iOS */
  font-weight: 700;
  text-align: right;
  padding: 0 8px;
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus, .field__input:focus-visible { outline: none; }
.field__value { flex: 1 1 auto; min-width: 0; text-align: right; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field__chevron { color: var(--muted); width: 18px; height: 18px; }

.bill__lines { margin: 0; padding: 0; list-style: none; }
.bill__lines:empty { display: none; }
.bill-line {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "info sum" "ctrl del";
  align-items: center;
  gap: 8px 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.bill-line__info { grid-area: info; min-width: 0; }
.bill-line__name { display: block; font-weight: 700; color: var(--forest); overflow-wrap: anywhere; }
.bill-line__meta { display: block; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bill-line__sum { grid-area: sum; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cappuccino-d); }
.bill-line .ctrl { grid-area: ctrl; }
.bill-line__del { grid-area: del; justify-self: end; color: var(--danger); }
.bill__empty { margin: 8px 0 16px; padding: 20px 16px; border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }
.bill__empty[hidden] { display: none; }
#billSummary[hidden] { display: none; }
.bill__totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 0; margin: 16px 0 0; font-variant-numeric: tabular-nums; }
.bill__totals dt { color: var(--muted); }
.bill__totals dd { margin: 0; padding-left: 12px; text-align: right; font-weight: 600; white-space: nowrap; }
.bill__totals .is-total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 20px; font-weight: 800; color: var(--text); }
.bill__totals dd.is-total { color: var(--cappuccino-d); }

.split { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.split__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.split__toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; font-weight: 700; color: var(--forest); text-align: left; }
.split__toggle .split__switch { margin-left: auto; }
.split__switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--dur) var(--ease);
}
.split__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform var(--dur) var(--ease);
}
.split__toggle[aria-checked="true"] .split__switch { background: var(--green); }
.split__toggle[aria-checked="true"] .split__switch::after { transform: translateX(18px); }
.split__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.split__label { color: var(--muted); font-weight: 600; }
.split__result { margin: 12px 0 0; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.split__result span { color: var(--cappuccino-d); }
.split__hint { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.bill__note { margin: 16px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.bill__note--allergy { margin-top: 8px; color: var(--olive); }
.bill__note:empty { display: none; }

/* Список разделов */
.sections__group { margin: 8px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cappuccino-d); }
.sections__list { margin: 0 0 12px; padding: 0; list-style: none; }
.sections__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 0 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
}
.sections__btn:active { background: var(--surface-2); }
.sections__btn[aria-current="true"] { color: var(--green-d); }
[data-theme="dark"] .sections__btn[aria-current="true"] { color: var(--green); }
.sections__count { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sections__btn .icon { width: 18px; height: 18px; color: var(--muted); }

/* Информация */
.info__list { margin: 0 0 18px; padding: 0; list-style: none; }
.info__item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info__item:last-child { border-bottom: 0; }
.info__item > .icon { margin-top: 2px; color: var(--cappuccino); }
.info__label { display: block; font-size: 13px; color: var(--muted); }
.info__value { display: block; font-weight: 700; overflow-wrap: anywhere; }
.info__value a { color: var(--forest); text-decoration: none; }
.info__value a:active { text-decoration: underline; }
.info__rules { padding: 16px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.info__rules h3 { margin: 0 0 8px; font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--forest); }
.info__rules ul { margin: 0; padding-left: 20px; }
.info__rules li { margin: 6px 0; }
.info__rules p { margin: 10px 0 0; color: var(--olive); font-weight: 600; }
.info__allergy { margin: 14px 0 0; color: var(--olive); font-size: 14px; text-align: center; }

/* Выбор официанта */
.choice { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 52px; padding: 0 8px; border-bottom: 1px solid var(--line); font-weight: 600; text-align: left; }
.choice .icon { color: var(--green-d); visibility: hidden; }
.choice[aria-pressed="true"] .icon { visibility: visible; }

/* Поиск */
.results__count { margin: 16px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.results__cat { margin: 22px 0 10px; font-family: var(--font-serif); font-weight: 600; font-size: 22px; color: var(--forest); }
.results__cat small { font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cappuccino-d); margin-left: 6px; }
.empty { margin: 32px 0 8px; padding: 28px 20px; border-radius: var(--radius); background: var(--surface); text-align: center; }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: var(--cappuccino); }
.empty h2 { margin: 0 0 6px; font-family: var(--font-serif); font-weight: 600; font-size: 24px; color: var(--forest); }
.empty p { margin: 0 0 16px; color: var(--muted); }
mark { background: rgba(169, 201, 106, .55); color: inherit; border-radius: 3px; padding: 0 1px; }
[data-theme="dark"] mark { background: rgba(184, 214, 122, .35); }

/* ---------- Широкие экраны ---------- */
@media (max-width: 359px) {
  .pill-btn__text { display: none; }
  .pill-btn { padding: 0; }
  .topbar__wordmark { width: 84px; height: 13px; }
  .hero__actions .btn { min-width: 0; flex: 1 1 0; }
}
@media (min-width: 600px) {
  :root { --pad: 24px; }
  .hero { padding-top: 16px; padding-bottom: 36px; }
  .hero__logo { width: 260px; }
  .hero__title { font-size: 34px; }
  .section__title { font-size: 32px; }
  .card__media { width: 150px; }
  .bill__meta { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .list:not(.list--compact) { grid-template-columns: 1fr 1fr; gap: 14px; }
  .list--compact { padding: 4px 20px; }
  .sheet { align-items: flex-end; }
  .sheet__panel { border-radius: 24px 24px 0 0; }
}
@media (min-width: 1100px) {
  .list:not(.list--compact) { grid-template-columns: repeat(3, 1fr); }
  .card__media { width: 128px; }
  .segment { flex: 0 1 420px; margin-right: auto; }
  .list--compact { column-count: 2; column-gap: 40px; display: block; }
  .list--compact .row { break-inside: avoid; -webkit-column-break-inside: avoid; }
  .list--compact .row:last-child { border-bottom: 1px solid var(--line); }
}
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line); }
  .chip:hover { box-shadow: inset 0 0 0 1px var(--cappuccino); }
  .chip[aria-current="true"]:hover { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
