/* RestBook — светлая тема с сине-оранжевой айдентикой логотипа.

   Фон страницы белый — по просьбе владельца. Карточки на нём не растворяются
   за счёт тонкой тёплой рамки и мягкой тени: серые линии на белом выглядели бы
   канцелярией. Подложки полей и вторых блоков чуть тёплые, не голубые.
   Синий и оранжевый логотипа не тронуты, к ним добавлен шафран —
   им набраны оценки и орнамент. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --chat-bg: #d8e7f8;          /* обои переписки — спокойный голубой */
  --surface: #ffffff;
  --surface-2: #f7f4f2;
  --line: #e6e1dd;
  --line-soft: #efeae7;
  --ink: #16233f;
  --muted: #6e6663;
  --blue: #1b3f7d;
  --blue-hi: #2f6bff;
  --blue-deep: #0d2350;
  --blue-soft: #e9eefa;
  --blue-text: #1b3f7d;
  --orange: #ff6b1a;
  --orange-hi: #ff8642;
  --amber-soft: #fff0e2;
  --amber-text: #c2560d;
  --saffron: #cf9a34;
  --saffron-soft: #f9eed6;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(46, 32, 14, .08);
  --shadow: 0 2px 6px rgba(46, 32, 14, .05), 0 14px 30px rgba(46, 32, 14, .09);

  /* Rubik держит заголовки и кнопки, Golos Text — весь остальной текст.
     Оба с настоящей кириллицей, а не с латиницей, к которой её пририсовали. */
  /* Гостевая часть набрана одной гарнитурой — Golos Text: так просил владелец
     в макете клиентского аккаунта. Rubik остался только в кабинете ресторана
     (`body.page-partner` ниже) — хостес-панель на нём и построена. */
  --font-display: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-rubik: 'Rubik', 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-text: 'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Кайма атласа: ступенчатые ромбы маргиланского шёлка, набранные
     фирменными цветами — тёмно-синий фон, оранжевый ромб, шафранный по шву.
     Ставится только каймой по краю: над заголовками разделов узора нет,
     там он читался случайной чёрточкой. */
  --ikat-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='16' viewBox='0 0 32 16'%3E%3Crect width='32' height='16' fill='%230d2350'/%3E%3Cpath d='M0 2.4 Q3.8 8 0 13.6 Z' fill='%23cf9a34'/%3E%3Cpath d='M32 2.4 Q28.2 8 32 13.6 Z' fill='%23cf9a34'/%3E%3Cpath d='M16 0.5 Q22.2 8 16 15.5 Q9.8 8 16 0.5 Z' fill='%23ff6b1a'/%3E%3Cpath d='M16 4.3 Q18.7 8 16 11.7 Q13.3 8 16 4.3 Z' fill='%23fbf6ef'/%3E%3Cpath d='M8 5.5 L9.8 8 L8 10.5 L6.2 8 Z' fill='%23cf9a34'/%3E%3Cpath d='M24 5.5 L25.8 8 L24 10.5 L22.2 8 Z' fill='%23cf9a34'/%3E%3Cpath d='M8 1.4 L9 3.1 L7 3.1 Z' fill='%23ff6b1a'/%3E%3Cpath d='M8 14.6 L9 12.9 L7 12.9 Z' fill='%23ff6b1a'/%3E%3Cpath d='M24 1.4 L25 3.1 L23 3.1 Z' fill='%23ff6b1a'/%3E%3Cpath d='M24 14.6 L25 12.9 L23 12.9 Z' fill='%23ff6b1a'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
::selection { background: var(--blue); color: #fff; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 28px; }
/* Заголовки — Rubik: плотнее по трекингу и заметно тяжелее текста,
   чтобы страница читалась голосом, а не ровным серым полотном */
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.02em; }
body.page-partner { --font-display: var(--font-rubik); }
h1 { font-weight: 800; }
h2, h3, h4 { font-weight: 700; }

/* Кайма атласа одной строкой: узкая полоса узора во всю ширину */
.ikat { display: none; }

/* ---------- Шапка ---------- */
/* Под шапкой — узкая кайма атласа во всю ширину: она задаёт странице
   характер один раз и дальше не мешает */
.header { position: sticky; top: 0; z-index: 60; background: var(--bg); border-bottom: 0; }
/* Полосы атласа под шапкой больше нет — владелец попросил убрать узор.
   Токен --ikat-tile оставлен: вернуть полосу — одна строка. */
.header { border-bottom: 1px solid var(--line-soft); }
.header__main { background: var(--bg); }
.header__inner { display: flex; align-items: center; gap: 18px; height: 78px; }

.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo__mark { width: 58px; height: 34px; display: grid; place-items: center; }
.logo__mark svg { width: 100%; height: 100%; }
.logo__mark--sm { width: 40px; height: 24px; flex: none; }
.logo__text { font-weight: 700; font-size: 24px; letter-spacing: -.04em; color: var(--blue); }
.logo em { font-style: normal; color: var(--orange); }

/* Поиск собран как в приложениях: серое поле-плитка, рядом отдельной
   кнопкой фильтры. Общей рамки вокруг них нет — каждый элемент сам по себе. */
.searchbar {
  flex: 1; display: flex; align-items: center; gap: 10px;
  height: 62px; max-width: 1000px; border: 0; padding: 0; background: transparent;
}
.searchbar__field {
  display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 100%;
  flex: 1; min-width: 0; border-radius: 16px;
  /* Полупрозрачная плитка: сквозь неё виден живой фон */
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(22, 35, 63, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.searchbar__field--city { flex: 0 0 30%; }
.searchbar__field svg { width: 19px; height: 19px; color: var(--muted); flex: none; }

/* Кнопка фильтров справа от поля — она заменила кнопку карты:
   карта и так открывается из нижней панели */
/* Кнопка фильтров — единственное цветное пятно в строке поиска */
.searchbar__side {
  flex: none; width: 62px; height: 62px; display: grid; place-items: center;
  border: 0; border-radius: 16px; cursor: pointer;
  background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(27, 63, 125, .28);
}
.searchbar__side:hover { background: var(--blue-hi); color: #fff; }

.searchbar__side.is-on { background: var(--blue); color: #fff; }
.searchbar__side svg { width: 22px; height: 22px; }
.searchbar input { border: 0; outline: none; font: inherit; font-size: 16px; width: 100%; min-width: 0; color: var(--ink); background: transparent; }
.searchbar select {
  border: 0; outline: none; font: inherit; font-size: 16px; width: 100%; min-width: 0; color: var(--ink);
  background: transparent; appearance: none; cursor: pointer; padding-right: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right center; background-size: 13px;
}
.searchbar select option { background: var(--surface); color: var(--ink); }
.searchbar input::placeholder { color: #8b97b1; }
.searchbar .btn { flex: none; }

.header__nav { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.icon-link { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.icon-link:hover { background: var(--bg-soft); }
.icon-link.is-active { background: var(--blue-soft); }
.icon-link.is-active .ic--heart { color: var(--orange); }
.icon-link .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.avatar-chip { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--blue); color: var(--blue-hi); display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; background: var(--surface); }
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px;
  border-radius: 8px; border: 2px solid transparent; background: var(--blue); color: #fff; font-weight: 800;
  font-size: 14px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--blue-hi); }
.btn--ghost { background: transparent; color: var(--blue-hi); border-color: var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); color: var(--blue-deep); }
.btn--quiet { background: var(--surface); color: var(--ink); border-color: var(--line); text-transform: none; letter-spacing: 0; font-weight: 700; }
.btn--quiet:hover { background: var(--surface-2); }
.btn--dark { background: var(--blue-deep); border-color: var(--blue); }
.btn--dark:hover { background: var(--blue); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 12px; }
.btn--block { width: 100%; }
.btn--plain { text-transform: none; letter-spacing: 0; }

/* ---------- Секции ---------- */
.section { padding: 40px 0; }
/* На широком экране тот же случай: между лентой и каталогом хватает половины */
#catalog { padding-top: 18px; }
.section--soft { background: var(--bg-soft); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section__head h2 { margin: 0; font-size: 28px; font-weight: 800; }
.section__head a { font-weight: 700; text-decoration: underline; font-size: 14px; color: var(--blue-text); }
.section__head a:hover { color: var(--blue-hi); }

.row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

/* Подборки главной: лента карточек, которую листают вбок */
.section__sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* ---------- «RestBook рекомендации»: лента широких баннеров ----------
   Фото во всю карточку, слева светлее, справа темнее — на тёмной половине
   стоит название. Соседние баннеры выглядывают по краям, лента едет сама.
   Стили только свои: карточек каталога (.result, .card) это не касается. */
.section--promos { padding-bottom: 6px; }
.section--promos .container { padding-bottom: 0; }
.section__head--plain { margin-bottom: 12px; }
.section__head--plain h2 { font-family: var(--font-text); font-size: 21px; font-weight: 500; letter-spacing: 0; }

.promos {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 28px 4px; scrollbar-width: none;   /* переход рисует slidePromosTo() */
}
.promos::-webkit-scrollbar { display: none; }
.promo-slide {
  position: relative; flex: 0 0 min(560px, calc(100% - 56px));
  aspect-ratio: 22 / 10; border-radius: 16px; overflow: hidden;
  scroll-snap-align: center; display: block; background: var(--surface-2);
}
.promo-slide .photo { width: 100%; height: 100%; object-fit: cover; }
.promo-slide__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 17, 36, .04) 0%, rgba(8, 17, 36, .3) 45%, rgba(8, 17, 36, .74) 100%);
}
.promo-slide__text {
  position: absolute; right: 16px; top: 0; bottom: 0; left: 38%;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  text-align: right; color: #fff;
}
.promo-slide__text b { font-family: var(--font-text); font-size: 20px; font-weight: 500; line-height: 1.2; }
.promo-slide__text i { font-style: normal; font-size: 14px; font-weight: 500; opacity: .92; }
@media (prefers-reduced-motion: reduce) { .promo-slide { transition: none; } }

.rail { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > .card { flex: 0 0 285px; scroll-snap-align: start; }

.promo { border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--blue), var(--blue-deep)); }
.promo .photo { height: 190px; }
.promo__body { padding: 22px; }
.promo__body h3 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; }
.promo__body p { margin: 0 0 18px; color: #cfdcf3; font-size: 15px; }
.promo__body a { font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .05em; color: var(--orange); }
.promo__body a:hover { text-decoration: underline; }

/* ---------- Карточка ресторана ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--line); box-shadow: 0 10px 26px rgba(46, 32, 14, .13); transform: translateY(-3px); }
.card__media { position: relative; aspect-ratio: 16 / 11; background: var(--surface-2); overflow: hidden; }
.card__media .photo { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .3, 1); }
.card:hover .card__media .photo { transform: scale(1.05); }
.card__badges { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge-soft { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--blue); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.badge-soft--top { background: var(--saffron); color: #fff; }
.badge-soft svg { width: 14px; height: 14px; }
.like {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: 0; cursor: pointer; display: grid; place-items: center;
  color: var(--blue); line-height: 1; box-shadow: var(--shadow-sm);
}
.like svg { width: 19px; height: 19px; }
.like:hover { background: #fff; }
.like.is-on { color: var(--orange); }

/* Карточка сжата до трёх строк: название с оценкой, одна строка о заведении
   и подвал со скидкой. Раньше строк было пять, и еда на фото занимала
   меньше места, чем текст про неё. */
.card__body { padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card__name {
  margin: 0; font-family: var(--font-text); font-size: 16.5px; font-weight: 500; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__score {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: #7a5410; background: var(--saffron-soft); border-radius: 7px; padding: 2px 8px 2px 6px;
}
.card__score .ic { width: 14px; height: 14px; color: var(--saffron); }
.card__meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.pill-offer { background: var(--amber-soft); color: var(--amber-text); font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 7px; }
.pill-points { background: var(--amber-soft); color: var(--amber-text); font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 6px; }
.card__bookings { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.card__district { font-size: 12.5px; color: var(--muted); }
.card__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.photo { display: grid; place-items: center; font-size: 56px; }

/* ---------- Каталог ---------- */
.filters__title { font-size: 32px; font-weight: 800; margin: 0 0 6px; }
.filters__sub { margin: 0 0 20px; color: var(--muted); font-size: 15px; }
.filters__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filters__row[hidden] { display: none; }   /* атрибут hidden той же специфичности, что и .filters__row — без этого проигрывал каскаду */
.countries { margin-bottom: 6px; }

.select, .chip {
  height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.select {
  padding-right: 38px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235089ff' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 14px;
}
.select option { background: var(--surface); color: var(--ink); }
.chip:hover { border-color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip .count { min-width: 20px; height: 20px; border-radius: 999px; background: #fff; color: var(--blue); font-size: 12px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }

.results-bar__count { font-size: 14px; color: var(--muted); }
.results-bar__count b { color: var(--ink); }
/* Отступ снизу обязателен: без него плашки фильтров ложатся прямо
   на фото первой карточки */
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 14px; }
.active-filters:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-text); font-size: 13px; font-weight: 700; }
.tag button { background: none; border: 0; cursor: pointer; color: inherit; font-size: 15px; line-height: 1; padding: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 22px; padding-bottom: 50px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; }

/* ---------- Панель фильтров ---------- */
/* Полоса в две строки: выбор визита сверху, фильтры под ним */
/* ---------- Вкладки-пилюли ----------
   Серая дорожка, выбранная вкладка — белая плитка. Стоят на «Моих бронях». */
.seg-tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 0 0 16px;
}
.seg-tabs__btn {
  border: 0; background: none; border-radius: 11px; padding: 10px 8px; cursor: pointer;
  font-family: var(--font-text); font-size: 14px; font-weight: 500; color: var(--muted);
}
.seg-tabs__btn b { font-weight: 700; opacity: .55; }
.seg-tabs__btn.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
/* Вкладка-ссылка: уводит на свою страницу, поэтому со стрелкой */
.seg-tabs__btn--link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--blue); }
.seg-tabs__btn--link::after { content: '↗'; font-size: 12px; }
.seg-tabs__btn.is-active b { color: var(--blue); opacity: 1; }

/* Полоса фильтров закрыта, пока гость не нажмёт кнопку рядом с поиском */
.toolbar { position: relative; display: none; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 0 6px; }
.toolbar.is-open { display: flex; }
.toolbar__pick { display: flex; }
.toolbar__filters { position: relative; display: flex; align-items: center; gap: 14px; }
.toolbar__scroll { display: flex; align-items: center; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding: 6px 2px; flex: 1; scrollbar-width: none; }
.toolbar__scroll::-webkit-scrollbar { display: none; }
.toolbar__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 8; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
}
.toolbar__arrow .ic { width: 20px; height: 20px; }
.toolbar__arrow--prev { left: -12px; }
.toolbar__arrow--prev .ic { transform: rotate(180deg); }
.toolbar__arrow--next { right: -12px; }

.seg { display: flex; align-items: center; border: 1.5px solid var(--blue); border-radius: 999px; height: 50px; flex: none; background: var(--surface); }
.seg__item { display: flex; align-items: center; gap: 8px; padding: 0 18px; height: 100%; background: none; border: 0; border-right: 1px solid var(--line); font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink); }
.seg__item:last-child { border-right: 0; }
.seg__item .ic { width: 18px; height: 18px; color: var(--muted); }
.seg__item .ic--caret { width: 14px; height: 14px; }
.seg__item.is-set { color: var(--blue-hi); font-weight: 800; }
.seg__item.is-set .ic { color: var(--blue-hi); }

.fbtn {
  display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex: none;
}
.fbtn:hover { border-color: var(--blue); }
.fbtn .ic { width: 19px; height: 19px; color: var(--muted); }
.fbtn .ic--caret { width: 14px; height: 14px; }
.fbtn--primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.fbtn--primary .ic { color: #fff; }
.fbtn--primary:hover { background: var(--blue-hi); }
.fbtn.is-on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.fbtn.is-on .ic { color: var(--blue-hi); }
.fbtn__count { background: var(--blue); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 2px 7px; }
.clear-all { background: none; border: 0; color: var(--blue-hi); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; white-space: nowrap; flex: none; }
.clear-all:hover { text-decoration: underline; }

.fdrop-wrap { position: relative; flex: none; }
.fdrop {
  position: absolute; left: 0; top: calc(100% + 12px); width: 340px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 40; display: none; overflow: hidden;
}
.fdrop.is-open { display: block; }
.fdrop__head { padding: 20px 22px 14px; }
.fdrop__head h4 { margin: 0 0 14px; font-size: 21px; font-weight: 800; }
.fdrop__search { position: relative; }
.fdrop__search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--blue-hi); }
.fdrop__search input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px 0 42px; font: inherit; font-size: 15px; outline: none; background: var(--surface); color: var(--ink); }
.fdrop__search input:focus { border-color: var(--blue); }
.fdrop__list { max-height: 260px; overflow-y: auto; border-top: 1px solid var(--line-soft); padding: 6px 0; }
.fdrop__row { display: flex; align-items: center; gap: 14px; padding: 11px 22px; cursor: pointer; font-size: 16px; position: relative; }
.fdrop__row:hover { background: var(--surface); }
.fdrop__row input { position: absolute; opacity: 0; width: 0; height: 0; }
.fdrop__box { width: 22px; height: 22px; border: 2px solid #b9c4d8; border-radius: 4px; flex: none; display: grid; place-items: center; }
.fdrop__box::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) scale(0); transition: transform .12s; margin-top: -2px; }
.fdrop__row input:checked + .fdrop__box { background: var(--blue); border-color: var(--blue); }
.fdrop__row input:checked + .fdrop__box::after { transform: rotate(-45deg) scale(1); }
.fdrop__foot { border-top: 1px solid var(--line-soft); padding: 16px 22px; display: flex; justify-content: flex-end; }
.fdrop__empty { padding: 18px 22px; color: var(--muted); font-size: 14px; }

.range { padding: 26px 22px 26px; }
.range__track { position: relative; height: 34px; }
.range__line { position: absolute; top: 15px; left: 0; right: 0; height: 4px; background: var(--line); border-radius: 999px; }
.range__fill { position: absolute; top: 15px; height: 4px; background: var(--blue); border-radius: 999px; }
.range input[type=range] { position: absolute; top: 6px; left: 0; width: 100%; margin: 0; background: none; pointer-events: none; appearance: none; height: 22px; }
.range input[type=range]::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; }
.range input[type=range]::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; cursor: pointer; }
.range__values { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); margin-top: 20px; }
.range__bubble {
  position: absolute; top: -30px; transform: translateX(-50%); background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 6px; white-space: nowrap;
}
/* Уголок под подписью — она указывает на свою ручку */
.range__bubble::after {
  content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
/* Две ручки лежат друг на друге: событиям доступны только сами кружки */
.range--pair .range__track { height: 34px; }
.range--pair input[type=range] { pointer-events: none; }
.range--pair input[type=range]::-webkit-slider-thumb { pointer-events: auto; }
.range--pair input[type=range]::-moz-range-thumb { pointer-events: auto; }

/* ---------- Карта ---------- */
.map { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.map__canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
#ymap { width: 100%; height: 100%; }
.map__pins { position: absolute; inset: 0; }
.pin { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 1; }
.pin:hover { z-index: 6; }
.pin__rating { background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 5px; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); line-height: 1.3; }
.pin__off { background: var(--orange); color: #fff; font-size: 11.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; margin-top: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.pin.is-active .pin__rating { background: var(--blue); color: #fff; transform: scale(1.16); box-shadow: 0 4px 14px rgba(27, 63, 125, .45); }
.pin__card {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  overflow: hidden; display: none; z-index: 8;
}
.pin:hover .pin__card { display: block; }
.pin.is-below .pin__card { bottom: auto; top: calc(100% + 8px); }
/* Фото заведения в подсказке на карте */
.pin__photo { height: 120px; background: var(--surface-2); }
.pin__photo .photo { width: 100%; height: 100%; object-fit: cover; font-size: 34px; }
.pin__body { padding: 10px 12px 12px; }
.pin__card h4 { margin: 0 0 4px; font-size: 14px; }
.pin__card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.pin__offer { margin-top: 5px !important; color: var(--blue-text); font-weight: 700; }
.map__zoom { position: absolute; right: 14px; top: 14px; display: grid; gap: 8px; z-index: 10; }
.map__zoom button { width: 38px; height: 38px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 19px; font-weight: 700; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.map__zoom button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.results-layout { display: grid; grid-template-columns: 1fr 46%; gap: 26px; align-items: start; padding-bottom: 50px; }
/* На широком экране список слева, карта справа — независимо от порядка в разметке */
.results-sheet { grid-column: 1; grid-row: 1; }
.results-map { grid-column: 2; grid-row: 1; position: sticky; top: 108px; height: calc(100vh - 150px); border-radius: var(--radius); overflow: hidden; }
.sheet-grab { display: none; }
/* Квадратная кнопка карты в строке поиска — нужна там, где карта прячется за шторкой */
.results-list { display: grid; gap: 16px; }
/* Строку «найдено N» со списком сортировки убрали — правило осталось на случай,
   если в шторку когда-нибудь вернут заголовок */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.link-underline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-decoration: underline; color: var(--muted); }
.link-underline:hover { color: var(--ink); }

.result { display: grid; grid-template-columns: 220px minmax(0, 1fr); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); position: relative; transition: box-shadow .2s ease, border-color .2s ease; }
.result:hover { border-color: var(--line); box-shadow: 0 8px 22px rgba(46, 32, 14, .12); }
.result__media { position: relative; min-height: 180px; overflow: hidden; }
.result__media .photo { width: 100%; height: 100%; object-fit: cover; }
.result__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
/* Кухня и часы работы — одной строкой: карточка иначе вытягивается,
   а размер владелец просил держать таким же, как в референсе */
.result__line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.result__line .result__meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__line .result__hours { flex: none; white-space: nowrap; }
.badge-soft--offer { background: var(--orange); color: #fff; }
/* Сердечко висит в правом верхнем углу карточки и перекрывало бы оценку —
   поэтому в списке освобождаем под него место */
.result__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-right: 42px; }
/* Название заведения набираем текстовым шрифтом: Rubik 700/800 здесь
   выглядел слишком жирно — владелец просил как в референсе */
.result__top h3 { margin: 0; font-family: var(--font-text); font-size: 18px; font-weight: 500; }
.result__meta { margin: 0; font-size: 14px; color: var(--muted); }
.tag-fixed { font-style: normal; font-size: 11px; font-weight: 700; color: var(--blue-text); background: var(--blue-soft); padding: 2px 6px; border-radius: 5px; }
.result__hours { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--muted); }
.result__hours .ic, .card__hours .ic { width: 15px; height: 15px; flex: none; }
.card__hours { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 13px; color: var(--muted); }
.card__hours .ic { width: 14px; height: 14px; }
.result__pills { display: flex; gap: 8px; flex-wrap: wrap; }
.result__pills:empty { display: none; }

/* Нижняя строка карточки: звонок, расстояние и бронирование.
   Кнопка брони — оранжевая: это единственное действие карточки,
   и она должна читаться с одного взгляда. */
.result__act { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 10px; }

/* «Здесь был друг» — тихая строка под кнопками карточки: своё фото друга
   и одна фраза. Появляется только когда друзья действительно тут бывали. */
.result__friend {
  display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--muted);
}
.result__friend-ph { flex: none; display: inline-flex; }
.result__friend-ph img,
.result__friend-ph i {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--card); margin-left: -7px;
  display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700;
  background: var(--blue-soft); color: var(--blue-text);
}
.result__friend-ph > :first-child { margin-left: 0; }
.act-icon {
  flex: none; width: 46px; height: 46px; border: 1.5px solid var(--line);
  border-radius: 12px; display: grid; place-items: center; color: var(--blue);
  background: var(--surface);
}
.act-icon:hover { border-color: var(--blue); background: var(--blue-soft); }
.act-icon .ic { width: 21px; height: 21px; }
.act-far {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 46px;
  padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.act-far .ic { width: 16px; height: 16px; color: var(--blue); }
.btn.act-book {
  flex: 1; min-width: 0; height: 46px; padding: 0 18px; border-radius: 12px;
  background: var(--orange); border-color: transparent;
  font-size: 14.5px; letter-spacing: .01em; text-transform: none;
}
.btn.act-book:hover { background: var(--orange-hi); }
/* Времена — одной строкой без подписей со скидкой: процент уже стоит
   плашкой выше, повторять его на каждой кнопке незачем */
.slotbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.slotbar__btn { background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 8px 13px; font-family: var(--font-display); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.slotbar__btn:hover { background: var(--blue-hi); }

/* ---------- Модальное окно ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 30, 66, .38); }
.modal__panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(470px, 100%); background: var(--surface); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.modal__head, .modal__foot { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal__head { border-bottom: 1px solid var(--line-soft); }
.modal__foot { border-top: 1px solid var(--line-soft); }
.modal__head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.modal__body { padding: 4px 24px 24px; overflow-y: auto; flex: 1; }
.modal__close { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; }
.fieldset { padding: 20px 0; border-bottom: 1px solid var(--line-soft); }
.fieldset:last-child { border-bottom: 0; }
.fieldset h4 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
/* Атрибут hidden той же силы, что и правило выше, — без этого он проигрывает
   каскаду и спрятанный список всё равно виден */
.checks[hidden], .field[hidden] { display: none; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check span { display: inline-flex; align-items: center; height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 700; cursor: pointer; }
.check input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.switch-row p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.switch { position: relative; width: 48px; height: 27px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #cfd7e6; border-radius: 999px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 21px; height: 21px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + i { background: var(--blue); }
.switch input:checked + i::after { transform: translateX(21px); }

/* ---------- Иконки, хлебные крошки ---------- */
.ic { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic--heart { width: 24px; height: 24px; color: var(--blue-hi); }

.crumbs { display: flex; align-items: center; gap: 8px; padding: 18px 0 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--blue-text); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .ic { width: 16px; height: 16px; }

/* ---------- Профиль ресторана ---------- */
.rest-fav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.rest-fav .ic { width: 24px; height: 24px; }
.rest-fav:hover { border-color: var(--blue); }
.rest-fav.is-on { color: var(--blue-hi); border-color: var(--blue); }

/* Избранное и «Поделиться» держатся парой у правого края заголовка */
.rest-acts { display: flex; gap: 10px; flex: none; }

/* Кнопка «Поделиться» повторяет вид избранного */
.rest-share { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.rest-share .ic { width: 22px; height: 22px; }
.rest-share:hover { border-color: var(--blue); color: var(--blue-hi); }

/* Своё окно «Поделиться» — там, где системного меню браузер не даёт */
.share-panel { max-width: 460px; }
.share-sub { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.share-nets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.share-net { display: grid; justify-items: center; gap: 9px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.share-net:hover { border-color: var(--blue); background: var(--blue-soft); }
.share-net__ic svg { width: 40px; height: 40px; display: block; }
.share-link { display: flex; gap: 10px; }
.share-link input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14px; font-family: inherit; }
.share-link .btn { flex: none; }
/* ---------- Под фото: состояние, факты, адрес и телефон ----------
   Раньше здесь стоял столбик из четырёх строк со значками — он занимал
   первый экран целиком, а еда уходила под сгиб. */

/* Живая строка: работает ли заведение прямо сейчас (по Ташкенту) */
.rstate {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0;
  font-size: 14.5px; font-weight: 600; color: var(--blue-text);
}
.rstate i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.rstate.is-soon { color: var(--orange); }
.rstate.is-shut { color: var(--muted); }

/* Кухня · чек · район — одной строкой, без столбика значков */
.rfacts { margin: 6px 0 0; font-size: 15px; color: #47567a; }
.rfacts span + span::before { content: ' · '; color: var(--line); }

/* Снимки гостей на странице заведения */
.gposts { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.gposts::-webkit-scrollbar { display: none; }
.gpost { position: relative; flex: none; width: 132px; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.gpost img, .gpost video { width: 100%; height: 100%; object-fit: cover; }
.gpost__who {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 7px; color: #fff; font-size: 11.5px; font-weight: 700;
  background: linear-gradient(180deg, rgba(8,17,36,0), rgba(8,17,36,.78));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Подписчики заведения: число слева, кнопка справа */
.rfollow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0 0; }
.rfollow__count { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); font: inherit; font-size: 14px; }
.rfollow__count b { font-family: var(--font-display); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rfollow__count span { color: var(--muted); }
.rfollow__count:hover b { color: var(--blue); }

/* Адрес и телефон — не подписи, а действия: строку жмут */
.rlinks { margin: 16px 0 4px; border-top: 1px solid var(--line-soft); }
.rlink {
  display: flex; align-items: center; gap: 12px; padding: 13px 2px;
  border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 15px;
}
.rlink:hover { color: var(--blue); }
.rlink__ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--blue); }
.rlink__ic .ic { width: 18px; height: 18px; }
.rlink__text { flex: 1; min-width: 0; }
.rlink__go { flex: none; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--blue-hi); }

/* Клавиатуре нужно видеть, где она стоит: на фото системная рамка теряется */
.rlink:focus-visible, .rhero__all:focus-visible,
.rhero__acts .rest-fav:focus-visible, .rhero__acts .rest-share:focus-visible {
  outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 12px;
}
.chip-soft { background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--muted); }


/* Один крупный кадр, который листают вбок */
.rhero { position: relative; margin: 6px 0 4px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.rhero__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rhero__track::-webkit-scrollbar { display: none; }
.rhero__slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; aspect-ratio: 16 / 9; }
.rhero .photo { width: 100%; height: 100%; object-fit: cover; }
.rhero img.photo--img { cursor: zoom-in; }
/* ---------- Фото-герой страницы заведения ----------
   Кадр во всю ширину, на нём — название, оценка и кнопки. Затемнение
   синее (тон --ink), а не чёрное: чёрное по тёплой еде даёт грязь. */
.rhero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 17, 36, .46) 0%, rgba(8, 17, 36, 0) 26%),
    linear-gradient(0deg, rgba(8, 17, 36, .82) 0%, rgba(8, 17, 36, .34) 22%, rgba(8, 17, 36, 0) 46%);
}
.rhero__badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.rhero__acts { position: absolute; right: 14px; top: 14px; display: flex; gap: 8px; }
.rhero__acts .rest-fav, .rhero__acts .rest-share {
  width: 42px; height: 42px; border: 0; background: rgba(255, 255, 255, .93);
  color: #16233f; box-shadow: var(--shadow-sm);
}
.rhero__acts .rest-fav.is-on { color: var(--orange); }

.rhero__title { position: absolute; left: 18px; right: 18px; bottom: 16px; color: #fff; }
.rhero__title h1 {
  margin: 0; font-family: var(--font-text); font-size: clamp(26px, 6.4vw, 40px);
  font-weight: 500; line-height: 1.08;
  letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 2px 18px rgba(8, 17, 36, .45);
}
.rhero__score {
  display: flex; align-items: baseline; gap: 10px; margin: 8px 0 0;
  padding-right: 104px;                    /* место под счётчик кадров */
  font-size: 13.5px; color: rgba(255, 255, 255, .82); white-space: nowrap;
}
.rhero__score b { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #fff; }
.rhero__score b .ic { width: 16px; height: 16px; color: var(--saffron); }

.rhero__count {
  position: absolute; right: 14px; top: 14px; padding: 5px 11px; border-radius: 999px;
  background: rgba(13, 35, 80, .6); color: #fff; font-family: var(--font-display);
  font-size: 13px; font-weight: 600; backdrop-filter: blur(6px);
}
.rhero__count b { font-weight: 700; }
.rhero__all {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .93);
  /* Кнопки на фото не следуют теме: они всегда лежат на снимке, и в тёмной
     теме светлый значок на белом кружке пропадал */
  color: #16233f; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.rhero__all .ic { width: 17px; height: 17px; }
.rhero__all b { font-weight: 800; }
.rhero__all:hover { background: #fff; }
/* Настоящие фото открываются на весь экран */


/* ---------- Просмотр фото на весь экран ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center;
  background: rgba(8, 14, 30, .93); padding: 24px;
}
.lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1200px, 94vw); max-height: 88vh; width: auto; height: auto;
  object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; border-radius: 999px;
  backdrop-filter: blur(4px); line-height: 1;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.lightbox__close { top: 18px; right: 20px; width: 44px; height: 44px; font-size: 30px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }
.lightbox__count {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13.5px; font-weight: 700; background: rgba(255, 255, 255, .14);
  padding: 7px 14px; border-radius: 999px; font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

.booking { position: sticky; top: 112px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.booking__head { position: relative; padding: 26px 24px 18px; background: var(--surface-2); }
.booking__head h3 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.booking__head p { margin: 0; font-size: 14px; color: var(--muted); }
.stepper { display: flex; align-items: center; background: var(--blue-soft); border-radius: 999px; margin: 18px 24px 0; overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.panel > [data-stepper] .stepper { margin: 0 0 18px; }
.stepper__item { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--blue-text); background: none; border: 0; cursor: pointer; }
/* Значок шага крупнее подписи и на светлом фоне сидит в белом кружке —
   так полоса шагов читается с одного взгляда */
.stepper__item .ic { width: 22px; height: 22px; }
.stepper__item:not(.is-active) .ic {
  width: 30px; height: 30px; padding: 4px; box-sizing: border-box;
  background: var(--surface); border-radius: 999px; box-shadow: 0 1px 2px rgba(20, 40, 80, .10);
}
.stepper__item { padding: 8px 12px; }
.stepper__item.is-active { padding: 8px 16px; }
.stepper__item.is-active { background: var(--blue); color: #fff; border-radius: 999px; }
.stepper__arrow { color: var(--blue-text); display: grid; place-items: center; width: 16px; height: 16px; opacity: .8; }
.booking__body { padding: 20px 24px 24px; }
.booking__label { font-size: 13px; font-weight: 800; margin: 0 0 10px; }

/* Полоса дат */
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day { min-width: 62px; padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: center; color: var(--ink); flex: none; }
.day:hover { border-color: var(--blue); }
.day b { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.day small { display: block; font-size: 11.5px; color: var(--muted); }
.day.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.day.is-active small { color: #cfdcf3; }

/* Выбор числа гостей */
.guests { display: flex; flex-wrap: wrap; gap: 8px; }
.guest { width: 48px; height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 800; font-size: 15px; cursor: pointer; color: var(--ink); }
.guest:hover { border-color: var(--blue); }
.guest.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.booking__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.booking__summary { background: var(--blue-soft); color: var(--blue-text); border-radius: 10px; padding: 13px 15px; font-size: 13.5px; margin-bottom: 16px; }
.booking__summary b { color: var(--blue-deep); }
/* Подсказка вместо кнопки, пока не выбраны дата, время и гости */
.booking__pick { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-soft); margin-top: 28px; overflow-x: auto; }
.tab {
  position: relative; background: none; border: 0; padding: 14px 14px 16px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--blue); }
/* Полоса под активной вкладкой — одна на весь ряд, она переезжает.
   Раньше у каждой кнопки была своя: подчёркивание возникало на новом месте. */
.tabs { position: relative; }
.tabs__ink {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  border-radius: 3px 3px 0 0; background: var(--blue);
  transition: transform .38s cubic-bezier(.2, .85, .2, 1), width .38s cubic-bezier(.2, .85, .2, 1);
}
.tabs:has(.tabs__ink) .tab.is-active::after { content: none; }
.tab.is-active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--blue);
}
.tab-panel { display: none; padding: 28px 0 56px; }
.tab-panel.is-active { display: block; }

/* Профиль ресторана: разделы идут сплошной лентой, полоса вкладок липнет
   к шапке и сама подсвечивает тот раздел, до которого дошла прокрутка */
.tabs--sticky { position: sticky; top: 108px; z-index: 20; background: var(--bg); }
.rest-flow .tab-panel { display: block; padding: 26px 0 34px; border-top: 1px solid var(--line-soft); }
.rest-flow .tab-panel:first-child { border-top: 0; }
.rest-phone { font-weight: 700; color: var(--blue-text); }

.layout-2 { display: grid; grid-template-columns: 1fr 350px; gap: 34px; align-items: start; }

/* Страница ресторана: слева карточка и вкладки, справа бронирование во всю высоту */
.rest-layout__head { grid-column: 1; grid-row: 1; }
.rest-layout__aside { grid-column: 2; grid-row: 1 / span 2; }
.rest-layout__tabs { grid-column: 1; grid-row: 2; }
.panel { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.panel h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.panel--green { background: var(--blue-soft); border-color: var(--blue); }

.rsection { padding: 8px 0 34px; }
.rsection > h2 { font-size: 28px; font-weight: 800; margin: 0 0 18px; }
.offer-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; cursor: pointer; }
.offer-row__icon { width: 46px; height: 46px; border-radius: 10px; background: var(--blue-soft); color: var(--blue-hi); display: grid; place-items: center; flex: none; }
.offer-row__icon .ic { width: 26px; height: 26px; }
.offer-row__main { flex: 1; }
.offer-row__main h4 { margin: 0 0 3px; font-size: 17px; font-weight: 800; }
.offer-row__main p { margin: 0; font-size: 14.5px; color: var(--muted); }
.offer-row .ic--chevron { width: 20px; height: 20px; color: var(--muted); }

.info-card { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; margin: 20px 0 26px; background: var(--surface); }
.info-card__row { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.info-card__row:last-child { border-bottom: 0; }
.info-card__row .ic { width: 24px; height: 24px; color: var(--blue-hi); }
.info-card__row h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.info-card__row p { margin: 0; font-size: 14px; color: var(--muted); }
.info-card__row > div { flex: 1; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; margin: 22px 0 26px; }
.info-grid__item { display: flex; gap: 14px; align-items: flex-start; }
.info-grid__item .ic { width: 24px; height: 24px; color: var(--blue-hi); margin-top: 2px; }
.info-grid__item h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.info-grid__item p { margin: 0; font-size: 14px; color: var(--muted); }

.menu-nav { display: flex; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.menu-nav a { font-size: 15px; font-weight: 700; text-decoration: underline; white-space: nowrap; padding: 6px 10px; border-radius: 999px; color: var(--blue-text); }
.menu-nav a.is-active { background: var(--blue-soft); color: var(--blue); }

.photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 26px; }
.photo-strip .photo { height: 150px; border-radius: 10px; }
.food-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0 30px; }
.food-grid > * { position: relative; border-radius: 10px; overflow: hidden; }
.food-grid .photo { height: 118px; }
.food-grid__more { position: absolute; inset: 0; background: rgba(15, 30, 66, .55); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }

.dish { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding: 14px 0; }
.dish__name { font-size: 16.5px; font-weight: 600; }
.dish__price { font-size: 16px; font-weight: 700; white-space: nowrap; color: var(--blue-hi); }
.dish__desc { grid-column: 1 / -1; margin: 0; font-size: 14.5px; color: var(--muted); }
.dish-group { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.dish-group h3 { font-size: 22px; font-weight: 800; margin: 22px 0 6px; }

/* Папки меню у гостя: плитки в два столбца, внутри папки товары идут в один */
.menu-folders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.menu-folder {
  display: grid; gap: 4px; padding: 0 0 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--surface); color: var(--ink); font: inherit;
}
.menu-folder:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.menu-folder img, .menu-folder__emoji {
  width: 100%; height: 132px; object-fit: cover; display: grid; place-items: center;
  background: var(--surface-2); font-size: 38px; margin-bottom: 10px;
}
.menu-folder__name { padding: 0 14px; font-size: 16px; font-weight: 800; }
.menu-folder__count { padding: 0 14px; font-size: 13px; color: var(--muted); }

.slots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.slot { position: relative; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 14px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--ink); }
.slot:hover { border-color: var(--blue); }
.slot.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.slot em { position: absolute; top: -9px; right: -9px; font-style: normal; background: var(--blue-soft); color: var(--blue-text); font-size: 11px; font-weight: 800; padding: 2px 6px; border-radius: 6px; }

/* ---------- Рулетка времени ----------
   Барабан как в мобильных приложениях: список крутится, выбранным считается
   то время, что стоит в рамке по центру. Высота рамки и подкладок сверху
   и снизу связаны: подкладка = (высота окна − высота строки) / 2, иначе
   первое и последнее время не встают в центр. */
.wheel { position: relative; margin-top: 10px; }
.wheel__band {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 52px; border-radius: 12px; background: var(--blue-soft);
  border: 1px solid var(--blue); pointer-events: none;
}
.wheel__cols { display: flex; align-items: center; justify-content: center; gap: 2px; }
/* Двоеточие рисуем поверх рамки: она лежит слоем выше обычного текста */
.wheel__colon { position: relative; font-size: 22px; font-weight: 800; color: var(--blue-text); line-height: 1; }
.wheel__scroll {
  flex: 0 0 88px;
  position: relative; height: 208px; overflow-y: auto; scroll-snap-type: y mandatory;
  overscroll-behavior: contain;         /* докрутили до края — страница под рулеткой не едет */
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.wheel__scroll::-webkit-scrollbar { display: none; }
.wheel__pad { height: 78px; }
.wheel__item {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; scroll-snap-align: center; scroll-snap-stop: always;
  border: 0; background: none; cursor: pointer; font: inherit;
  font-size: 17px; font-weight: 700; color: var(--muted);
  transition: color .15s ease, font-size .15s ease;
}
.wheel__item.is-active { color: var(--blue-text); font-size: 22px; font-weight: 800; }
/* Скидка на выбранное время — строкой под рулеткой: в узкой колонке ей не место */
.wheel__offer {
  margin: 8px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: var(--orange);
}
.wheel__offer:empty { display: none; }

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; font: inherit;
  font-size: 14px; background: var(--surface-2); color: var(--ink); outline: none;
}
.field textarea { height: auto; padding: 11px 13px; min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field select option { background: var(--surface-2); }
.notice { background: var(--blue-soft); border-radius: 10px; padding: 15px 17px; font-size: 14px; margin-top: 15px; color: var(--blue-text); }
.notice b { color: var(--blue-deep); }
.notice--private { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; }
.notice--private .ic { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 1px; }

/* Предупреждение: тем же блоком, но янтарным — например «Telegram отклонил сообщение» */
.notice--warn { display: flex; align-items: flex-start; gap: 10px; background: var(--amber-soft); color: var(--amber-text); }
.notice--warn .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Подключение Telegram идёт по шагам: пройденные бледнеют, будущие ждут своей очереди */
.tg-step { border-top: 1px solid var(--line-soft); padding: 18px 0 4px; }
.tg-step:first-of-type { border-top: 0; padding-top: 4px; }
.tg-step h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 15.5px; }
.tg-step p.muted { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; }
.tg-step__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 13px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.tg-step.is-now .tg-step__n { background: var(--blue); color: #fff; }
.tg-step.is-done .tg-step__n { background: var(--blue-soft); color: var(--blue); }
.tg-step.is-off { opacity: .55; }
.tg-step .list-card { margin-bottom: 12px; }
.tg-list { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 7px; font-size: 14px; line-height: 1.5; }

/* ---------- Отзывы ---------- */
.reviews-summary { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; margin-bottom: 22px; }
.score-star { display: flex; align-items: baseline; gap: 8px; }
.score-star .ic { width: 26px; height: 26px; color: var(--blue-hi); align-self: center; }
.score-star b { font-size: 40px; font-weight: 800; line-height: 1; }
.score-star span { font-size: 15px; color: var(--muted); }
.score-word b { display: block; font-size: 17px; font-weight: 800; }
.score-word span { font-size: 14px; color: var(--muted); }
.metrics { display: flex; gap: 30px; flex-wrap: wrap; }
.metric { min-width: 130px; }
.metric h5 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.metric__line { display: flex; align-items: center; gap: 10px; }
.metric__bar { flex: 1; height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.metric__bar i { display: block; height: 100%; background: var(--blue); }
.metric span { font-size: 14px; font-weight: 600; }

.banner-green { background: var(--blue-soft); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; margin: 22px 0 28px; }
.banner-green .ic { width: 22px; height: 22px; color: var(--blue-hi); margin-top: 1px; }
.banner-green h4 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--blue-deep); }
.banner-green p { margin: 0 0 8px; font-size: 14px; color: var(--blue-text); }
.banner-green a { font-weight: 700; text-decoration: underline; display: inline-flex; align-items: center; gap: 6px; color: var(--blue); }
.banner-green a .ic { width: 16px; height: 16px; color: currentColor; }

.review-filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0 20px; }
.review { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); color: var(--blue-hi); display: grid; place-items: center; font-weight: 800; }
.review__avatar .ic { width: 22px; height: 22px; }
.review__name { font-size: 16px; font-weight: 600; }
.review__sub { font-size: 13px; color: var(--muted); }
.review__score { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.review__score .ic { width: 17px; height: 17px; color: var(--blue-hi); }
.review__score span { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.review__text { margin: 0 0 10px; font-size: 15px; }

/* Снимки в отзыве и полоса выбора снимков в форме — один и тот же квадрат 78px */
.review__shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.review__shot {
  width: 78px; height: 78px; padding: 0; border: 0; border-radius: 12px;
  overflow: hidden; cursor: zoom-in; background: var(--line-soft);
}
.review__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rvphotos { display: flex; flex-wrap: wrap; gap: 8px; }
.rvphotos__one { position: relative; width: 78px; height: 78px; border-radius: 12px; overflow: hidden; display: block; }
.rvphotos__one img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rvphotos__off {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(11, 31, 71, .72); color: #fff; font-size: 15px; line-height: 1;
}
.rvphotos__add {
  width: 78px; height: 78px; border: 1px dashed var(--line); border-radius: 12px; cursor: pointer;
  background: none; color: var(--muted); display: grid; place-items: center; gap: 2px;
  font: inherit; font-size: 11px;
}
.rvphotos__add svg { width: 20px; height: 20px; }
.review__helpful { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: underline; padding: 0; color: var(--ink); }
.review__helpful .ic { width: 18px; height: 18px; }
.review__reply { border-left: 3px solid var(--line); padding: 4px 0 4px 16px; margin: 14px 0 0 8px; }
.review__reply-head { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.review__reply-head .ic { width: 20px; height: 20px; color: var(--muted); }
.review__reply p { margin: 0; font-size: 14.5px; color: #384766; }

.info-list { display: grid; gap: 14px; }
.info-list div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; font-size: 14px; }
.info-list dt { color: var(--muted); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: var(--blue-soft); color: var(--blue-text); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; }

/* ---------- Профиль клиента ---------- */
/* ---------- Кабинет гостя ----------
   Страница отвечает на два вопроса: кто я здесь и что мне поменять.
   Поэтому сверху — карточка «я», под ней короткий портрет по броням,
   и только потом настройки. Раньше первым экраном была форма из полей. */
/* Кабинет — колонка, а не разворот: на широком экране строки настроек
   иначе растягиваются на всю ширину и читаются хуже */
.profile-page { max-width: 860px; }
.profile-head { display: block; padding: 22px 0 8px; }

.pcard { display: flex; align-items: center; gap: 18px; }
.pcard__avatar {
  position: relative; flex: none; width: 86px; height: 86px; border-radius: 50%;
  background: var(--surface-2); color: var(--blue-hi); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 28px; font-weight: 800; cursor: pointer;
}
/* Кружок режет только фотографию: значок камеры висит снаружи, и обрезать его нельзя */
.pcard__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pcard__cam {
  position: absolute; right: -4px; bottom: -4px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--blue); color: #fff; display: grid; place-items: center;
  border: 3px solid var(--bg); overflow: visible;
}
.pcard__cam .ic { width: 15px; height: 15px; }
.pcard__avatar:hover .pcard__cam { background: var(--blue-hi); }

.pcard__id { min-width: 0; flex: 1; }
/* Имя — текст, а не поле ввода: рамка появляется, только когда его правят */
.pcard__name { display: flex; flex-wrap: wrap; gap: 0 10px; }
.pcard__name input {
  width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; padding: 2px 0;
  border: 0; border-bottom: 2px solid transparent; background: none; outline: none;
  font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--ink);
  field-sizing: content;                       /* поле по длине имени, где браузер умеет */
}
.pcard__name input:focus { border-bottom-color: var(--blue); }
.pcard__page { display: inline-block; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--blue-hi); }
.pcard__page:hover { text-decoration: underline; }
.pcard__meta { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }

/* Портрет гостя по его же броням */
.taste {
  margin: 20px 0 0; padding: 16px 18px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.taste h3 {
  margin: 0 0 6px; font-family: var(--font-text); font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
/* Три значения — кухня, район, время — стоят плитками: так их видно сразу,
   и не нужно склонять названия в предложении */
.taste__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.taste__chips span {
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft);
  font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--ink);
}
.taste__note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.taste--empty p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.taste__nums { display: flex; gap: 18px; margin-top: 10px; font-size: 13.5px; color: var(--muted); }
.taste__nums b { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink); margin-right: 4px; }

/* Настройки строками: одна строка — одно дело */
.pset { margin: 18px 0 6px; border-top: 1px solid var(--line-soft); }
.pset__row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 2px; border-bottom: 1px solid var(--line-soft); font-size: 15px;
}
/* Выход — не действие дня: оранжевый здесь спорил бы с кнопкой брони */
.pset__out {
  display: block; width: 100%; padding: 14px 2px; border: 0; background: none;
  font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; text-align: left;
}
.pset__out:hover { color: var(--blue); }

/* Ник набран так же, как имя: это часть представления, а не поле анкеты */
.pcard__id .profile-nick { margin-top: 2px; }
.pcard__id .profile-nick input {
  border: 0; border-bottom: 2px solid transparent; background: none; outline: none;
  padding: 2px 0; font: inherit; font-size: 15px; font-weight: 500; color: var(--blue-text);
  field-sizing: content; min-width: 90px;
}
.pcard__id .profile-nick input:focus { border-bottom-color: var(--blue); }
.profile-avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--surface-2); color: var(--blue-hi); display: grid; place-items: center; font-size: 30px; font-weight: 800; overflow: hidden; border: 2px solid var(--blue); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-head__name { display: flex; gap: 10px; flex-wrap: wrap; }
.profile-head__name input { height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 16px; font-weight: 800; width: 200px; outline: none; background: var(--surface); color: var(--ink); }
.profile-head__name input:focus { border-color: var(--blue); }
.profile-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.points-card { background: linear-gradient(140deg, var(--blue), var(--blue-deep)); color: #fff; border-radius: var(--radius); padding: 26px; display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.points-card__num { font-size: 40px; font-weight: 800; line-height: 1; }
.points-card small { opacity: .85; }
.points-card .btn { background: #fff; color: var(--blue-deep); }
.points-card .btn:hover { background: var(--orange); color: #fff; }
.progress { height: 8px; background: rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; margin-top: 12px; width: 100%; }
.progress i { display: block; height: 100%; background: #fff; }

.list-card { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.list-row { display: flex; align-items: center; gap: 15px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); display: grid; place-items: center; font-size: 19px; flex: none; }
.list-row__main { flex: 1; min-width: 0; }
.list-row__main h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.list-row__main p { margin: 0; font-size: 13px; color: var(--muted); }
.list-row__side { text-align: right; font-weight: 800; font-size: 14px; white-space: nowrap; }
.list-row__side small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }

/* Связка стола RestBook ↔ номер того же стола в iiko — узкое поле в строке списка */
.ik-map-input { flex: none; width: 84px; text-align: center; padding: 9px 6px; border-radius: 10px;
  border: 1px solid var(--line-soft); background: var(--bg); font: inherit; color: inherit; }

.section-title { font-size: 22px; font-weight: 800; margin: 32px 0 14px; }
/* Подзаголовок внутри раздела — «Снимки гостей» во вкладке отзывов */
.section-title--sub { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.muted { color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.gift-card { border-radius: var(--radius); padding: 22px; color: #fff; background: linear-gradient(140deg, var(--blue), #0d2a66); display: flex; flex-direction: column; justify-content: space-between; min-height: 150px; }
.gift-card--dark { background: linear-gradient(140deg, var(--ink), #050d21); }
.gift-card b { font-size: 26px; }
.gift-card small { opacity: .85; }

.faq { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary { padding: 17px 19px; cursor: pointer; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--blue-hi); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 19px 17px; color: var(--muted); font-size: 14px; }

/* ---------- Нижняя плашка ---------- */
.newsbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--surface); border-top: 1px solid var(--line); }
.newsbar__inner { display: flex; align-items: center; gap: 18px; padding: 14px 28px; max-width: 1320px; margin: 0 auto; }
.newsbar__text { flex: 1; font-size: 14.5px; }
.newsbar__text a { text-decoration: underline; font-weight: 700; color: var(--blue-text); }
.newsbar__close { background: none; border: 0; font-size: 22px; color: var(--muted); cursor: pointer; line-height: 1; }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 32px 0 90px; color: var(--muted); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a:hover { color: var(--blue-hi); }

/* ---------- Уведомление ---------- */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(16px); background: var(--blue);
  color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 700; opacity: 0;
  pointer-events: none; transition: all .2s ease; z-index: 200; box-shadow: var(--shadow);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
/* В кабинете тост стоит в правом нижнем углу и не спорит с планом зала */
body.page-partner .toast {
  left: auto; right: 26px; bottom: 26px; transform: translateY(14px) scale(.96);
  background: #0d2350; border-radius: 14px; padding: 13px 18px;
}
body.page-partner .toast.is-on { transform: none; animation: rb-toast .28s cubic-bezier(.2, .7, .3, 1); }

/* Поле даты в форме «Новая бронь»: свой календарь вместо системного окна,
   которое браузер рисует по-своему и стилями его не достать */
.date-pick {
  display: inline-flex; align-items: center; gap: 8px; width: 100%; height: 46px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer;
}
.date-pick:hover { border-color: var(--blue); }
.date-pick .ic { width: 17px; height: 17px; color: var(--muted); }
.date-pick .ic--caret { margin-left: auto; }
.date-pick b { font-weight: 700; }

/* Предложение включить уведомления — карточка снизу, поверх нижней панели */
.pushask {
  position: fixed; left: 12px; right: 12px; bottom: 74px; z-index: 150;
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 30, 66, .18);
  opacity: 0; transform: translateY(14px); transition: opacity .22s ease, transform .22s ease;
  max-width: 520px; margin: 0 auto;
}
.pushask.is-on { opacity: 1; transform: none; }
.pushask__ic {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue);
}
.pushask__ic .ic { width: 20px; height: 20px; animation: rb-swing 3.4s ease-in-out infinite; transform-origin: 50% 15%; }
.pushask__text { flex: 1; min-width: 0; }
.pushask__text b { display: block; font-size: 15px; }
.pushask__text p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.pushask__acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.pushask__acts .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .pushask { flex-wrap: wrap; }
  .pushask__acts { flex-direction: row; width: 100%; }
  .pushask__acts .btn { flex: 1; }
}

/* ---------- Лента друзей ----------
   Карточка на всю ширину: автор, фото или видео, сердце и подпись.
   Ничего лишнего — ленту листают, а не изучают. */
.feed { display: grid; gap: 22px; padding: 14px 0 30px; }
.post { border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; background: var(--surface); }
.post__head { padding: 12px 14px; }
.post__who { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.post__ava {
  width: 38px; height: 38px; border-radius: 50%; flex: none; overflow: hidden;
  background: var(--surface-2); color: var(--blue-hi); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 800;
}
.post__ava img { width: 100%; height: 100%; object-fit: cover; }
.post__who b { display: block; font-size: 14.5px; }
.post__who em {
  display: inline-flex; align-items: center; gap: 4px; font-style: normal;
  font-size: 12.5px; color: var(--muted);
}
.post__who em .ic { width: 13px; height: 13px; }
.post__media { position: relative; background: #0b1220; aspect-ratio: 4 / 3; overflow: hidden; }
/* Заведение подписано прямо на снимке: в ленте это главное, ради чего его смотрят */
.post__place {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  max-width: calc(100% - 20px); padding: 6px 12px; border-radius: 999px;
  background: rgba(13, 35, 80, .62); color: #fff; font-size: 12.5px; font-weight: 600;
  text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post__place svg { width: 14px; height: 14px; flex: none; }
.post__media img, .post__media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.post__foot { display: flex; align-items: center; gap: 18px; padding: 10px 14px 4px; }
.post__like, .post__talk {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 0;
  cursor: pointer; color: var(--ink); font: inherit;
}
.post__like svg, .post__talk svg { width: 24px; height: 24px; }
.post__like.is-on { color: var(--orange); }
.post__like b, .post__talk b { font-family: var(--font-display); font-size: 14px; font-variant-numeric: tabular-nums; }
.post__venue { font-size: 13px; color: var(--blue-hi); font-weight: 600; }
.post__cap { margin: 0; padding: 4px 14px 14px; font-size: 14.5px; line-height: 1.45; }
.post__cap b { margin-right: 6px; }
.ig-view__venue { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--blue-hi); font-weight: 600; }
.ig-view__venue .ic { width: 15px; height: 15px; }

/* ---------- Страница гостя ----------
   Устройство знакомое по соцсетям: фото и числа сверху, лента «актуальных»,
   сетка публикаций. Цвета и шрифты наши — это RestBook, а не копия чужого
   приложения: чужая айдентика превратила бы продукт в подделку. */
.ig-page { padding-bottom: 40px; }
/* Строка друга: по имени и фото уходим на его страницу */
.fr-row__link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; }
.fr-row__link:hover h4 { color: var(--blue); }
.ig-head { padding: 18px 0 4px; }
.ig-head__top { display: flex; align-items: center; gap: 16px; }
.ig-ava {
  position: relative; flex: none; width: 86px; height: 86px; border-radius: 50%;
  border: 0; padding: 0; background: var(--surface-2); color: var(--blue-hi); cursor: pointer;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 26px; font-weight: 800;
}
.ig-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* Есть свежие истории — вокруг фото появляется кольцо */
.ig-ava.has-story::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  background: conic-gradient(from 220deg, #ff6b1a, #cf9a34, #2f6bff, #1b3f7d, #ff6b1a);
  z-index: -1;
}
.ig-ava.has-story { box-shadow: 0 0 0 3px var(--bg); }

/* Числа и подпись стоят слева друг под другом, а не по центру колонки:
   так в макете, и так они выравниваются с именем под ними */
.ig-head__col { flex: 1; min-width: 0; display: grid; gap: 10px; }
.ig-counts { display: flex; justify-content: space-between; gap: 12px; padding-right: 6px; }
.ig-count {
  display: grid; justify-items: start; gap: 1px; border: 0; background: none; padding: 0;
  cursor: pointer; color: var(--ink); font: inherit; text-align: left;
}
.ig-count b { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ig-count span { font-size: 12.5px; color: var(--muted); line-height: 1.2; }

.ig-bio { margin: 0; display: grid; gap: 1px; }
.ig-bio b { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.ig-bio p { margin: 0; font-size: 13px; color: var(--muted); }

.ig-acts { display: flex; gap: 10px; margin: 16px 0 4px; }
/* Кнопки крупнее мелких «sm»: по макету это основной ряд действий страницы */
.ig-acts .btn {
  flex: 1; min-width: 0; height: 44px; border-radius: 14px;
  text-transform: none; letter-spacing: 0; padding: 0 12px; font-size: 14.5px; font-weight: 700;
}
/* Третья кнопка — квадратный плюс: три подписи в строку на телефон не влезают */
.ig-plus {
  flex: none; width: 46px; height: 44px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--blue); color: #fff; font-size: 22px; line-height: 1;
  display: grid; place-items: center;
}
.ig-plus:hover { background: var(--blue-hi); }
.ig-plus svg { width: 18px; height: 18px; }
/* «Поделиться» — тихий квадрат: главное действие здесь «Выложить» */
.ig-plus--quiet { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-soft); }
.ig-plus--quiet:hover { background: var(--blue-soft); color: var(--blue); }

/* Лента «актуальных» */
.ig-hl { display: flex; gap: 16px; overflow-x: auto; padding: 18px 2px 6px; scrollbar-width: none; }
.ig-hl::-webkit-scrollbar { display: none; }
.ig-hl__item { flex: none; width: 74px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 6px; }
.ig-hl__ring {
  width: 66px; height: 66px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--surface-2); color: var(--muted);
}
.ig-hl__ring img { width: 100%; height: 100%; object-fit: cover; }
.ig-hl__ring i { font-style: normal; font-size: 24px; font-weight: 300; }
.ig-hl__item small { font-size: 12px; color: var(--ink); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-hl__add .ig-hl__ring { border-style: dashed; }

/* Вкладки и сетка */
.ig-tabs { display: flex; border-top: 1px solid var(--line-soft); margin-top: 10px; }
.ig-tabs__btn {
  flex: 1; border: 0; background: none; padding: 11px 0 12px; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); border-bottom: 2px solid transparent;
}
.ig-tabs__btn svg { width: 21px; height: 21px; }
.ig-tabs__btn.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 3px; }
.ig-cell { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.ig-cell img, .ig-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-cell__play { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.ig-empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.ig-empty h3 { margin: 0 0 6px; color: var(--ink); }
.ig-empty p { margin: 0 0 14px; font-size: 14px; }
.ig-mini { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* ---------- Страница гостя: детали и движение ----------
   Собрано по образцу хостес-панели: то же семейство анимаций rb-*, те же
   моноширинные цифры и та же сдержанность — двигается только то, что что-то
   значит. Появление страницы идёт каскадом, кольцо историй живёт, пока они
   не сгорели, сетка проявляется по мере прокрутки. */

/* Надзаголовок разделов: один приём на весь аккаунт */
.eyebrow {
  display: block; margin: 0 0 8px; font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted);
}

/* Каскад появления: шаг задаёт --i на самом блоке */
.rb-stage { animation: rb-in .42s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* Кольцо историй крутится, пока истории живы: тот же приём, что у стрелок
   часов в кабинете — крутит CSS, скрипт в это не вмешивается */
.ig-ava.has-story::before { animation: rb-ring 14s linear infinite; }
.ig-ava { transition: transform .16s ease; }
.ig-ava:active { transform: scale(.96); }

/* Числа профиля: моноширинные, чтобы не дрожали, пока считаются */
.ig-count b { font-variant-numeric: tabular-nums; transition: color .18s ease; }
.ig-count:hover b { color: var(--blue-hi); }
.ig-count::after {
  content: ''; display: block; height: 2px; width: 0; margin: 3px 0 0;
  border-radius: 2px; background: var(--orange); transition: width .22s ease;
}
.ig-count:hover::after { width: 22px; }

/* «Ваш вкус» — три плитки по броням гостя */
.ig-taste { margin: 18px 0 2px; }
.ig-taste__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ig-taste__tile {
  display: grid; justify-items: center; gap: 3px; padding: 12px 8px; border-radius: 16px;
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(22, 35, 63, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: center;
  animation: rb-in .5s cubic-bezier(.2, .85, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms);
}
.ig-taste__tile i { font-style: normal; font-size: 19px; line-height: 1; }
.ig-taste__tile b { font-size: 13.5px; font-weight: 700; }
.ig-taste__tile em { font-style: normal; font-size: 11.5px; color: var(--muted); }
:root[data-theme="dark"] .ig-taste__tile { background: var(--surface); backdrop-filter: none; }

/* ---------- Страница заведения по макету клиентского аккаунта ----------
   Кадр 4:3 во всю ширину со скруглённым низом, под ним название, пилюли
   и четыре факта сеткой 2×2. Название с фото ушло: на кадре остались
   только плашки и скидка. */
.rhero { border-radius: 14px; margin: 6px 0 4px; box-shadow: none; }
/* Кадр во всю ширину со скруглённым низом — приём телефонного макета */
@media (max-width: 640px) {
  .rhero { border-radius: 0 0 22px 22px; margin: 0 -18px 0; box-shadow: 0 14px 30px rgba(46, 32, 14, .14); }
}
.rhero__slide { aspect-ratio: 4 / 3; }
.rhero__off {
  position: absolute; left: 18px; bottom: 16px; padding: 5px 11px; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(255, 107, 26, .34);
}

.rtitle { margin: 18px 0 8px; font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }

.rpills { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 12px; }
.rpill {
  padding: 4px 10px; border-radius: 999px; background: rgba(27, 63, 125, .07);
  color: var(--blue); font-size: 12px; font-weight: 500;
}
.rpill--score {
  display: inline-flex; align-items: center; gap: 4px; background: #fff0e2; color: #7a5410;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rpill--score svg { width: 12px; height: 12px; color: var(--saffron); }

.rfacts-grid {
  display: grid; grid-template-columns: 1fr 1fr; margin: 14px 0 20px;
  border-radius: 18px; overflow: hidden;
  background: rgba(255, 255, 255, .86); border: 1px solid rgba(22, 35, 63, .06);
  box-shadow: 0 2px 6px rgba(46, 32, 14, .05);
}
.rfacts-grid > div { padding: 13px 14px; min-width: 0; }
.rfacts-grid > div:nth-child(odd) { border-right: 1px solid rgba(22, 35, 63, .08); }
.rfacts-grid > div:nth-child(-n+2) { border-bottom: 1px solid rgba(22, 35, 63, .08); }
.rfacts-grid span {
  display: block; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #8b8b95;
}
.rfacts-grid b {
  display: block; margin-top: 3px; font-size: 14.5px; font-weight: 700;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
:root[data-theme="dark"] .rfacts-grid { background: var(--surface); }

/* Свободные окна на сегодня */
.rslots { margin: 4px 0 22px; }
.rslots__title { margin: 0 0 11px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.rslots__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.rslot {
  height: 42px; border: 1px solid rgba(22, 35, 63, .12); border-radius: 13px;
  background: rgba(255, 255, 255, .86); color: var(--ink); font: inherit;
  font-size: 13.5px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: transform .16s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.rslot:active { transform: scale(.94); }
.rslot.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Липкая кнопка брони на стеклянной подложке */
/* Липкая кнопка — приём телефонного макета: на широком экране карточка брони
   и так стоит сбоку, второй кнопки поверх страницы там не нужно */
.rbook-bar { display: none; }
@media (max-width: 640px) { .rbook-bar { display: block; } }
.rbook-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 14px 18px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(251, 250, 249, 0) 0%, rgba(251, 250, 249, .9) 40%, rgba(251, 250, 249, .98) 100%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.rbook-bar__btn {
  height: 50px; border: 0; border-radius: 16px; background: var(--orange); color: #fff;
  font-size: 14.5px; font-weight: 700; box-shadow: 0 10px 24px rgba(255, 107, 26, .32);
}
.rbook-bar__btn:hover { background: var(--orange-hi); }
:root[data-theme="dark"] .rbook-bar { background: var(--bg); backdrop-filter: none; }

/* Кнопка «назад» в шапке страницы заведения — вместо логотипа */
.hdr-back {
  flex: none; width: 38px; height: 38px; border: 0; border-radius: 13px; cursor: pointer;
  background: rgba(27, 63, 125, .07); color: var(--blue); display: grid; place-items: center;
  transition: transform .16s ease;
}
.hdr-back:active { transform: scale(.9); }
.hdr-back svg { width: 18px; height: 18px; transform: rotate(180deg); }

/* ---------- Гостевая карта ----------
   Тёмная карточка в том же ключе, что плашка смены в кабинете и карточка
   ближайшего визита: один приём на всю платформу для «главного» блока. */
.gcard {
  position: relative; overflow: hidden; margin: 10px 0 18px; padding: 18px 18px 20px;
  border-radius: 22px; color: #fff;
  background:
    radial-gradient(420px 180px at 84% 8%, rgba(255, 107, 26, .38), transparent 68%),
    linear-gradient(118deg, #0b1f47 0%, #22508f 100%);
  box-shadow: 0 16px 34px rgba(11, 31, 71, .32);
}
.gcard__top { display: flex; align-items: center; gap: 10px; }
.gcard .eyebrow { margin: 0; color: rgba(255, 255, 255, .66); }
.gcard__rank {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .3);
  font-size: 12.5px; font-weight: 700; color: #f6d79a;
}
.gcard__rank svg { width: 13px; height: 13px; color: var(--saffron); }

.gcard__who { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.gcard__ava {
  position: relative; flex: none; width: 56px; height: 56px; border-radius: 16px; overflow: hidden;
  border: 0; padding: 0; cursor: pointer; background: rgba(255, 255, 255, .14);
  display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 700;
}
.gcard__ava img { width: 100%; height: 100%; object-fit: cover; }
.gcard__ava.has-story { box-shadow: 0 0 0 2px var(--orange); }
.gcard__id { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gcard__id b { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.gcard__id em { font-style: normal; font-size: 13px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard__menu {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .13); color: #fff;
}
.gcard__menu span { background: #fff; }

.gcard__nums {
  display: flex; gap: 0; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.gcard__num {
  flex: 1; display: grid; gap: 2px; justify-items: start; padding: 0 14px 0 0;
  border: 0; background: none; color: #fff; font: inherit; cursor: pointer; text-align: left;
}
.gcard__num + .gcard__num { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: 18px; }
.gcard__num b { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gcard__num span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .66; }

/* Строка «до следующей ступени» — кнопка во всю карточку. Полями карточки
   она не ограничена: отрицательные margin выводят её к самым краям, чтобы
   полоса шла шире, а нажатие ловилось по всей ширине, а не только по тексту. */
.gcard__goal-btn {
  display: block; width: calc(100% + 36px); margin: 16px -18px -20px; padding: 14px 13px 18px;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-top: 1px solid rgba(255, 255, 255, .12);
  transition: background .16s ease;
}
.gcard__goal-btn:active { background: rgba(255, 255, 255, .07); }
.gcard__goal { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gcard__goal i { margin-left: auto; font-style: normal; opacity: .8; font-variant-numeric: tabular-nums; }
/* Стрелка в конце строки — знак, что отсюда можно перейти */
.gcard__goal-go { display: inline-flex; opacity: .65; }
.gcard__goal-go svg { width: 17px; height: 17px; }
.gcard__bar { display: block; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); margin-top: 10px; overflow: hidden; }
.gcard__bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f0b429, var(--orange));
  transition: width .5s cubic-bezier(.2, .85, .2, 1);
}

/* «Расскажите о визите» */
.tell {
  margin: 0 0 18px; padding: 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .9); border: 1px solid rgba(22, 35, 63, .06);
  box-shadow: 0 2px 6px rgba(46, 32, 14, .05);
}
.tell__top { display: flex; align-items: flex-start; gap: 12px; }
.tell__ic {
  flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff0e2; color: var(--orange);
}
.tell__ic svg { width: 20px; height: 20px; }
.tell__id { min-width: 0; display: grid; gap: 3px; }
.tell__id b { font-size: 16px; font-weight: 700; }
.tell__id em { font-style: normal; font-size: 13px; color: var(--muted); }
.tell__acts { display: flex; gap: 10px; margin-top: 14px; }
.tell__acts .btn { flex: 1; height: 48px; border-radius: 14px; }
.tell__acts .btn--quiet { flex: 0 0 34%; }

/* Предпочтения и аккаунт — строками «подпись — значение» */
.prefs { margin: 0 0 20px; }
/* minmax(0,1fr): без него грид меряет колонку по несжатому содержимому
   (длинной строке без переноса) и раздувает её за край экрана — тот же
   приём, что и в сетках карточек по всему проекту */
.prefs__list { display: grid; grid-template-columns: minmax(0, 1fr); }
.prefs__row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 14px 2px;
  border: 0; border-top: 1px solid var(--line-soft); background: none;
  font: inherit; color: var(--ink); text-align: left;
}
.prefs__row:last-child { border-bottom: 1px solid var(--line-soft); }
/* Только подпись растягивается и обрезается многоточием; значок-шеврон
   (тоже <span>, но класса .ic) в это правило попадать не должен — иначе
   он расползается на всю свободную ширину и утаскивает строку за край. */
.prefs__row > span:not(.ic) {
  flex: 1; min-width: 0; font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prefs__row > b {
  flex: none; max-width: 62%; font-size: 14.5px; font-weight: 700; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Подпись важнее длинного статуса — ей отдаём минимум, чтобы не резалась первой */
.prefs__row > span:not(.ic) { flex-shrink: 1; flex-basis: auto; }
.prefs__row > .ic { flex: none; }
.prefs__row--go { cursor: pointer; }
.prefs__row--go > b { color: var(--muted); font-weight: 500; }
.prefs__row svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* Вкладки профиля: отзывы / фото / сохранённые */
/* Вкладки делим ровно на три: подчёркивание считается долями ширины
   (`100% / var(--tabs)`), и при кнопках по ширине текста оно уезжало вбок
   от того слова, под которым должно стоять. */
.ptabs {
  position: relative; display: flex; margin: 22px 0 4px;
  border-bottom: 1px solid var(--line-soft);
}
.ptabs__btn {
  flex: 1 1 0; min-width: 0; text-align: center;
  border: 0; background: none; padding: 10px 2px 12px; margin: 0; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 500; color: var(--muted); transition: color .18s ease;
}
.ptabs__btn i { font-style: normal; font-size: 14px; font-weight: 700; opacity: .7; }
.ptabs__btn.is-active { color: var(--ink); font-weight: 700; }
.ptabs__ink {
  position: absolute; left: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--blue); width: calc(100% / var(--tabs, 3));
  transform: translateX(calc(100% * var(--at, 0)));
  transition: transform .32s cubic-bezier(.2, .85, .2, 1);
}

/* Карточка отзыва и сохранённого заведения */
.rvlist { display: grid; gap: 2px; }
.rvcard {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft);
  color: inherit; text-decoration: none;
}
.rvcard__ph { flex: none; width: 86px; height: 86px; border-radius: 16px; overflow: hidden; display: block; }
.rvcard__ph .photo { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.rvcard__body { flex: 1; min-width: 0; display: block; }
.rvcard__top { display: flex; align-items: baseline; gap: 10px; }
.rvcard__top b { flex: 1; min-width: 0; font-family: var(--font-text); font-weight: 500; font-size: 16px; }
.rvcard__score {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 700; color: #7a5410; font-variant-numeric: tabular-nums;
}
.rvcard__score svg { width: 13px; height: 13px; color: var(--saffron); }
.rvcard__meta { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.rvcard__text { margin: 7px 0 0; font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.rvcard__answered {
  display: inline-block; margin-top: 9px; padding: 5px 12px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-text); font-size: 12.5px; font-weight: 600;
}

/* «Выйти из аккаунта» — единственная строка в блоке, набранная тревожным цветом */
.prefs__row--out > span { color: #c2560d; font-weight: 600; }

/* Экран достижений: лестница ступеней и заведения */
.ach-screen { width: min(680px, 100%); margin-inline: auto; padding: 14px 18px 0; }
.ach-screen .eyebrow { display: block; margin: 22px 0 8px; }
.ladder { display: grid; }
.ladder__row {
  display: flex; align-items: center; gap: 12px; padding: 12px 2px;
  border-bottom: 1px solid var(--line-soft); opacity: .5;
}
.ladder__row.is-taken { opacity: 1; }
.ladder__row.is-now { background: var(--saffron-soft); border-radius: 12px; padding-inline: 10px; }
.ladder__ic {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); font-size: 18px;
}
.ladder__id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ladder__id b { font-size: 15px; font-weight: 700; }
.ladder__id em { font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ladder__got { color: #2a9d5c; }
.ladder__got svg { width: 20px; height: 20px; }
.ladder__row > i {
  flex: none; font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ach-venues { display: grid; gap: 10px; }
.ach-venue {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; color: inherit;
}
.ach-venue__ph { flex: none; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; }
.ach-venue__ph .photo { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.ach-venue__id { min-width: 0; display: grid; gap: 2px; }
.ach-venue__id b { font-family: var(--font-text); font-weight: 500; font-size: 15px; }
.ach-venue__id em { font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ach-venue__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ach-venue__badges i {
  font-style: normal; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; background: var(--saffron-soft); color: #7a5410;
}

/* ---------- Ранг и достижения ----------
   Ранг — не валюта и не баллы: он просто показывает, сколько раз человек
   уже был за столом. Поэтому и подача спокойная, без «наград» и блеска. */
.ach { margin: 18px 0 2px; }
.ach__hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

.rank {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .82); border: 1px solid rgba(22, 35, 63, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.rank__ic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--saffron-soft); font-size: 22px; line-height: 1;
}
.rank__id { min-width: 0; display: grid; gap: 2px; }
.rank__id b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.rank__id em { font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Полоса до следующей ступени идёт во всю ширину карточки, под обе колонки */
.rank__bar {
  grid-column: 1 / -1; height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(22, 35, 63, .08); margin-top: 4px;
}
.rank__bar span { display: block; height: 100%; border-radius: 999px; background: var(--orange); transition: width .5s cubic-bezier(.2, .85, .2, 1); }
.rank__next { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .rank { background: var(--surface); backdrop-filter: none; }

/* Значки заведений — лентой, как «Ваши места» */
.ach__rail { display: flex; gap: 10px; overflow-x: auto; padding: 12px 0 4px; scroll-padding-left: 18px; scrollbar-width: none; }
.ach__rail::-webkit-scrollbar { display: none; }
.badge-card {
  flex: none; display: inline-flex; align-items: center; gap: 10px; max-width: 250px;
  padding: 8px 14px 8px 8px; border-radius: 999px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line-soft);
  transition: transform .16s ease, border-color .16s ease;
}
.badge-card:hover { transform: translateY(-2px); border-color: var(--blue); }
.badge-card__ic {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--saffron-soft); font-size: 17px; line-height: 1;
}
.badge-card__id { min-width: 0; display: grid; gap: 1px; }
.badge-card__id b { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.badge-card__id em {
  font-style: normal; font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.badge-card i {
  flex: none; font-style: normal; font-family: var(--font-display); font-weight: 800;
  font-size: 12px; color: var(--saffron); font-variant-numeric: tabular-nums;
}

/* Статус гостя на странице заведения */
.vstatus {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-soft);
}
.vstatus__ic {
  flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center;
  background: var(--saffron-soft); font-size: 23px; line-height: 1;
}
.vstatus__id { flex: 1 1 200px; min-width: 0; display: grid; gap: 3px; }
.vstatus__id b { font-size: 16px; font-weight: 700; }
.vstatus__id em { font-style: normal; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vstatus__next {
  flex: none; padding: 7px 13px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-text);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) { .rank__bar span, .badge-card { transition: none; } }

/* «Ваши места» — заведения, которые гость отмечает чаще других.
   Это и есть его портрет на RestBook: не просто снимки, а места. */
.ig-places { margin: 18px 0 2px; }
.ig-places__rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.ig-places__rail::-webkit-scrollbar { display: none; }
.ig-place {
  flex: none; display: inline-flex; align-items: center; gap: 9px; max-width: 230px;
  height: 36px; padding: 0 14px 0 4px; border: 1px solid var(--line-soft); border-radius: 999px;
  background: var(--surface); color: inherit; text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ig-place:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: 0 6px 18px rgba(27, 63, 125, .10); }
.ig-place__ph { flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; }
.ig-place__ph .photo { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font-size: 15px; }
.ig-place b { font-family: var(--font-text); font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ig-place em {
  flex: none; font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 12px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}
/* Самое частое место — шафрановый ободок: тот же акцент, что у оценок */
.ig-place--top { border-color: var(--saffron); background: var(--saffron-soft); }
.ig-place--top em { color: var(--saffron); }
.ig-places__hint { margin: 0; font-size: 13px; color: var(--muted); }

/* Вкладки: подчёркивание переезжает, а не перекрашивается */
.ig-tabs { position: relative; }
.ig-tabs__btn { border-bottom: 0; transition: color .18s ease; }
.ig-tabs__ink {
  position: absolute; left: 0; bottom: 0; height: 2px; background: var(--ink);
  width: calc(100% / var(--tabs, 2)); transform: translateX(calc(100% * var(--at, 0)));
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
}

/* Сетка: кадры проявляются по мере прокрутки и чуть подаются при нажатии */
.ig-cell { border-radius: 2px; }
.ig-cell img, .ig-cell video { transition: transform .5s cubic-bezier(.2, .85, .2, 1); }
.ig-cell:hover img, .ig-cell:hover video { transform: scale(1.06); }
.ig-cell:active { transform: scale(.985); }
.ig-cell.is-armed { opacity: 0; }
.ig-cell--in { animation: rb-in .5s cubic-bezier(.2, .85, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.ig-cell__play { width: 20px; height: 20px; }

/* Заглушка на время загрузки: страница не мигает пустотой */
.ig-skel { padding: 18px 0; }
.ig-skel__row { display: flex; align-items: center; gap: 20px; }
.ig-skel__bar, .ig-skel__dot, .ig-skel__cell { position: relative; overflow: hidden; background: var(--surface-2); }
.ig-skel__dot { width: 84px; height: 84px; border-radius: 50%; flex: none; }
.ig-skel__bar { height: 12px; border-radius: 999px; }
.ig-skel__lines { flex: 1; display: grid; gap: 10px; }
.ig-skel__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 22px; }
.ig-skel__cell { aspect-ratio: 1; }
.ig-skel__bar::after, .ig-skel__dot::after, .ig-skel__cell::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
  animation: rb-sheen 1.6s ease-in-out infinite;
}

/* «Актуальное» получило свой заголовок — иначе лента висела в воздухе */
.ig-hl-box { margin-top: 20px; }
.ig-hl-box .ig-hl { padding-top: 4px; }
.ig-places__rail, .ig-hl { padding-right: 14px; }

/* В тёмной теме белый блик слепит — гасим его */
:root[data-theme="dark"] .ig-skel__bar::after,
:root[data-theme="dark"] .ig-skel__dot::after,
:root[data-theme="dark"] .ig-skel__cell::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
}
:root[data-theme="dark"] .ig-place { background: var(--surface); }

/* Настройки: строки въезжают тем же каскадом, значок подаётся при нажатии */
.uset__body > h4, .uset__body > .uset__group, .uset__body > .uset__out, .uset__body > .list-card, .uset__body > .empty {
  animation: rb-in .4s cubic-bezier(.2, .7, .3, 1) both;
}
.uset__body > *:nth-child(1) { animation-delay: .02s; }
.uset__body > *:nth-child(2) { animation-delay: .06s; }
.uset__body > *:nth-child(3) { animation-delay: .10s; }
.uset__body > *:nth-child(4) { animation-delay: .14s; }
.uset__body > *:nth-child(5) { animation-delay: .18s; }
.uset__body > *:nth-child(6) { animation-delay: .22s; }
.uset__body > *:nth-child(7) { animation-delay: .26s; }
.uset__body > *:nth-child(8) { animation-delay: .30s; }
.uset__body h4 { font-family: var(--font-display); letter-spacing: .09em; text-transform: uppercase; font-size: 11px; }
.uset { animation: rb-in .26s ease both; }

/* Кабинет гостя: то же семейство движения, что и на странице */
.pcard, .taste, .pset { animation: rb-in .42s cubic-bezier(.2, .7, .3, 1) both; }
.pcard { animation-delay: .02s; }
.taste { animation-delay: .08s; }
.pset { animation-delay: .14s; }
.taste h3 {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.taste__chips span { animation: rb-in .38s cubic-bezier(.2, .7, .3, 1) both; }
.taste__chips span:nth-child(2) { animation-delay: .08s; }
.taste__chips span:nth-child(3) { animation-delay: .16s; }
.taste__nums b { font-variant-numeric: tabular-nums; }
.pcard__avatar { transition: transform .16s ease; }
.pcard__avatar:active { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  .uset, .uset__body > *, .pcard, .taste, .pset, .taste__chips span { animation: none; }
}

.uset__row { transition: background .16s ease; }
.uset__row:active { background: var(--surface-2); }
.uset__row > svg { transition: transform .16s ease; }
.uset__row:active > svg { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .rb-stage, .ig-cell--in { animation: none; }
  .ig-ava.has-story::before { animation: none; }
  .ig-cell img, .ig-cell video, .ig-place, .ig-tabs__ink { transition: none; }
}

/* Шторка: выбор что выложить, архив, списки, просмотр */
.ig-sheet { position: fixed; inset: 0; z-index: 220; display: flex; align-items: flex-end; justify-content: center; }
.ig-sheet__back { position: absolute; inset: 0; background: rgba(10, 20, 45, .5); }
.ig-sheet__box {
  position: relative; width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px 20px 0 0; animation: rb-in .24s ease both;
}
.ig-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.ig-sheet__x { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }
.ig-sheet__body { padding: 16px 18px; overflow-y: auto; }
.ig-sheet__foot { padding: 12px 18px 18px; border-top: 1px solid var(--line-soft); }

.ig-pick { display: grid; gap: 10px; }
.ig-pick__row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.ig-pick__row:hover { border-color: var(--blue); background: var(--blue-soft); }
.ig-pick__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--blue); flex: none; }
.ig-pick__row b { display: block; font-size: 15px; }
.ig-pick__row em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.ig-arch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.ig-arch__item { position: relative; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; cursor: pointer; }
.ig-arch__item img, .ig-arch__item video { width: 100%; height: 100%; object-fit: cover; }
.ig-arch__item input { position: absolute; right: 6px; top: 6px; z-index: 2; width: 18px; height: 18px; }
.ig-arch__item input:checked ~ img, .ig-arch__item input:checked ~ video { outline: 3px solid var(--orange); outline-offset: -3px; }
.ig-arch--view .ig-arch__item { border: 0; padding: 0; background: none; }
.ig-arch__item em { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(8,17,36,.6); padding: 2px 6px; border-radius: 999px; }

.ig-compose img, .ig-compose video { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 12px; background: #0b1220; margin-bottom: 12px; }
.ig-view img, .ig-view video { width: 100%; max-height: 68vh; object-fit: contain; border-radius: 12px; background: #0b1220; }
.ig-view__cap { margin: 10px 0 0; font-size: 14.5px; }

/* ---------- История во весь экран ----------
   Полоски сверху говорят, сколько историй и сколько осталось текущей.
   Половины экрана листают вперёд и назад, удержание ставит на паузу. */
.story {
  position: fixed; inset: 0; z-index: 200; background: #000; color: #fff;
  display: grid; grid-template-rows: auto auto 1fr auto;
  padding-top: env(safe-area-inset-top);
}
.story__bars { display: flex; gap: 4px; padding: 10px 12px 0; }
.story__bar { flex: 1; height: 2.5px; border-radius: 999px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.story__bar.is-done { background: #fff; }
.story__bar i { display: block; height: 100%; width: 0; background: #fff; animation: story-fill linear forwards; }
@keyframes story-fill { from { width: 0; } to { width: 100%; } }

.story__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.story__ava {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex: none;
  background: rgba(255, 255, 255, .18); display: grid; place-items: center;
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
}
.story__ava img { width: 100%; height: 100%; object-fit: cover; }
.story__head b { font-size: 14px; }
.story__head em { font-style: normal; font-size: 13px; color: rgba(255, 255, 255, .62); }
.story__x { margin-left: auto; border: 0; background: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }

.story__media { display: grid; place-items: center; overflow: hidden; }
.story__media img, .story__media video { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Половины экрана листают историю; кнопки прозрачные и лежат под шапкой */
.story__zone { position: absolute; top: 64px; bottom: 78px; width: 45%; border: 0; background: none; cursor: pointer; }
.story__zone--prev { left: 0; }
.story__zone--next { right: 0; }

.story__foot {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.story__foot input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px; font: inherit; font-size: 15px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45);
  background: none; color: #fff; outline: none;
}
.story__foot input::placeholder { color: rgba(255, 255, 255, .6); }
.story__heart, .story__send {
  width: 44px; height: 44px; flex: none; border: 0; background: none; color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.story__heart svg, .story__send svg { width: 26px; height: 26px; }
.story__heart:active { transform: scale(1.15); }
.story__foot--mine { justify-content: center; color: rgba(255, 255, 255, .6); font-size: 13px; }

/* Подпись поверх кадра */
.story__media { position: relative; }
.story__cap {
  position: absolute; left: 16px; right: 16px; bottom: 18px; margin: 0;
  font-size: 15px; line-height: 1.4; text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .6);
}

/* Экран публикации истории: кадр целиком, подпись и кнопка снизу */
.story--make { grid-template-rows: auto 1fr auto; }
/* На экране публикации крестик слева, как в привычных приложениях */
.story--make .story__x { margin-left: 0; margin-right: 4px; }
.story--make .story__head b { font-size: 15px; }
.story--make .story__media img, .story--make .story__media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.story__make-foot {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.story__make-foot input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; font: inherit; font-size: 15px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .35);
  background: none; color: #fff; outline: none;
}
.story__make-foot input::placeholder { color: rgba(255, 255, 255, .55); }
.story__publish {
  flex: none; height: 46px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--orange); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.story__publish:hover { background: var(--orange-hi); }
.story__publish:disabled { opacity: .6; cursor: default; }

/* Подпись и «куда уходит» идут строками, а не в один ряд:
   поле подписи широкое, а под ним — адресат и круглая отправка */
.story--make .story__make-foot { flex-direction: column; align-items: stretch; gap: 12px; }
.story--make .story__make-foot input { width: 100%; }
.story__send-row { display: flex; align-items: center; gap: 12px; }
.story__dest {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 6px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.story__dest img, .story__dest i {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none;
  display: grid; place-items: center; background: rgba(255, 255, 255, .2);
  font-style: normal; font-size: 14px; font-weight: 700;
}
.story--make .story__send {
  margin-left: auto; flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: var(--orange); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.story--make .story__send:hover { background: var(--orange-hi); }
.story--make .story__send:disabled { opacity: .6; cursor: default; }

/* Колонка инструментов справа: подпись и отметка заведения */
.story__tools {
  position: absolute; top: 62px; right: 10px; z-index: 3;
  display: grid; gap: 10px; justify-items: center;
}
.story__tools button {
  width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
.story__tools button b { font-size: 16px; font-weight: 800; }
.story__tools svg { width: 20px; height: 20px; }
.story__tools button.is-on { background: var(--orange); }

/* Отметка заведения на кадре */
.story__venue-chip {
  position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; max-width: 80%;
  padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(6px);
}
.story__venue-chip svg { width: 15px; height: 15px; flex: none; }

/* Полоска отправки — история уходит не мгновенно */
.story__prog { position: absolute; inset: 0 auto auto 0; height: 3px; width: 0; background: var(--orange); z-index: 5; }
.story__prog.is-on { width: 100%; transition: width 8s cubic-bezier(.15, .8, .3, 1); }

.story__count { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .8); }

/* ---------- Шапка своей страницы: ник и «три полоски» ---------- */
.ig-top {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
/* Логотип стоит в строке «Мой профиль», а не в отдельной шапке сайта */
.ig-top__logo { flex: none; width: 42px; height: 26px; display: grid; place-items: center; }
.ig-top__logo svg { width: 100%; height: 100%; }

/* Шапка страницы: название экрана, город и время по Ташкенту, обновление */
.ig-top__id { display: grid; gap: 2px; min-width: 0; }
.ig-top__id b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.ig-top__id em {
  display: inline-flex; align-items: center; gap: 6px;
  font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.ig-top__id em i { width: 6px; height: 6px; border-radius: 50%; background: #5ee08a; }
.ig-top__refresh {
  margin-left: auto; flex: none; width: 40px; height: 40px; border: 0; border-radius: 13px; cursor: pointer;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(22, 35, 63, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--ink); display: grid; place-items: center;
}
.ig-top__refresh svg { width: 19px; height: 19px; }
.ig-top__refresh.is-busy svg { animation: rb-spin 1s linear infinite; }

.ig-burger {
  display: grid; align-content: center; justify-items: center; gap: 5px; color: var(--ink);
}
.ig-burger span { width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* Разделитель над сеткой: вкладки убрали, но граница разделов нужна */
.ig-gridline { border-top: 1px solid var(--line-soft); margin-top: 22px; }

/* Сетка почти во всю ширину: по краям остаётся тот же просвет 3px,
   что и между кадрами, — как в макете. Прежние поля страницы (18px) её не держат. */
.ig-grid { margin-inline: -15px; gap: 3px; }
.ig-gridline { margin-inline: -18px; }

/* ---------- Экран «Публикации» ----------
   Лента одного гостя: сверху свежее, ниже — более ранние. Поделиться отсюда
   нельзя, по просьбе владельца: только «нравится» и комментарии. */
.posts { grid-template-rows: auto minmax(0, 1fr); }
.posts__title { display: grid; gap: 1px; }
.posts__title b { font-size: 16px; font-weight: 700; }
.posts__title em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.posts__body { overflow: auto; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }

.pubcard { border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 4px; }
.pubcard__top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.pubcard__ava {
  flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-2); color: var(--blue-hi);
  font-weight: 700; font-size: 14px;
}
.pubcard__ava img { width: 100%; height: 100%; object-fit: cover; }
.pubcard__ava i { font-style: normal; }
.pubcard__top b { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pubcard__more { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.pubcard__more svg { width: 18px; height: 18px; }
.pubcard__media { background: #000; }
.pubcard__media img, .pubcard__media video { width: 100%; display: block; max-height: 78vh; object-fit: contain; }
.pubcard__acts { display: flex; align-items: center; gap: 18px; padding: 10px 14px 2px; }
.pubcard__like, .pubcard__talk {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: inherit; padding: 0;
}
.pubcard__like svg, .pubcard__talk svg { width: 24px; height: 24px; }
.pubcard__like b, .pubcard__talk b { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pubcard__like.is-on { color: var(--orange); }
.pubcard__like:active svg { transform: scale(1.15); }
.pubcard__venue {
  display: inline-flex; align-items: center; gap: 5px; margin: 8px 14px 0;
  font-size: 13px; color: var(--blue); text-decoration: none;
}
.pubcard__venue svg { width: 14px; height: 14px; }
.pubcard__cap { margin: 8px 14px 0; font-size: 14px; line-height: 1.45; text-wrap: pretty; }
.pubcard__cap b { font-weight: 600; }
.pubcard__when { margin: 6px 14px 0; font-size: 11.5px; color: var(--muted); }

/* ---------- Комментарии (общий слой) ----------
   Свой полноэкранный слой поверх всего, а не часть общей шторки: у него
   настоящая блокировка прокрутки (lockPageScroll в app.js), поэтому фокус
   в поле не утаскивает страницу под клавиатуру. Общий для страницы гостя
   и ленты друзей. */
.cmt2-sheet {
  position: fixed; inset: 0; z-index: 260; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cmt2-sheet.is-open { opacity: 1; pointer-events: auto; }
.cmt2-sheet__back { position: absolute; inset: 0; background: rgba(10, 20, 45, .5); }
.cmt2-sheet__box {
  position: relative; width: min(560px, 100%); height: min(78vh, 640px);
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(10, 20, 45, .22);
  transform: translateY(16px); transition: transform .22s cubic-bezier(.2, .85, .2, 1);
}
.cmt2-sheet.is-open .cmt2-sheet__box { transform: none; }
.cmt2-sheet__grab { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 10px auto 0; flex: none; }
.cmt2-sheet__head {
  flex: none; display: flex; align-items: center; justify-content: center; position: relative;
  padding: 12px 18px; border-bottom: 1px solid var(--line-soft);
}
.cmt2-sheet__head b { font-size: 15px; font-weight: 700; }
.cmt2-sheet__x {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px;
}
.cmt2-sheet__list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 18px; display: grid; gap: 16px; align-content: start; }

.cmt2 { display: flex; gap: 10px; animation: rb-in .28s cubic-bezier(.2, .85, .2, 1) both; }
.cmt2__ava {
  flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; text-decoration: none;
  display: grid; place-items: center; background: var(--surface-2); color: var(--blue-hi); font-weight: 700; font-size: 14px;
}
.cmt2__ava img { width: 100%; height: 100%; object-fit: cover; }
.cmt2__ava i { font-style: normal; }
.cmt2__body { flex: 1; min-width: 0; }
.cmt2__body p { margin: 0; font-size: 14px; line-height: 1.45; word-break: break-word; }
.cmt2__body b { font-weight: 600; }
.cmt2__meta { display: flex; align-items: center; gap: 12px; margin-top: 3px; }
.cmt2__meta em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.cmt2__del { border: 0; background: none; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.cmt2__del:hover { color: #c2560d; }

.cmt2__empty { display: grid; justify-items: center; gap: 10px; padding: 40px 20px; color: var(--muted); text-align: center; }
.cmt2__empty svg { width: 30px; height: 30px; opacity: .5; }
.cmt2__empty p { margin: 0; font-size: 14px; }

/* Скелетон, пока список грузится: три полоски, а не пустота */
.cmt2__skel { display: grid; gap: 16px; padding-top: 4px; }
.cmt2__skel span {
  height: 34px; border-radius: 12px; position: relative; overflow: hidden;
  background: var(--surface-2);
}
.cmt2__skel span::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent);
  animation: rb-sheen 1.5s ease-in-out infinite;
}

.cmt2-sheet__form {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft);
}
.cmt2-sheet__me {
  flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-2); color: var(--blue-hi); font-weight: 700; font-size: 13px;
}
.cmt2-sheet__me img { width: 100%; height: 100%; object-fit: cover; }
.cmt2-sheet__me i { font-style: normal; }
.cmt2-sheet__form input {
  flex: 1; min-width: 0; height: 42px; padding: 0 16px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink); outline: none;
}
.cmt2-sheet__form input:focus { border-color: var(--blue); background: var(--surface); }
.cmt2-sheet__send {
  flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--blue); color: #fff; display: grid; place-items: center; transition: opacity .15s ease;
}
.cmt2-sheet__send svg { width: 17px; height: 17px; }
.cmt2-sheet__send:disabled { opacity: .35; cursor: default; }

@media (prefers-reduced-motion: reduce) { .cmt2, .cmt2-sheet__box, .cmt2-sheet { transition: none; animation: none; } }

.ig-bio__note { margin: 10px 0 0; color: var(--ink); font-size: 14px; }

/* ---------- Настройки и действия ---------- */
.uset {
  position: fixed; inset: 0; z-index: 215; background: var(--bg); color: var(--ink);
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  padding-top: env(safe-area-inset-top);
}
.uset__head {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.uset__head b { font-size: 17px; }
.uset__back {
  width: 38px; height: 38px; border: 0; background: none; color: inherit; cursor: pointer;
  display: grid; place-items: center;
}
.uset__back svg { width: 22px; height: 22px; transform: rotate(180deg); }
.uset__body {
  overflow: auto; padding: 8px 14px calc(90px + env(safe-area-inset-bottom));
  width: min(680px, 100%); margin-inline: auto;
}
.uset__body h4 {
  margin: 18px 4px 8px; font-family: var(--font-text); font-weight: 500;
  font-size: 13px; color: var(--muted);
}
.uset__group { display: grid; }
.uset__row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: left; text-decoration: none;
}
.uset__row--plain { cursor: default; }
.uset__row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.uset__row b { font-weight: 600; font-size: 15px; }
.uset__row em { font-style: normal; font-size: 12px; color: var(--muted); }
.uset__row > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.uset__ic { flex: none; width: 24px; display: grid; place-items: center; color: var(--ink); }
.uset__ic svg { width: 21px; height: 21px; }
.uset [data-uset-sub], .uset__body .list-card { margin-top: 10px; }
[data-uset-sub] { z-index: 216; }

/* ---------- Архив историй ----------
   Отдельный экран: сетка кадров без просветов, дата — у первого кадра дня. */
.arch { grid-template-rows: auto minmax(0, 1fr); }
.arch__body { overflow: auto; padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.arch__tabs {
  position: relative; display: flex; border-bottom: 1px solid var(--line-soft);
  width: min(680px, 100%); margin-inline: auto;
}
.arch__tab {
  flex: 1; display: grid; justify-items: center; gap: 4px; padding: 10px 0 12px;
  border: 0; background: none; cursor: pointer; color: var(--muted); font: inherit;
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; transition: color .18s ease;
}
.arch__tab svg { width: 21px; height: 21px; }
.arch__tab.is-active { color: var(--ink); }
.arch__ink {
  position: absolute; bottom: -1px; left: 0; height: 2px; width: 50%; background: var(--ink);
  transform: translateX(calc(100% * var(--at, 0)));
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
}

.arch__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 2px;
  width: min(680px, 100%); margin-inline: auto;
}
.arch__cell {
  position: relative; aspect-ratio: 3 / 4.4; border: 0; padding: 0; overflow: hidden;
  background: var(--surface-2); cursor: pointer;
}
.arch__cell img, .arch__cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Дата — белой плашкой, как отбивка дня: у первой истории каждого дня */
.arch__date {
  position: absolute; left: 8px; top: 8px; display: grid; justify-items: center; line-height: 1;
  padding: 7px 9px; border-radius: 10px; background: var(--bg); color: var(--ink);
  box-shadow: 0 2px 10px rgba(10, 20, 45, .18);
}
.arch__date b { font-family: var(--font-display); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.arch__date i { font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; }
.arch__len {
  position: absolute; left: 8px; bottom: 7px; font-style: normal; font-size: 12px; font-weight: 600;
  color: #fff; text-shadow: 0 1px 5px rgba(0, 0, 0, .7); font-variant-numeric: tabular-nums;
}
.arch__live {
  position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(8, 17, 36, .6); color: #fff; font-size: 10.5px; font-weight: 700;
}
.arch__note {
  width: min(680px, 100%); margin: 18px auto 0; padding: 0 16px;
  font-size: 12.5px; line-height: 1.5; color: var(--muted); text-align: center;
}
.arch__empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.arch__hls {
  display: flex; flex-wrap: wrap; gap: 18px; padding: 18px 16px 0;
  width: min(680px, 100%); margin-inline: auto;
}
.arch__hl { width: 74px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 6px; }
.arch__hl small { font-size: 12px; color: var(--ink); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arch__hl--add .ig-hl__ring { border-style: dashed; }

/* ---------- Друзья и подписки ---------- */
.people__add {
  margin-left: auto; position: relative; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink); background: var(--surface-2);
}
.people__add svg { width: 20px; height: 20px; }
.people__add i {
  position: absolute; right: 4px; bottom: 4px; font-style: normal;
  font-size: 13px; font-weight: 800; line-height: 1; color: var(--orange);
}
.people__tabs {
  position: relative; display: flex; width: min(680px, 100%); margin-inline: auto;
  border-bottom: 1px solid var(--line-soft);
}
.people__tab {
  flex: 1; padding: 13px 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--muted); transition: color .18s ease;
}
.people__tab b { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.people__tab.is-active { color: var(--ink); }

.people__list { width: min(680px, 100%); margin-inline: auto; padding: 4px 16px; }
.people__row {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  animation: rb-in .34s cubic-bezier(.2, .7, .3, 1) both;
}
.people__row:nth-child(2) { animation-delay: .03s; }
.people__row:nth-child(3) { animation-delay: .06s; }
.people__row:nth-child(4) { animation-delay: .09s; }
.people__row:nth-child(5) { animation-delay: .12s; }
.people__who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.people__ava {
  flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--surface-2); color: var(--blue-hi);
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
}
.people__ava img, .people__ava .photo { width: 100%; height: 100%; object-fit: cover; }
.people__ava i { font-style: normal; }
.people__id { min-width: 0; display: grid; gap: 1px; }
.people__id b { font-family: var(--font-text); font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people__id em { font-style: normal; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people__row .btn { flex: none; }

@media (prefers-reduced-motion: reduce) { .people__row { animation: none; } }

/* Переключатель в строке настроек */
.uset__sw {
  flex: none; width: 42px; height: 24px; border-radius: 999px; position: relative;
  background: var(--line); transition: background .18s ease;
}
.uset__sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(10, 20, 45, .3);
  transition: transform .18s ease;
}
.uset__sw.is-on { background: var(--orange); }
.uset__sw.is-on::after { transform: translateX(18px); }

.uset__out {
  margin-top: 26px; width: 100%; padding: 13px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--surface-2, rgba(27, 63, 125, .06)); color: var(--danger, #c8341f);
  font: inherit; font-size: 15px; font-weight: 600;
}

/* Форма профиля */
.uedit { display: grid; gap: 14px; justify-items: stretch; }
.uedit__ava {
  position: relative; justify-self: center; width: 96px; height: 96px; border-radius: 50%;
  overflow: hidden; cursor: pointer; background: var(--surface-2, rgba(27, 63, 125, .08));
  display: grid; place-items: center; font-size: 30px; font-weight: 700; color: var(--blue);
}
.uedit__ava img { width: 100%; height: 100%; object-fit: cover; }
.uedit__cam {
  position: absolute; inset: auto 0 0 0; padding: 4px 0; background: rgba(0, 0, 0, .45);
  color: #fff; display: grid; place-items: center;
}
.uedit__cam svg { width: 16px; height: 16px; }
.uedit__hint { margin: -6px 0 2px; text-align: center; font-size: 13px; color: var(--blue); }
.field__note { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- Экран «Добавить в историю» ----------
   Сетка кадров по трое в ряд, как в галерее телефона */
.spick {
  position: fixed; inset: 0; z-index: 210; background: #000; color: #fff;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding-top: env(safe-area-inset-top);
}
.spick__head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; }
.spick__head b { font-size: 16px; font-weight: 700; }
.spick__x {
  width: 34px; height: 34px; border: 0; background: none; color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.spick__bar { display: flex; align-items: center; gap: 10px; padding: 4px 16px 12px; }
.spick__src { font-size: 15px; font-weight: 600; }
.spick__multi {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-size: 13px; font-weight: 600;
}
.spick__multi svg { width: 16px; height: 16px; }
.spick__multi.is-on { background: var(--orange); }
.spick__grid {
  overflow: auto; -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; align-content: start;
}
.spick__tile {
  position: relative; border: 0; padding: 0; cursor: pointer;
  aspect-ratio: 3 / 4; background: #16181c; overflow: hidden;
}
.spick__tile img, .spick__tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.spick__tile--gal {
  display: grid; place-content: center; justify-items: center; gap: 6px;
  color: rgba(255, 255, 255, .8); font-size: 12px; font-weight: 600;
}
.spick__tile--gal svg { width: 26px; height: 26px; }
.spick__tile--gal em { font-style: normal; }
.spick__tile.is-picked img, .spick__tile.is-picked video { opacity: .55; }
.spick__num {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #fff; background: rgba(0, 0, 0, .3); color: #fff;
  font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.spick__tile.is-picked .spick__num { background: var(--orange); border-color: var(--orange); }
.spick__len {
  position: absolute; right: 6px; bottom: 5px; font-size: 11px; font-weight: 600; font-style: normal;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.spick__empty { padding: 20px; text-align: center; color: rgba(255, 255, 255, .6); font-size: 14px; }
/* На широком экране держим ширину телефона: иначе плитки разъезжаются на треть окна */
.spick__head, .spick__bar, .spick__grid, .spick__foot { width: min(560px, 100%); margin-inline: auto; }
.spick__foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }

/* Список заведений для отметки */
.ig-venues { max-height: 46vh; overflow: auto; display: grid; }
.ig-venues__row {
  display: grid; gap: 2px; text-align: left; padding: 11px 4px; cursor: pointer;
  border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: inherit;
}
.ig-venues__row em { font-style: normal; font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .story__bar i { animation-duration: 6s; } }

/* ---------- Плашка «смена идёт» ---------- */
.shift-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--surface-2); color: var(--muted);
  font-size: 13px; font-weight: 700;
}
.shift-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.shift-pill.is-on { background: #f0f9f4; color: #2f8f5b; }
:root[data-theme="dark"] .shift-pill.is-on { background: rgba(47, 143, 91, .18); color: #6ddba0; }
:root[data-theme="dark"] .shift-pill { background: rgba(255, 255, 255, .07); }
.shift-pill.is-on i { animation: rb-dotwave 2.2s ease-in-out infinite; }

/* Значок строки брони — по статусу, стрелка внутри медленно идёт по кругу */
.bk-ic { border-radius: 13px; }
.bk-ic .ic { animation: rb-spin 12s linear infinite; }
.bk-ic--expected { background: color-mix(in srgb, var(--blue) 12%, var(--surface)); color: var(--blue); }
.bk-ic--arrived, .bk-ic--seated { background: #ffe8da; color: #c2560d; }
.bk-ic--done { background: var(--surface-2); color: var(--muted); }
.bk-ic--late { background: #fdeceb; color: #c2360d; }

/* Кнопка на карточке стола — во всю ширину, как в макете */
.table-card__act { width: 100%; justify-content: center; margin-top: 4px; height: 38px; border-radius: 10px; }

/* Легенда зала стоит справа от фильтра зон */
.hostess__legend { margin-left: auto; gap: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }

/* Лист ожидания: кнопка «Посадить» синяя, «В лист ожидания» — оранжевая */
.work-card__form--wait .btn { background: var(--orange); border-color: transparent; }
.work-card__form--wait .btn:hover { background: var(--orange-hi); }

/* Лист ожидания: рамка аватара дышит, время ждёт растёт по секундам */
.wait-ava { position: relative; }
.wait-ava::after {
  content: ''; position: absolute; inset: -4px; border-radius: inherit;
  border: 2px solid var(--orange); animation: rb-seatpulse 2.4s ease-in-out infinite; pointer-events: none;
}
.list-row__main b[data-wait] { font-variant-numeric: tabular-nums; }

/* Подбор компании: кнопки крупнее, подходящие столы светятся */
.guests--inline .guest { min-width: 46px; height: 40px; border-radius: 12px; font-size: 15px; }
.table-card.is-dim { opacity: .42; }
.table-card.is-match { box-shadow: 0 0 0 3px rgba(255, 107, 26, .22); }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-2 { grid-template-columns: 1fr; }
  /* В одну колонку блоки идут подряд по разметке */
  .rest-layout__head, .rest-layout__aside, .rest-layout__tabs { grid-column: auto; grid-row: auto; }
  .results-layout { grid-template-columns: 1fr; }
  /* На планшете список остаётся сверху, карта уходит под него */
  .results-sheet { grid-column: 1; grid-row: 1; }
  .results-map { grid-column: 1; grid-row: 2; position: relative; top: 0; height: 420px; }
  .food-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .header__inner { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .searchbar { order: 3; flex-basis: 100%; max-width: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .info-list div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 760px) {
  .result { grid-template-columns: minmax(0, 1fr); }   /* иначе длинная строка кухни распирает карточку */
  .result__media { min-height: 190px; }
  .rhero__slide { aspect-ratio: 4 / 3; }
  .info-grid, .photo-strip { grid-template-columns: 1fr; }
  .food-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .row-4 { grid-template-columns: 1fr; }
  .searchbar { height: auto; flex-wrap: wrap; padding: 0; gap: 8px; }
  .searchbar__field { flex: 1 1 100%; height: 48px; padding: 0 14px; }
  .searchbar__side { width: 48px; height: 48px; }
  .searchbar .btn { width: 100%; }
  .section__head h2, .filters__title { font-size: 24px; }
  .newsbar__inner { flex-wrap: wrap; }
}

/* Запасной вид карты, если Яндекс недоступен */
.map__fallback { position: absolute; inset: 0; background: var(--surface-2); overflow: hidden; }
.map__hint { position: absolute; left: 14px; right: 14px; bottom: 14px; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); box-shadow: var(--shadow-sm); }
.map__hint code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.map__fallback[hidden] { display: none; }

/* ---------- Кабинет ресторана ---------- */
.partner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 30px 0 22px; flex-wrap: wrap; }
.partner-head h1 { margin: 2px 0 6px; font-size: 32px; font-weight: 800; }
.partner-head__label { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-hi); }
.partner-head p { margin: 0; font-size: 14px; }
.partner-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; margin-top: 6px; }
.stat { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.stat__label { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.stat__value { margin: 0 0 4px; font-size: 30px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.stat__sub { margin: 0; font-size: 13px; color: var(--muted); }

.panel code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }

/* ---------- Тёмная тема ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05080f;
  --bg-soft: #0a1120;
  --surface: #0f1829;
  --surface-2: #141f36;
  --line: #22304f;
  --line-soft: #1a2440;
  --ink: #e9eefb;
  --muted: #8fa0c4;
  --blue: #2f6bff;
  --blue-hi: #5089ff;
  --blue-deep: #0b1f4d;
  --blue-soft: #16264d;
  --blue-text: #9dc0ff;
  --amber-soft: #2e1b0c;
  --amber-text: #ff9a52;
  --saffron: #e5b45c;
  --saffron-soft: #2b2211;
  --chat-bg: #101f3a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow: 0 6px 26px rgba(0, 0, 0, .55);
}
:root[data-theme="dark"] .logo__text { color: #dbe6ff; }
:root[data-theme="dark"] .logo__mark svg g:first-child { fill: #dbe6ff; }
:root[data-theme="dark"] .badge-soft { background: rgba(5, 8, 15, .84); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
:root[data-theme="dark"] .like { background: rgba(5, 8, 15, .6); color: #fff; }
:root[data-theme="dark"] .like:hover { background: rgba(5, 8, 15, .85); }
:root[data-theme="dark"] .like.is-on { color: var(--orange); }
:root[data-theme="dark"] .toolbar__arrow { background: var(--surface-2); }
:root[data-theme="dark"] .fdrop { background: var(--surface-2); }
:root[data-theme="dark"] .fdrop__box { border-color: #3d4d75; }
:root[data-theme="dark"] .switch i { background: #29354f; }
:root[data-theme="dark"] .range__bubble { background: #fff; color: #05080f; }
:root[data-theme="dark"] .range__bubble::after { border-top-color: #fff; }
:root[data-theme="dark"] .pin__rating { background: #0f1829; color: #fff; }
:root[data-theme="dark"] .modal__backdrop { background: rgba(0, 0, 0, .68); }
:root[data-theme="dark"] .promo__body p { color: #b9caea; }
:root[data-theme="dark"] .tab.is-active { color: var(--blue-hi); border-bottom-color: var(--blue-hi); }
:root[data-theme="dark"] .points-card .btn { background: #fff; color: var(--blue-deep); }
:root[data-theme="dark"] .banner-green h4,
:root[data-theme="dark"] .booking__summary b,
:root[data-theme="dark"] .notice b { color: #fff; }
:root[data-theme="dark"] .newsbar { box-shadow: 0 -4px 18px rgba(0, 0, 0, .5); }

/* ---------- Календарь выбора даты ---------- */
.calendar { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px 16px; background: var(--surface); }
.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.calendar__title { font-size: 16px; font-weight: 800; text-transform: capitalize; }
.calendar__nav { display: flex; gap: 6px; }
.calendar__nav button {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.calendar__nav button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.calendar__nav button:disabled { opacity: .35; cursor: default; }
.calendar__nav .ic { width: 16px; height: 16px; }
.calendar__nav .ic--prev { transform: rotate(180deg); }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar__dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-bottom: 6px; }
.calendar__day {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 9px; background: transparent; color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; display: grid; place-items: center;
}
.calendar__day:hover:not(:disabled) { background: var(--blue-soft); }
.calendar__day:disabled { color: var(--muted); opacity: .4; cursor: default; }
.calendar__day.is-today { box-shadow: inset 0 0 0 1.5px var(--line); }
.calendar__day.is-selected { background: var(--blue); color: #fff; font-weight: 800; }
.calendar__day.has-offer::after {
  content: ""; position: absolute; bottom: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange);
}
.calendar__day.is-selected.has-offer::after { background: #fff; }
.calendar__legend { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.calendar__legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); display: inline-block; }
.calendar__quick { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.calendar__quick button {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ink);
}
.calendar__quick button:hover { border-color: var(--blue); }
.calendar__quick button.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Переключатели языка и темы */
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.pref-row:last-child { border-bottom: 0; }
.pref-row h4 { margin: 0 0 2px; font-size: 15px; font-weight: 800; }
.pref-row p { margin: 0; font-size: 13px; color: var(--muted); }
.seg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg-toggle button { padding: 9px 16px; border: 0; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer; }
.seg-toggle button + button { border-left: 1px solid var(--line); }
.seg-toggle button.is-active { background: var(--blue); color: #fff; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch button {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent; background: none;
  color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-active { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
:root[data-theme="dark"] .lang-switch button.is-active { color: #fff; }

/* ---------- Экран входа и регистрации ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 520px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.auth-title { margin: 0 0 6px; font-size: 28px; font-weight: 800; }
.auth-sub { margin: 0 0 24px; color: var(--muted); font-size: 15px; }
.auth-note { margin: 22px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.auth-error { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: #c2360d; }
:root[data-theme="dark"] .auth-error { color: #ff8f66; }
.auth-back { background: none; border: 0; color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer; padding: 0 0 12px; }
.auth-back:hover { color: var(--ink); }

.role-grid { display: grid; gap: 14px; }
.role-card {
  display: grid; gap: 6px; text-align: left; padding: 22px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); cursor: pointer; color: var(--ink); transition: border-color .15s ease, background .15s ease;
}
.role-card:hover { border-color: var(--blue); background: var(--blue-soft); }
.role-card__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 6px; }
.role-card__icon .ic { width: 26px; height: 26px; }
.role-card b { font-size: 19px; font-weight: 800; }
.role-card > span:not(.role-card__icon):not(.role-card__go) { font-size: 14px; color: var(--muted); }
.role-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.role-card__go .ic { width: 15px; height: 15px; }
@media (max-width: 560px) { .auth-card { padding: 22px; } .auth-title { font-size: 23px; } }

/* ---------- Сети и филиалы ---------- */
.result__meta--chain { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-text); font-weight: 700; }
.result__meta--chain .ic { width: 14px; height: 14px; }
.chain-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px)); max-height: 84vh; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.chain-modal .modal__body { overflow-y: auto; padding: 0; }
.chain-modal .list-card { border: 0; border-radius: 0; }
.branch-row { cursor: pointer; }
.branch-row:hover { background: var(--bg-soft); }
.branch-row .list-row__side b { font-size: 15px; color: var(--blue); }
.branch-row .list-row__side small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }

.branch-switch { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.branch-switch__label { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.branch-switch__label b { color: var(--ink); }
.branch-switch__label .ic { width: 15px; height: 15px; color: var(--blue); }
.branch-switch__list { display: flex; gap: 8px; flex-wrap: wrap; }
.branch-switch__list .chip { height: 32px; font-size: 12.5px; }
.branch-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); }
.branch-tag .ic { width: 14px; height: 14px; }

/* ---------- Хостес-панель ---------- */
.partner-sections { margin: 6px 0 24px; }
/* ---------- Анимации кабинета (референс Claude Design) ----------
   Префикс rb- — чтобы не столкнуться с уже существующими именами. */
/* Строка брони по макету: фото, название, «дата · гости», плашка статуса */
.bk-row__ph {
  flex: none; width: 52px; height: 52px; border-radius: 15px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center;
}
.bk-row__ph .photo { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.bk-row__ph svg { width: 20px; height: 20px; color: var(--muted); }
.list-row--booking .list-row__main h4 { font-family: var(--font-text); font-weight: 500; font-size: 15.5px; }
.list-row--booking .list-row__main p { margin: 2px 0 6px; font-size: 13px; color: var(--muted); }
.bk-row__go { flex: none; color: var(--muted); }
.bk-row__go svg { width: 18px; height: 18px; }
.list-row--booking { cursor: pointer; gap: 12px; }
.bk-hint { margin: 16px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* Каркас списка на время «Обновить» — та же пауза, что и в профиле гостя
   (.ig-skel), только блоками брони: заливка держится на теме (var(--surface-2)),
   блик — общий приём rb-sheen, приглушённый в тёмной теме тем же способом. */
.bk-skel { display: grid; gap: 14px; margin-top: 20px; }
.bk-skel__row {
  position: relative; overflow: hidden;
  display: block; height: 104px; border-radius: 18px;
  background: var(--surface-2);
}
.bk-skel__row::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
  animation: rb-sheen 1.6s ease-in-out infinite;
}
:root[data-theme="dark"] .bk-skel__row::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
}

/* Свайп по строке брони: под ней ждёт «Отменить» */
.list-row--booking { position: relative; background: var(--surface); touch-action: pan-y; will-change: transform; }
.list-row__swipe {
  position: absolute; right: -96px; top: 0; bottom: 0; width: 96px; border: 0; cursor: pointer;
  background: #ffe3d6; color: #c2560d; font: inherit; font-size: 13px; font-weight: 700;
}
.list-row--booking.is-swiped { box-shadow: -6px 0 14px rgba(20, 26, 48, .06); }

/* Значок обновления, который выезжает при потягивании */
.ptr {
  position: fixed; left: 0; right: 0; top: 0; z-index: 95; height: 0; overflow: hidden;
  display: grid; place-items: center; pointer-events: none;
  transition: height .24s cubic-bezier(.2, .85, .2, 1);
}
.ptr__spin { width: 24px; height: 24px; color: var(--blue); opacity: .8; }
.ptr__spin svg { width: 100%; height: 100%; }
.ptr.is-busy .ptr__spin { animation: rb-spin 1s linear infinite; }

/* Фото в карточке выше рамки — иначе при параллаксе снизу появлялась бы щель */
@media (max-width: 640px) {
  .result__media .photo, .post__media img { height: 112%; will-change: transform; }
}

/* Рулетка группы: кольцо крутится, пока бросок не сделан */
.spin-ring {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: conic-gradient(#ff6b1a, #1b3f7d, #cf9a34, #2f6bff, #ff6b1a);
  animation: rb-ring 9s linear infinite; display: grid; place-items: center;
}
.spin-ring::after { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.spin-ring svg { position: relative; z-index: 1; width: 22px; height: 22px; color: var(--blue); }

/* Заголовок раздела с числом или ссылкой «Смотреть все» справа */
.section__head--plain { display: flex; align-items: baseline; gap: 12px; }
.section__count { margin-left: auto; font-size: 13px; color: var(--muted); }
.section__all { margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--blue-hi); text-decoration: none; }
.section__head--plain .section-title { margin-bottom: 0; }

/* Точки под лентой рекомендаций: активная вытягивается в полоску */
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.promo-dots span {
  width: 6px; height: 6px; border-radius: 999px; background: rgba(22, 35, 63, .18);
  transition: width .28s cubic-bezier(.2, .85, .2, 1), background .28s ease;
}
.promo-dots span.is-on { width: 18px; background: var(--blue); }

/* ---------- Мои брони ----------
   Подложка выбранной вкладки переезжает; ближайший визит — тёмная карточка
   в том же ключе, что плашка смены в хостес-панели. */
.seg-tabs { position: relative; }
.seg-tabs__ink {
  position: absolute; left: 0; top: 4px; bottom: 4px; z-index: 0;
  border-radius: 12px; background: var(--surface); box-shadow: 0 1px 4px rgba(20, 26, 48, .1);
  transition: transform .38s cubic-bezier(.2, .85, .2, 1), width .38s cubic-bezier(.2, .85, .2, 1);
}
.seg-tabs__btn { position: relative; z-index: 1; }
body:not(.page-partner) .seg-tabs__btn.is-active { background: transparent; box-shadow: none; }

.nextvisit {
  position: relative; overflow: hidden; margin: 16px 0 20px; padding: 16px 16px 18px;
  border-radius: 22px; color: #fff;
  background:
    radial-gradient(420px 180px at 82% 12%, rgba(255, 107, 26, .5), transparent 70%),
    linear-gradient(118deg, #0b1f47 0%, #22508f 100%);
  box-shadow: 0 16px 34px rgba(11, 31, 71, .32);
  animation: rb-in .58s cubic-bezier(.2, .85, .2, 1) both;
}
.nextvisit__top { display: flex; align-items: center; gap: 10px; }
.nextvisit .eyebrow { margin: 0; color: rgba(255, 255, 255, .68); }
.nextvisit__state {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .13);
  font-size: 11.5px; font-weight: 600;
}
.nextvisit__state i { width: 7px; height: 7px; border-radius: 50%; background: #5ee08a; animation: rb-dot 2.2s ease-in-out infinite; }
.nextvisit__who { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.nextvisit__ph { flex: none; width: 56px; height: 56px; border-radius: 16px; overflow: hidden; }
.nextvisit__ph .photo { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.nextvisit__id { min-width: 0; display: grid; gap: 2px; }
.nextvisit__id b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.nextvisit__id em { font-style: normal; font-size: 12.5px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextvisit__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.nextvisit__grid span {
  display: grid; gap: 3px; padding: 9px 10px; border-radius: 14px; background: rgba(255, 255, 255, .11);
}
.nextvisit__grid i { font-style: normal; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .66; }
.nextvisit__grid b { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nextvisit__left { margin: 12px 0 0; font-size: 12.5px; opacity: .82; font-variant-numeric: tabular-nums; }
.nextvisit__acts { display: flex; gap: 10px; margin-top: 12px; }
.nextvisit__acts .btn { flex: 1; height: 44px; background: var(--orange); border: 0; color: #fff; }
.nextvisit__acts .btn:hover { background: var(--orange-hi); }
.nextvisit__route {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .13); color: #fff;
}
.nextvisit__route svg { width: 20px; height: 20px; }


/* Карточки на живом фоне — матовое стекло, а не глухая заливка.
   Кабинет ресторана не трогаем: там свой фон и свои карточки. */
body:not(.page-partner) .card,
body:not(.page-partner) .result,
body:not(.page-partner) .list-card,
body:not(.page-partner) .panel {
  background: rgba(255, 255, 255, .86);
  border-color: rgba(22, 35, 63, .06);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body:not(.page-partner) .card { border-radius: 18px; }
body:not(.page-partner) .result { border-radius: 20px; }
:root[data-theme="dark"] body:not(.page-partner) .card,
:root[data-theme="dark"] body:not(.page-partner) .result,
:root[data-theme="dark"] body:not(.page-partner) .list-card,
:root[data-theme="dark"] body:not(.page-partner) .panel { background: var(--surface); backdrop-filter: none; }

/* Шапка и нижняя панель — стекло поверх живого фона (гостевая часть).
   У кабинета ресторана шапка своя, поэтому правило его не касается. */
body:not(.page-partner) .header,
body:not(.page-partner) .header__main {
  background: linear-gradient(180deg, rgba(251, 250, 249, .94) 0%, rgba(251, 250, 249, .74) 68%, rgba(251, 250, 249, 0) 100%);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 0;
}
body:not(.page-partner) .header { border-bottom: 1px solid rgba(22, 35, 63, .06); }
:root[data-theme="dark"] body:not(.page-partner) .header,
:root[data-theme="dark"] body:not(.page-partner) .header__main { background: var(--bg); backdrop-filter: none; }

/* Кнопки гостевой части набраны как в макете: без капители, чуть плотнее */
body:not(.page-partner) .btn {
  text-transform: none; letter-spacing: .02em; font-weight: 700; font-size: 13.5px;
}

/* Тактильность: у кнопок и строк есть отклик на палец */
.btn, .tabbar__item, .seg-tabs__btn, .chip, .ig-count, .uset__row, .people__row .btn {
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.btn:active { transform: scale(.96); }
.tabbar__item:active { transform: scale(.94); }

/* ---------- Гостевая часть: живой фон и стекло ----------
   Фон страницы больше не плоская заливка: под содержимым медленно плывут три
   размытых пятна фирменных цветов и лежит бумажное зерно. Всё на transform,
   перерисовки нет; в кабинете ресторана свой фон — туда это не заходит. */
/* Тело страницы прозрачное — иначе белая заливка закрыла бы живой фон */
/* Живой фон лежит под содержимым (`z-index: -1`), поэтому тело страницы
   должно быть прозрачным — иначе заливка закроет пятна. В кабинете ресторана
   фон теперь такой же, как у гостя, поэтому правило общее. */
body { background: transparent; }
:root[data-theme="dark"] body { background: var(--bg); }
html { background: #fbf9f7; }
/* `html` — это и есть `:root`, поэтому потомком себе он не приходится:
   селектор `:root[data-theme="dark"] html` не совпадал ни с чем, и в тёмной
   теме из-под страницы светил белый фон. */
html[data-theme="dark"] { background: var(--bg); }
.rb-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.rb-bg__base { position: absolute; inset: 0; background: linear-gradient(176deg, #ffffff 0%, #fbf9f7 42%, #f4f2f7 100%); }
.rb-bg__blob { position: absolute; border-radius: 50%; will-change: transform; }
.rb-bg__blob--1 {
  width: 420px; height: 420px; left: -140px; top: -90px; filter: blur(14px);
  background: radial-gradient(circle, rgba(47, 107, 255, .20) 0%, rgba(47, 107, 255, 0) 68%);
  animation: rb-blob1 19s ease-in-out infinite;
}
.rb-bg__blob--2 {
  width: 380px; height: 380px; right: -130px; top: 180px; filter: blur(16px);
  background: radial-gradient(circle, rgba(255, 107, 26, .19) 0%, rgba(255, 107, 26, 0) 66%);
  animation: rb-blob2 24s ease-in-out infinite;
}
.rb-bg__blob--3 {
  width: 460px; height: 460px; left: -90px; bottom: -190px; filter: blur(18px);
  background: radial-gradient(circle, rgba(207, 154, 52, .17) 0%, rgba(207, 154, 52, 0) 70%);
  animation: rb-blob3 27s ease-in-out infinite;
}
.rb-bg__grain {
  position: absolute; inset: -30%; opacity: .055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* В кабинете тот же фон, только спокойнее: хостес смотрит в панель всю смену,
   и быстрое движение за карточками отвлекало бы. Пятна крупнее и бледнее,
   ход вдвое медленнее — фон должен читаться как воздух, а не как анимация. */
.rb-bg--calm .rb-bg__blob { filter: blur(28px); opacity: .72; }
.rb-bg--calm .rb-bg__blob--1 { width: 620px; height: 620px; animation-duration: 38s; }
.rb-bg--calm .rb-bg__blob--2 { width: 560px; height: 560px; animation-duration: 46s; }
.rb-bg--calm .rb-bg__blob--3 { width: 680px; height: 680px; animation-duration: 52s; }
.rb-bg--calm .rb-bg__grain { opacity: .04; }

/* Тёмная тема остаётся опцией: там пятна только мешали бы */
:root[data-theme="dark"] .rb-bg { display: none; }

@keyframes rb-blob1 { 0%, 100% { transform: translate3d(-6%, -4%, 0) scale(1); } 50% { transform: translate3d(10%, 8%, 0) scale(1.18); } }
@keyframes rb-blob2 { 0%, 100% { transform: translate3d(8%, 6%, 0) scale(1.1); } 50% { transform: translate3d(-8%, -6%, 0) scale(.92); } }
@keyframes rb-blob3 { 0%, 100% { transform: translate3d(0, 4%, 0) scale(.95); } 50% { transform: translate3d(6%, -8%, 0) scale(1.2); } }
@keyframes rb-pop { 0% { transform: scale(1); } 38% { transform: scale(.82) translateY(-3px); } 72% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes rb-shimmer { 0% { background-position: -140% 0; } 100% { background-position: 240% 0; } }
@keyframes rb-ring { to { transform: rotate(360deg); } }
@keyframes rb-dot { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

@keyframes rb-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes rb-drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-26px, -14px, 0) scale(1.08); } }
@keyframes rb-drift-b { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(22px, -20px, 0) scale(1); } }
@keyframes rb-sheen { 0% { transform: translateX(-120%) skewX(-18deg); } 55%, 100% { transform: translateX(320%) skewX(-18deg); } }
@keyframes rb-sheen-card { 0% { transform: translateX(-110%) skewX(-14deg); } 62%, 100% { transform: translateX(400%) skewX(-14deg); } }
@keyframes rb-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(27, 63, 125, 0); } 50% { box-shadow: 0 0 0 8px rgba(27, 63, 125, .10); } }
@keyframes rb-alarm { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); transform: translateY(0); } 50% { box-shadow: 0 0 0 9px rgba(229, 72, 77, .13); transform: translateY(-1px); } }
@keyframes rb-swing { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
@keyframes rb-rock { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes rb-seatpulse { 0%, 100% { opacity: .25; transform: scale(.82); } 50% { opacity: .7; transform: scale(1); } }
@keyframes rb-steam { 0% { opacity: 0; transform: translateY(2px) scaleY(.6); } 35% { opacity: .85; } 100% { opacity: 0; transform: translateY(-7px) scaleY(1.2); } }
@keyframes rb-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }
@keyframes rb-draw { 0% { stroke-dashoffset: 64; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes rb-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rb-flash { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 26, .55); } 100% { box-shadow: 0 0 0 16px rgba(255, 107, 26, 0); } }
@keyframes rb-toast { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rb-dotwave { 0%, 100% { transform: scale(.7); opacity: .45; } 50% { transform: scale(1.15); opacity: 1; } }

/* ---------- Переходы ----------
   Смена вкладки: новое содержимое въезжает коротким ходом, а не подменяется
   рывком. Ход мельче, чем у rb-in: вкладку переключают часто, и заметное
   движение на каждый тап быстро надоедает. Ставит класс paintPanel(). */
.is-swap { animation: rb-swap .28s cubic-bezier(.2, .85, .2, 1); }
@keyframes rb-swap { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* Соседние вкладки: содержимое въезжает с той стороны, куда пошли, —
   вправо ушли, справа и приехало. Так переход читается как движение
   по ряду вкладок, а не как подмена на месте. */
.is-swap--right { animation: rb-swap-right .3s cubic-bezier(.2, .85, .2, 1); }
.is-swap--left  { animation: rb-swap-left  .3s cubic-bezier(.2, .85, .2, 1); }
@keyframes rb-swap-right { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes rb-swap-left  { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }

/* Переход между страницами: уходящая гаснет (класс вешает обработчик ссылок
   в app.js), пришедшая проявляется сама при загрузке. Двигаем только
   прозрачность: сдвиг всей страницы на телефоне читается как подёргивание. */
/* `transition` держим на самом body, а не внутри `.is-leaving`: иначе он
   появляется одновременно со сменой прозрачности, и браузеру нечего
   сравнивать — значение прыгает в 0 без перехода. */
body { animation: rb-page-in .22s ease-out; transition: opacity .13s ease-in; }
@keyframes rb-page-in { from { opacity: 0; } to { opacity: 1; } }
body.is-leaving { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  body { transition: none; }
  body.is-leaving { opacity: 1; }
}

/* ---------- Плашка смены ----------
   Часы идут стрелками: анимация крутится сама, а стартовый угол задан
   отрицательной задержкой, равной секундам от полуночи по Ташкенту.
   Поэтому стрелки не зависят от такта JS и не дёргаются. */
.rbshift {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff;
  padding: 24px 28px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  background: linear-gradient(118deg, #0b1f47 0%, #1b3f7d 58%, #22508f 100%);
  box-shadow: 0 18px 44px rgba(13, 35, 80, .28);
  margin: 6px 0 22px;
}
/* Блик по плашке смены. Ширина — доля самой плашки, а не 90 пикселей:
   `translateX` считается от ширины элемента, и при постоянных пикселях блик
   доезжал до одного и того же места и на узком экране, и на широком —
   то есть на широком останавливался посередине. Ход идёт до конца карточки
   (28% ширины блика × 400% = 112% карточки), дальше пауза.
   Отрицательная задержка приходит из JS и равна секундам от полуночи:
   панель перерисовывается каждые 30 секунд, и без этого блик каждый раз
   прыгал бы в начало — тот же приём, что у стрелок часов. */
.rbshift__sheen {
  position: absolute; top: 0; bottom: 0; left: 0; width: 28%; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .13), rgba(255, 255, 255, 0));
  animation: rb-sheen-card 9s cubic-bezier(.4, 0, .2, 1) infinite;
  will-change: transform;
}
.rbshift__left { display: flex; align-items: center; gap: 18px; flex: none; }
.rbshift__dial { position: relative; width: 112px; height: 112px; flex: none; }
.rbshift__dial svg { width: 100%; height: 100%; overflow: visible; }
.rbshift__hand { transform-origin: 50px 50px; animation-timing-function: linear; animation-iteration-count: infinite; }
.rbshift__hand--h { animation-name: rb-spin; animation-duration: 43200s; }
.rbshift__hand--m { animation-name: rb-spin; animation-duration: 3600s; }
/* Секундная стрелка идёт не по-кварцевому — раз в секунду, — а восемь раз
   в секунду: это 28 800 полуколебаний в час, ход дорогого механического
   калибра. Глазу это читается как плавное скольжение, но лёгкая «зернистость»
   хода остаётся — она и отличает механику от простой линейной анимации. */
.rbshift__hand--s { animation-name: rb-spin; animation-duration: 60s; animation-timing-function: steps(480, end); }

.rbshift__zone { margin: 0 0 2px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .58); }
.rbshift__time {
  margin: 0; display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-size: 44px; line-height: 1.02; font-weight: 800;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.rbshift__time em { font-style: normal; font-size: 22px; font-weight: 700; color: #ff8642; margin-left: 4px; }
.rbshift__date { margin: 4px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .72); }

.rbshift__run { flex: 1 1 260px; min-width: 240px; }
.rbshift__runtop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.rbshift__runtop p { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .58); }
.rbshift__runtop b { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .82); letter-spacing: 0; text-transform: none; }
.rbshift__track { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.rbshift__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ff8642, #ff6b1a); transition: width 1s linear; }
.rbshift__glint { position: absolute; inset: 0; width: 40%; animation: rb-sweep 3.6s ease-in-out infinite; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .35), rgba(255, 255, 255, 0)); }
.rbshift__nums { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.rbshift__nums b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rbshift__nums span { font-size: 12px; color: rgba(255, 255, 255, .62); }

/* Календарь внутри плашки раскрывается на светлом — текст в нём тёмный */
.rbshift__nav .fdrop { color: var(--ink); }

/* Навигация по дате живёт в самой плашке */
.rbshift__nav { display: flex; align-items: center; gap: 10px; flex: none; }
.rbshift__nav .date-nav__arrow,
.rbshift__nav .date-nav__value {
  border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff;
  height: 44px; transition: background .18s ease, transform .18s ease;
}
.rbshift__nav .date-nav__arrow { width: 44px; }
.rbshift__nav .date-nav__arrow:hover { background: rgba(255, 255, 255, .2); }
.rbshift__nav .date-nav__value em { background: rgba(255, 255, 255, .18); color: #fff; }
.rbshift__nav .date-nav__value .ic { color: rgba(255, 255, 255, .75); }

@media (max-width: 640px) {
  .rbshift { gap: 18px; padding: 18px; border-radius: 18px; }
  .rbshift__dial { width: 76px; height: 76px; }
  .rbshift__time { font-size: 34px; }
  .rbshift__time em { font-size: 17px; }
  .rbshift__nums { gap: 16px; }
  .rbshift__nums b { font-size: 19px; }
}

/* ---------- Регистрация по шагам ----------
   Одно окно — один вопрос. Точки сверху показывают, сколько осталось:
   человек соглашается заполнять анкету, когда видит её конец. */
.regsteps { display: flex; gap: 6px; margin: 0 0 18px; }
.regsteps i {
  flex: 1; height: 4px; border-radius: 999px; background: var(--line-soft);
  transition: background .3s ease;
}
.regsteps i.is-done { background: var(--blue-soft); }
.regsteps i.is-now { background: var(--blue); }

.reg-title { margin: 0 0 4px; font-size: 21px; }
.reg-sub { margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.reg-back {
  display: block; margin: 14px auto 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--muted);
}

.reg-photo { display: grid; justify-items: center; gap: 14px; margin-bottom: 22px; }
.reg-photo__frame {
  width: 128px; height: 128px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--line-soft); color: var(--muted);
  border: 2px dashed var(--line);
}
.reg-photo__frame img { width: 100%; height: 100%; object-fit: cover; }
.reg-photo__frame i svg { width: 34px; height: 34px; }

.reg-perm { flex: none; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.reg-perm.is-on { color: #2f8f5b; }
.reg-perm.is-off { color: var(--muted); }

/* ---------- Живое табло раздачи ----------
   Два разных устройства и две разные дистанции чтения: телевизор смотрят
   через зал, моноблок — с полуметра и пальцем. Поэтому у табло цифра во весь
   экран, а у кухни — крупные кнопки, между которыми нельзя промахнуться. */
.board__open { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.board__preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.board__empty { color: var(--muted); padding: 18px 0; margin: 0; }

/* Телевизор: ничего, кроме названий и чисел.

   Главное правило экрана — сначала то, что **есть**. Кончившееся гаснет
   и уходит вниз: пятнадцать красных «нет» кричали громче единственной
   зелёной цифры, а официанту нужно ровно обратное.

   Размер плиток считает JS (`--cols`): в CSS неоткуда узнать, три позиции
   на табло или пятнадцать, а разница между ними — во весь экран. */
body.page-board { overflow: hidden; }
body.page-board .partner-head,
body.page-board .partner-sections,
body.page-board .footer,
body.page-board .header { display: none !important; }

.board {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  padding: 2.4vh 2.4vw; background: var(--bg);
}
/* Шапка табло — тот же приём, что у плашки смены в хостес-панели: тёмный
   градиент, настоящий циферблат со стрелками и цифровое время с оранжевыми
   секундами. Один и тот же кабинет не должен выглядеть двумя разными
   программами. */
.board__head {
  position: relative; overflow: hidden; flex: none;
  display: flex; align-items: center; gap: clamp(14px, 2vw, 32px);
  padding: clamp(10px, 1.6vh, 22px) clamp(14px, 1.8vw, 28px);
  margin-bottom: clamp(10px, 1.6vh, 22px);
  border-radius: clamp(14px, 1.4vw, 22px); color: #fff;
  background: linear-gradient(118deg, #0b1f47 0%, #1b3f7d 58%, #22508f 100%);
  box-shadow: 0 18px 44px rgba(13, 35, 80, .28);
}
.board__sheen {
  position: absolute; top: 0; bottom: 0; left: 0; width: 28%; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .13), rgba(255, 255, 255, 0));
  animation: rb-sheen-card 9s cubic-bezier(.4, 0, .2, 1) infinite;
}
.board__head .rbshift__dial { width: clamp(56px, 6vw, 104px); height: clamp(56px, 6vw, 104px); }
.board__when { flex: none; }
.board__head .rbshift__time { font-size: clamp(26px, 3.4vw, 54px); }
.board__head .rbshift__time em { font-size: clamp(14px, 1.6vw, 26px); }
.board__venue {
  margin-left: auto; text-align: right; display: flex; flex-direction: column; gap: 2px;
}
.board__venue span {
  font-size: clamp(10px, 1vw, 14px); font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255, 255, 255, .58);
}
.board__venue b {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(18px, 2.2vw, 40px);
}

/* Два ряда: главные позиции (у Kamolon Osh — пять пловов) отдельной строкой
   и крупнее, остальное под ними. Ради главного ряда табло и вешали. */
.board__grid { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1.2vh, 20px); }
.board__list {
  display: grid; width: 100%; gap: clamp(8px, 1vw, 20px);
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  grid-auto-rows: 1fr;
}
/* Доли высоты: главный ряд крупнее, но нижний не должен вылезать за экран —
   поэтому обоим `min-height: 0` и обоим запрещено расти по содержимому. */
.board__list--big { flex: 3 1 0; min-height: 0; overflow: hidden; }
.board__list--rest { flex: 2 1 0; min-height: 0; overflow: hidden; }
.board__list--big + .board__list--rest .board__num { font-size: clamp(24px, min(26vw / var(--cols, 3), 26vh / var(--rows, 3)), 96px); }
.board__list--big + .board__list--rest .board__name { font-size: clamp(10px, min(5vw / var(--cols, 3), 5vh / var(--rows, 3)), 20px); }
/* Один ряд — тянем его на всю высоту */
.board__list:only-child { flex: 1 1 100%; height: 100%; }

/* Плитка: сверху название, снизу цифра. Название должно помещаться целиком —
   именно по нему официант узнаёт блюдо, обрезать его нельзя. */
.board__tile {
  min-width: 0; border-radius: clamp(12px, 1.2vw, 22px);
  padding: clamp(10px, 1.4vh, 22px) clamp(8px, 1vw, 18px);
  background: var(--surface); border: 2px solid var(--line);
  /* Название и цифра держатся вместе по центру плитки: при трёх позициях
     плитка во весь экран, и разнесённые по краям подпись с числом читались
     как две несвязанные вещи. */
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(4px, 1.4vh, 16px); text-align: center;
}
.board__name {
  font-weight: 700; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere;
  font-size: clamp(11px, min(7vw / var(--cols, 3), 9vh / var(--rows, 3)), 30px);
  color: var(--muted); text-transform: uppercase; letter-spacing: .02em;
}
.board__num {
  font-family: var(--font-display); font-weight: 800; line-height: .95;
  font-variant-numeric: tabular-nums;
  /* Цифру ограничивают обе стороны плитки: по ширине — число колонок,
     по высоте — число рядов. Берём меньшее, иначе она вылезет. */
  font-size: clamp(28px, min(40vw / var(--cols, 3), 50vh / var(--rows, 3)), 220px);
}

.board__tile.is-ok { border-color: rgba(47, 143, 91, .45); }
.board__tile.is-ok .board__num { color: #2f8f5b; }
.board__tile.is-low { border-color: rgba(255, 107, 26, .55); }
.board__tile.is-low .board__num { color: var(--orange); }

/* Стоп — и когда повар снял блюдо с раздачи, и когда казан пуст: официанту
   это одно и то же, блюдо не отдают. Печатаем «СТОП» словом, а не цифрой:
   через зал читается именно слово. Кончившееся держим тише снятого руками —
   оно вернётся само, как только доготовят. */
.board__tile.is-out, .board__tile.is-stop { border-style: dashed; }
.board__tile.is-out { opacity: .62; }
.board__tile.is-stop { border-style: solid; border-color: rgba(229, 72, 77, .6); background: rgba(229, 72, 77, .07); }
.board__tile.is-out .board__num, .board__tile.is-stop .board__num {
  color: #e5484d; font-family: var(--font-display); font-weight: 800; letter-spacing: .04em;
  font-size: clamp(18px, min(18vw / var(--cols, 3), 24vh / var(--rows, 3)), 74px);
  text-transform: uppercase;
}
.board__tile.is-out .board__num { color: #b4585b; }

/* Порция ушла — плитка коротко вздрагивает, и вверх уплывает «−1».
   Это единственное движение на табло: официант смотрит на него боковым
   зрением, и заметить он должен изменение, а не анимацию вообще. */
.board__tile { position: relative; transition: border-color .3s ease, opacity .3s ease; }
.board__tile.is-drop { animation: rb-board-drop .85s cubic-bezier(.2, .8, .3, 1); }
.board__tile.is-rise { animation: rb-board-rise .85s cubic-bezier(.2, .8, .3, 1); }
@keyframes rb-board-drop {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 72, 77, .5); }
  22%  { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(229, 72, 77, .18); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}
@keyframes rb-board-rise {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(47, 143, 91, .5); }
  22%  { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(47, 143, 91, .18); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(47, 143, 91, 0); }
}
.board__delta {
  position: absolute; top: 8%; right: 8%; font-style: normal; pointer-events: none;
  font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: clamp(16px, min(9vw / var(--cols, 3), 12vh / var(--rows, 3)), 44px);
  animation: rb-board-delta 1.3s ease-out forwards;
}
.board__delta.is-drop { color: #e5484d; }
.board__delta.is-rise { color: #2f8f5b; }
@keyframes rb-board-delta {
  0%   { opacity: 0; transform: translateY(14px) scale(.8); }
  18%  { opacity: 1; transform: translateY(0) scale(1); }
  70%  { opacity: 1; transform: translateY(-10px); }
  100% { opacity: 0; transform: translateY(-28px); }
}

/* Отметка «крупно» в настройках табло */
.board__big-pick { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.board__big-pick em { font-style: normal; font-size: 12px; color: var(--muted); }

.board__exit {
  position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: transparent; color: var(--line); font-size: 22px; cursor: pointer;
  transition: color .18s ease, background .18s ease;
}
.board__exit:hover { background: var(--line-soft); color: var(--muted); }

/* Кухня: то же самое, но с кнопками под палец */
body.page-kitchen .partner-head,
body.page-kitchen .partner-sections,
body.page-kitchen .footer,
body.page-kitchen .header { display: none !important; }
.kitchen { padding: 22px 24px 28px; }
.kitchen__head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.kitchen__title { flex: 1 1 auto; min-width: 0; }
.kitchen__head h1 { margin: 0; font-size: 25px; letter-spacing: -.01em; }
.kitchen__title p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
/* Часы у повара — такие же, как на табло: один кабинет, один язык */
.kitchen__clock {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kitchen__clock em { font-style: normal; font-size: 17px; color: var(--orange); margin-left: 2px; }
.kitchen__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
.kitchen__card {
  border-radius: 26px; padding: 22px 22px 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(22, 35, 63, .06);
  display: flex; flex-direction: column; gap: 14px;
}
.kitchen__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.kitchen__title-box { min-width: 0; }
.kitchen__name { font-size: 20px; font-weight: 700; }
.kitchen__weights { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.kitchen__num {
  font-family: var(--font-display); font-size: 52px; font-weight: 800;
  line-height: .95; font-variant-numeric: tabular-nums;
}
/* Полоса остатка: сколько от приготовленного ещё лежит на раздаче */
.kitchen__bar { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.kitchen__bar i {
  display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f8f5b, #46c07f);
  transition: width .4s ease;
}
.kitchen__card.is-low .kitchen__bar i { background: linear-gradient(90deg, #c9520f, var(--orange)); }
.kitchen__card.is-out .kitchen__bar i, .kitchen__card.is-stop .kitchen__bar i { background: #e5484d; }
.kitchen__card.is-ok .kitchen__num { color: #2f8f5b; }
.kitchen__card.is-low .kitchen__num { color: var(--orange, #ff6b1a); }
.kitchen__card.is-out .kitchen__num { color: #e5484d; }
.kitchen__card.is-stop { border-color: rgba(229, 72, 77, .55); }
.kitchen__card.is-stop .kitchen__num { color: #e5484d; }

/* Стоп на кухне: одна кнопка ставит и снимает, поэтому нажатая заливается
   красным — повару видно состояние, а не только подпись. */
.kitchen__flag {
  display: inline-block; margin-left: 8px; padding: 3px 10px; border-radius: 999px; vertical-align: 2px;
  background: #e5484d; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 11.5px; letter-spacing: .06em;
}
.kitchen__stop {
  border: 2px solid rgba(229, 72, 77, .5); border-radius: 14px; min-height: 48px; cursor: pointer;
  font: inherit; font-family: var(--font-display); font-size: 16px; font-weight: 800;
  background: transparent; color: #e5484d; transition: transform .1s ease;
}
.kitchen__stop.is-on { background: #e5484d; border-color: #e5484d; color: #fff; }
.kitchen__stop:active { transform: scale(.95); }
.kitchen__sub { margin: 0; font-size: 13px; color: var(--muted); }
.kitchen__count { text-align: right; }
.kitchen__count em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.kitchen__btns--small { grid-template-columns: repeat(2, 1fr); margin-top: 10px; }
.kitchen__btns--small .kitchen__add, .kitchen__btns--small .kitchen__less { min-height: 48px; font-size: 16px; }
.kitchen__add--ghost { background: var(--blue-soft); color: var(--blue-text); }


/* Килограммы под цифрой на табло: официанту нужны обе величины, но главная —
   порции, поэтому объём идёт подписью, а не вторым крупным числом. */
.board__kg {
  display: block; font-weight: 700; color: var(--muted);
  /* Килограммы и порции официант читает с того же места, что и цифру,
     поэтому подпись крупнее «мелкого шрифта»: примерно четверть числа */
  font-size: clamp(14px, min(8vw / var(--cols, 3), 9vh / var(--rows, 3)), 34px);
}

/* Ширину съедают знаки: «14,7» вчетверо длиннее «5», и одному размеру
   на всех тут не быть — уменьшаем шаг за шагом по длине числа. */
.board__tile--c4 .board__num { font-size: clamp(26px, min(30vw / var(--cols, 3), 46vh / var(--rows, 3)), 180px); }
.board__tile--c5 .board__num { font-size: clamp(24px, min(25vw / var(--cols, 3), 42vh / var(--rows, 3)), 150px); }
.board__tile--c6 .board__num { font-size: clamp(22px, min(20vw / var(--cols, 3), 38vh / var(--rows, 3)), 130px); }
.board__list--big + .board__list--rest .board__tile--c4 .board__num { font-size: clamp(22px, min(20vw / var(--cols, 3), 22vh / var(--rows, 3)), 78px); }
.board__list--big + .board__list--rest .board__tile--c5 .board__num { font-size: clamp(20px, min(17vw / var(--cols, 3), 20vh / var(--rows, 3)), 66px); }
.board__list--big + .board__list--rest .board__tile--c6 .board__num { font-size: clamp(18px, min(14vw / var(--cols, 3), 18vh / var(--rows, 3)), 58px); }

/* Таблица весов в настройках табло */
.bweights__in { width: 92px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }
.bweights td b { font-variant-numeric: tabular-nums; }
.kitchen__btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kitchen__add, .kitchen__less {
  border: 0; border-radius: 14px; min-height: 64px; cursor: pointer;
  font: inherit; font-family: var(--font-display); font-size: 21px; font-weight: 800;
  background: var(--blue); color: #fff; transition: transform .1s ease;
}
.kitchen__less { background: var(--line-soft); color: var(--ink); }
.kitchen__add:active, .kitchen__less:active { transform: scale(.95); }

@media (max-width: 640px) {
  .kitchen__grid { grid-template-columns: 1fr; }
  .board__grid { gap: 14px; }
}

/* ---------- База гостей ----------
   Список — та же таблица, что в меню кабинета; строка кликабельна целиком,
   кроме телефона: по нему звонят, а не открывают карточку. */
.gbase__table tbody tr { cursor: pointer; }
.gbase__table tbody tr:hover { background: var(--blue-soft); }
.gbase__table .ic--caret { color: var(--muted); }
.gbase__tier {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--line-soft); color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.gbase__tier.is-blue { background: var(--blue-soft); color: var(--blue-text); }
.gbase__tier.is-gold { background: rgba(207, 154, 52, .16); color: #7a5410; }

/* Числа в карточке гостя — та же приборная панель, что в плашке смены */
.gbase__nums {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 14px;
  padding: 16px; border-radius: 16px; background: var(--line-soft);
}
.gbase__nums div { text-align: center; }
.gbase__nums b {
  display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.gbase__nums span { font-size: 11.5px; color: var(--muted); }

@media (max-width: 640px) {
  .gbase__nums { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; }
  .gbase__nums b { font-size: 17px; }
}

/* Язык и тема в шапке кабинета. У хостес нет гостевого профиля, где эти
   переключатели живут у гостя, — а панель стоит у стойки и работает вечером,
   поэтому тёмный режим ей нужнее всех. */
.head-tools { display: inline-flex; align-items: center; gap: 6px; }
.head-lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--line-soft); }
.head-lang button {
  border: 0; background: none; cursor: pointer; padding: 5px 9px; border-radius: 999px;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--muted);
  transition: background .18s ease, color .18s ease;
}
.head-lang button.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 30, 60, .12); }
.head-theme {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background .18s ease, transform .18s ease;
}
.head-theme:hover { background: var(--line-soft); }
.head-theme svg { width: 17px; height: 17px; }

/* ---------- Колокольчик новых броней ----------
   Тост исчезает через четыре секунды, а хостес может отойти от стойки.
   Колокольчик держит список, пока его не открыли. */
.bell { position: relative; }
.bell__btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.bell__btn:hover { border-color: var(--blue); color: var(--blue); }
.bell__btn .ic { width: 21px; height: 21px; }
.bell__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-family: var(--font-display); font-size: 11.5px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--surface);
  animation: bell-pop .4s cubic-bezier(.2, .8, .3, 1);
}
@keyframes bell-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.bell.is-open .bell__btn { border-color: var(--blue); color: var(--blue); }

.bell__drop {
  position: absolute; right: 0; top: 52px; z-index: 70; width: min(320px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden;
}
.bell__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.bell__head b { font-size: 14.5px; }
.bell__clear { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--blue-hi); }
.bell__list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.bell__list li { display: grid; gap: 2px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.bell__list b { font-size: 14.5px; }
.bell__list span { color: var(--muted); font-size: 12.5px; }
.bell__list a { color: var(--blue-hi); font-size: 12.5px; }
.bell__empty { margin: 0; padding: 18px 14px; color: var(--muted); font-size: 13.5px; text-align: center; }
.bell__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: var(--surface-2); }
.bell__switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink); cursor: pointer; }
.bell__allow { border: 0; background: var(--blue); color: #fff; border-radius: 8px; padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.bell__ok { font-size: 12.5px; color: #2f8f5b; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .bell__count { animation: none; } }
/* Когда шапка кабинета переносится, колокольчик стоит слева — и список
   должен раскрываться вправо, иначе уезжает за край экрана */
@media (max-width: 900px) { .bell__drop { left: 0; right: auto; } }

/* ---------- Живой фон хостес-панели ----------
   Зал дышит: пока столы свободны, за карточками стоит прохладный синий свет;
   чем больше занятых, тем он теплее. Число --load ставит floorLoad() при каждой
   перерисовке панели, а она обновляется сама раз в 30 секунд.
   Два пятна ходят с разной скоростью — они никогда не совпадают, поэтому
   движение не читается как повтор. Всё на transform: перерисовки нет. */
.hostess { position: relative; isolation: isolate; }
.hostess::before, .hostess::after {
  content: ''; position: absolute; left: -40px; right: -40px; top: -90px; height: 620px;
  z-index: -1; pointer-events: none; filter: blur(18px); transition: opacity 1.4s ease;
}
.hostess::before {
  background:
    radial-gradient(46% 58% at 14% 32%, rgba(27, 63, 125, .30), transparent 72%),
    radial-gradient(40% 50% at 84% 14%, rgba(27, 63, 125, .22), transparent 74%);
  opacity: calc(1 - var(--load, 0) * .8);
  animation: floor-drift-a 34s ease-in-out infinite alternate;
}
.hostess::after {
  background:
    radial-gradient(48% 60% at 72% 30%, rgba(255, 107, 26, .30), transparent 72%),
    radial-gradient(38% 46% at 18% 10%, rgba(224, 166, 60, .28), transparent 74%);
  opacity: calc(var(--load, 0) * .95);
  animation: floor-drift-b 26s ease-in-out infinite alternate;
}
@keyframes floor-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-26px, -14px, 0) scale(1.08); }
}
@keyframes floor-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(22px, -20px, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hostess::before, .hostess::after { animation: none; }
}

.hostess__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.hostess__head h2 { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.hostess__head p { margin: 0; font-size: 14px; max-width: 520px; }
.hostess__date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hostess__datepicker {
  height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700;
}
.hostess__legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 22px 0 4px; font-size: 13.5px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.table-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; margin-bottom: 8px; }
.table-card {
  display: grid; gap: 4px; align-content: start; text-align: left; padding: 15px 16px 15px 19px;
  border-radius: 14px; cursor: pointer; position: relative; overflow: hidden;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
/* Цветная полоса статуса слева. У занятого стола она заодно показывает,
   сколько времени гости уже сидят: заполняется снизу вверх к концу брони. */
.table-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line); }
.table-card::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 5px; height: var(--visit, 0);
  background: color-mix(in srgb, var(--ink) 34%, transparent);
  transition: height 30s linear;
}
.table-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* Подпись статуса набрана в разрядку капителью — её читают боковым зрением */
.table-card__status { text-transform: uppercase; letter-spacing: .05em; }
.table-card.is-cleaning { border-color: #dcdfe6; background: linear-gradient(180deg, #ffffff, #f6f5f4); }

/* Цифры в панели не должны дрожать при каждом тике таймера */
.table-card, .table-timer, .stat__value, .tz-clock b { font-variant-numeric: tabular-nums; }

/* Стол сменил состояние — карточка коротко подсвечивается: гостей посадили,
   стол освободился. Больше в плане зала ничего не двигается. */
@keyframes table-just {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue) 55%, transparent); }
  to   { box-shadow: 0 0 0 13px transparent; }
}
.table-card.is-just { animation: rb-flash 1.1s ease-out 2; }
@media (prefers-reduced-motion: reduce) {
  .table-card.is-just { animation: none; }
  .table-card::after { transition: none; }
}
.table-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.table-card__name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.table-card__seats { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.table-card__seats .ic { width: 14px; height: 14px; }
.table-card__status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.table-card__line { font-size: 12.5px; color: var(--muted); }
.table-card__flag {
  display: inline-block; align-self: start; margin-top: 4px; font-size: 11.5px; font-weight: 800;
  background: color-mix(in srgb, #e5484d 16%, var(--surface)); color: #c2360d; padding: 3px 9px; border-radius: 999px;
}
.table-card__act {
  margin-top: 9px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--blue); font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.table-card__act:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.table-card.is-late { border-color: #e5484d; }
.table-card.is-late::before { background: #e5484d; }
.table-card.is-free::before { background: #35a26a; }
.table-card.is-reserved::before { background: var(--blue); }
.table-card.is-seated::before { background: var(--orange); }
.table-card.is-cleaning::before { background: #98a2b8; }

/* Статус в списке столов */
.table-status { display: inline-flex; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.table-status.is-free { background: color-mix(in srgb, #35a26a 15%, var(--surface)); color: #2f8f5b; }
.table-status.is-reserved { background: var(--blue-soft); color: var(--blue-text); }
.table-status.is-seated { background: var(--amber-soft); color: var(--amber-text); }

/* Плитки смены */
.stat-grid--hostess { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.stat--rich { display: grid; gap: 8px; padding: 18px 20px; border-radius: 16px; }
/* Приборная панель смены: цифра — главное, подпись уходит в тихую капитель */
.stat--rich .stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.stat--rich .stat__value { font-family: var(--font-display); letter-spacing: -.03em; }
/* Цифра меняется — плитка коротко об этом сообщает */
@keyframes stat-bump { from { transform: translateY(7px); opacity: .35; } to { transform: none; opacity: 1; } }
.stat__value.is-bump { animation: stat-bump .45s cubic-bezier(.2, .7, .3, 1); }
@media (prefers-reduced-motion: reduce) { .stat__value.is-bump { animation: none; } }
/* Значок плитки — объёмная плашка: градиент плюс внутренняя тень снизу */
.stat--rich .stat__icon { width: 38px; height: 38px; border-radius: 12px; }
.stat--rich .stat__icon .ic { width: 21px; height: 21px; }
.stat--rich { border: 1px solid var(--line-soft); box-shadow: 0 2px 6px rgba(46, 32, 14, .05), 0 12px 26px rgba(46, 32, 14, .06); transition: transform .2s ease, box-shadow .2s ease; }
.stat--rich:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(46, 32, 14, .12); }
.stat--green { border-color: #e3efe8; background: linear-gradient(180deg, #ffffff, #f4fbf7); }
.stat--orange { border-color: #f6e0d1; background: linear-gradient(180deg, #ffffff, #fff6f0); }
.stat--blue { border-color: #dbe4f6; background: linear-gradient(180deg, #ffffff, #f4f7fe); }
.stat--saffron { border-color: #efe0c2; background: linear-gradient(180deg, #ffffff, #fdf8ef); }
.stat--blue .stat__icon { background: linear-gradient(160deg, #e4ecfb, #d3e0f8); color: var(--blue); box-shadow: inset 0 -2px 0 rgba(27, 63, 125, .18), 0 4px 10px rgba(27, 63, 125, .14); }
.stat--blue .stat__value { color: var(--blue); }
.stat--orange .stat__icon { background: linear-gradient(160deg, #ffe8da, #ffd6bd); color: #c2560d; box-shadow: inset 0 -2px 0 rgba(194, 86, 13, .18), 0 4px 10px rgba(194, 86, 13, .14); }
.stat--saffron .stat__icon { background: linear-gradient(160deg, #f9eed6, #f2e0b8); color: #8a6212; box-shadow: inset 0 -2px 0 rgba(138, 98, 18, .18), 0 4px 10px rgba(138, 98, 18, .14); }
.stat--green .stat__icon { background: linear-gradient(160deg, #e4f6ec, #cfeedd); color: #2f8f5b; box-shadow: inset 0 -2px 0 rgba(47, 143, 91, .18), 0 4px 10px rgba(47, 143, 91, .16); }
/* Колокольчик «Ожидается» качается, детский стул покачивается */
.stat--blue .stat__icon .ic svg { animation: rb-swing 3.6s ease-in-out infinite; transform-origin: 50% 15%; }
.stat--saffron .stat__icon .ic svg { animation: rb-rock 3.2s ease-in-out infinite; transform-origin: 50% 80%; }
.stat--green .stat__bar i { background: #35a26a; }
/* Цифра того же цвета, что и полоса: плитка читается одним взглядом */
.stat--green .stat__value { color: #2f8f5b; }
.stat--saffron .stat__value { color: #8a6212; }
.stat--orange .stat__bar i { background: var(--orange); }
.stat--saffron .stat__icon { background: var(--saffron-soft); color: #8a6212; }
.stat--saffron .stat__bar i { background: var(--saffron); }
.stat__head { display: flex; align-items: center; gap: 9px; }
.stat__icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.stat__icon .ic { width: 17px; height: 17px; }
.stat--rich .stat__label { margin: 0; }
.stat__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat--rich .stat__value { margin: 0; font-size: 28px; }
.stat--orange .stat__icon { background: var(--amber-soft); color: var(--amber-text); }
.stat--orange .stat__value { color: var(--amber-text); }
.stat__bar { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.stat__bar i { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.stat--orange .stat__bar i { background: var(--orange); }
.stat__ring {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--blue) calc(var(--pct) * 1%), var(--surface-2) 0);
}
.stat__ring b { width: 38px; height: 38px; border-radius: 50%; background: var(--surface); }
/* В тёмной теме кольцо читалось чёрным пятном: плитка там стеклянная
   (прозрачная), а серединку кольца закрывал непрозрачный кружок `--surface`.
   Поэтому здесь вырезаем настоящую дырку маской — тогда сквозь кольцо видно
   ту же подложку, что и вокруг, на любом фоне. */
:root[data-theme="dark"] .stat__ring {
  background: conic-gradient(var(--blue-hi) calc(var(--pct) * 1%), rgba(255, 255, 255, .14) 0);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 0 18px, #000 19px);
  mask: radial-gradient(circle at 50% 50%, transparent 0 18px, #000 19px);
}
:root[data-theme="dark"] .stat__ring b { background: none; }

/* Опоздания */
/* Плашка опозданий — единственное, что дышит: её нельзя пропустить */
.hostess__alert {
  display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 4px; padding: 14px 18px;
  border-radius: 12px; background: color-mix(in srgb, #e5484d 10%, var(--surface)); border: 1px solid color-mix(in srgb, #e5484d 35%, var(--surface));
  animation: alert-breathe 3s ease-in-out infinite;
}
@keyframes alert-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
  50%      { box-shadow: 0 0 0 7px rgba(229, 72, 77, .09); }
}
@media (prefers-reduced-motion: reduce) { .hostess__alert { animation: none; } }
.hostess__alert .ic { width: 20px; height: 20px; color: #c2360d; flex: none; margin-top: 2px; }
.hostess__alert b { display: block; font-size: 14.5px; color: #c2360d; }
.hostess__alert p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

/* Лента ближайших визитов */
.timeline { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.timeline--empty { color: var(--muted); font-size: 14px; padding: 16px 0; }
.tl-card {
  flex: none; width: 212px; display: grid; gap: 4px; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-soft);
  background: var(--surface); color: var(--ink); font: inherit; border-left: 5px solid var(--blue);
}
.tl-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.tl-card__time { font-size: 17px; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
.tl-card__name {
  font-size: 14px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* Кольцо остатка на карточке визита */
.tl-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-card__ring {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--blue) calc(var(--pct) * 1%), var(--surface-2) 0);
  transition: background .7s ease;
}
.tl-card__ring.is-late { background: conic-gradient(#e5484d 100%, #e5484d 0); }
.tl-card__ring b {
  width: 23px; height: 23px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-family: var(--font-display);
  font-size: 9.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums;
}
.tl-card__left { font-variant-numeric: tabular-nums; }
.tl-card__left.is-late { color: #c2360d; font-weight: 800; }
.tl-card.is-late { animation: rb-alarm 2.6s ease-in-out infinite; }
/* Карточки лент появляются каскадом */
.timeline .tl-card { animation: rb-in .34s ease both; }
.timeline .tl-card:nth-child(2) { animation-delay: .04s; }
.timeline .tl-card:nth-child(3) { animation-delay: .08s; }
.timeline .tl-card:nth-child(4) { animation-delay: .12s; }
.timeline .tl-card:nth-child(5) { animation-delay: .16s; }
.timeline .tl-card:nth-child(n+6) { animation-delay: .2s; }
.tl-card > * { min-width: 0; }
.tl-card__meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-card__left { font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 2px; }
.tl-card.is-arrived { border-left-color: var(--orange); }
.tl-card.is-arrived .tl-card__time { color: var(--amber-text); }
.tl-card.is-late { border-left-color: #e5484d; background: color-mix(in srgb, #e5484d 6%, var(--surface)); }
.tl-card.is-late .tl-card__left { color: #c2360d; }
/* Действия в две ровные строки: главное — «Посадить», рядом отмена крестиком,
   ниже во всю ширину «Выбрать место». Три кнопки в один ряд не влезали
   и распирали карточку — от этого кольцо уезжало за её край. */
.tl-card__actions { display: grid; grid-template-columns: 1fr 34px; gap: 6px; margin-top: 10px; }
.tl-card__seat, .tl-card__cancel, .tl-card__pick {
  height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; min-width: 0;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tl-card__seat { background: var(--blue); border-color: var(--blue); color: #fff; }
.tl-card__seat:hover { background: var(--blue-hi); border-color: var(--blue-hi); }
.tl-card__cancel { padding: 0; font-size: 17px; line-height: 1; color: var(--muted); }
.tl-card__cancel:hover { background: #fdeceb; border-color: #f4c0bd; color: #c2360d; }
.tl-card__pick { width: 100%; color: var(--blue); }
.tl-card__pick:hover { border-color: var(--blue); background: var(--blue-soft); }

/* Отчёты */
.reports__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.reports__period { margin: 0 0 18px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.bar-cell {
  position: relative; display: inline-flex; align-items: center; min-width: 46px; padding: 3px 10px;
  border-radius: 6px; font-weight: 800; color: var(--blue-text); overflow: hidden;
}
.bar-cell::before { content: ''; position: absolute; inset: 0; width: var(--w); background: var(--blue-soft); border-radius: 6px; }
.bar-cell { z-index: 0; }
.bar-cell::before { z-index: -1; }

/* Отчёты: сравнение, графики, печать */
.reports__actions { display: flex; gap: 8px; }
.reports__custom { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.reports__custom .field { margin: 0; }
.reports__vs { display: block; font-weight: 600; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.delta { font-size: 12.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.delta--up { background: color-mix(in srgb, #35a26a 16%, var(--surface)); color: #2f8f5b; }
.delta--down { background: color-mix(in srgb, #e5484d 14%, var(--surface)); color: #c2360d; }
.delta--flat { background: var(--surface-2); color: var(--muted); }
/* Лучший день периода — на синем градиенте, звезда медленно крутится */
.reports__hl {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 4px; padding: 14px 18px;
  border-radius: 14px; color: #fff; font-size: 14px; font-weight: 700;
  background: linear-gradient(118deg, #16305f, var(--blue) 60%, #24508f);
  box-shadow: 0 10px 26px rgba(13, 35, 80, .18);
}
.reports__hl .ic { width: 18px; height: 18px; flex: none; color: var(--saffron); animation: rb-spin 14s linear infinite; }

.week-chart { display: flex; align-items: flex-end; gap: 8px; padding: 18px 20px; }
.week-chart__col { flex: 1; display: grid; justify-items: center; gap: 4px; }
.week-chart__col i {
  display: block; width: 100%; max-width: 30px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #2f6bff, var(--blue));
  animation: rb-in .4s ease both;
}
.week-chart__col:nth-child(2) i { animation-delay: .05s; }
.week-chart__col:nth-child(3) i { animation-delay: .1s; }
.week-chart__col:nth-child(4) i { animation-delay: .15s; }
.week-chart__col:nth-child(5) i { animation-delay: .2s; }
.week-chart__col:nth-child(6) i { animation-delay: .25s; }
.week-chart__col:nth-child(7) i { animation-delay: .3s; }
.week-chart__col b { font-size: 11.5px; font-weight: 800; color: var(--blue); min-height: 14px; }
.week-chart__col span { font-size: 11.5px; color: var(--muted); }

.party-stack { display: grid; gap: 7px; }
.party-stack__row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 10px; font-size: 12.5px; }
.party-stack__row i { display: block; height: 8px; border-radius: 999px; background: var(--orange); min-width: 3px; }
.party-stack__row b { text-align: right; font-weight: 800; }
.admin-table tr.is-current { background: var(--blue-soft); }
.admin-table tr.is-current td { font-weight: 700; }

@media print {
  .header, .footer, .partner-head__actions, .partner-sections,
  .reports__tools, .reports__custom { display: none !important; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .stat { break-inside: avoid; box-shadow: none; }
  .work-card__body { max-height: none; overflow: visible; }
}

/* Подбор стола под компанию */
.party-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 2px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface-2);
}
.party-bar__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; }
.party-bar__label .ic { width: 16px; height: 16px; color: var(--blue); }
.party-bar__hint { font-size: 13px; font-weight: 700; color: var(--blue); }
.guests--inline { display: flex; gap: 8px; margin: 0; }
.guests--inline .guest { width: 42px; height: 38px; }

/* Подсветка подходящих столов */
.table-card.is-match { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent); }
.table-card.is-dim { opacity: .45; }
.table-card__line--free { color: #2f8f5b; font-weight: 700; }
/* Детские стулья */
.table-card__chairs { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--amber-text); }
.table-card__chairs .ic { width: 14px; height: 14px; }
.chair-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface-2);
}
.chair-row__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; }
.chair-row__label .ic { width: 17px; height: 17px; color: var(--amber-text); }
.chair-row__ctrl { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.chair-row__ctrl b { min-width: 22px; text-align: center; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chair-row__hint { flex: 1 1 100%; font-size: 12.5px; color: var(--muted); }
.chair-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--blue); font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; line-height: 1;
}
.chair-btn:hover:not(:disabled) { background: var(--blue); border-color: var(--blue); color: #fff; }
.chair-btn:disabled { opacity: .4; cursor: default; }

.table-card__note { font-size: 12px; color: var(--blue-text); display: inline-flex; align-items: center; gap: 5px; }
.table-card__note .ic { width: 13px; height: 13px; }
.table-card__flag--ok { background: var(--amber-soft); color: var(--amber-text); }
.phone-link { text-decoration: underline; }
.phone-link:hover { color: var(--blue); }

/* Панель инструментов зала */
.hostess__tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 2px; }
/* Нижний блок хостес-панели: брони, лист ожидания, новая бронь */
.work-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-top: 30px; align-items: start; }
.work-card { border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
/* Карточке с выпадающим календарём обрезка мешает: без этого его просто не видно.
   Скругление тогда держит уже сама шапка, а не общая обрезка карточки. */
.work-card--drop { overflow: visible; }
.work-card--drop .work-card__head { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.work-card--wide { grid-column: 1 / -1; }
.work-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.work-card__head h3 { margin: 0; font-size: 16px; font-weight: 800; display: inline-flex; align-items: center; gap: 9px; }
.work-card__head small { font-size: 12.5px; color: var(--muted); text-transform: lowercase; }
.count-badge {
  min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 800; display: inline-grid; place-items: center;
}
.work-card__tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.work-card__tools .admin-search { flex: 1 1 260px; min-width: 220px; }
.work-card__tools .admin-search input { height: 40px; }
.work-card__body { max-height: 460px; overflow-y: auto; }
.work-card__body .list-card { border: 0; border-radius: 0; }
.work-card__body .list-row:last-child { border-bottom: 0; }
.chip--sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.empty--tight { padding: 30px 20px; }
.work-card__form {
  /* Колонок ровно столько, сколько полей вместе с кнопкой: раньше их было
     на одну меньше, и кнопка сваливалась на вторую строку под «Имя гостя» */
  display: grid; grid-template-columns: 1.3fr 1.2fr 168px 118px 92px auto; gap: 14px; align-items: end;
  padding: 18px 20px; border-top: 1px solid var(--line-soft);
}
/* Все поля строки одной высоты — иначе подписи над ними стоят вразнобой */
.work-card__form .date-pick { height: 44px; border-radius: 8px; font-size: 14px; }
.work-card__form .date-pick b { white-space: nowrap; }
/* Календарь открывается вверх (форма стоит внизу страницы, вниз ему некуда)
   и прижат к правому краю поля — от левого он уезжал за край экрана */
.work-card__form .fdrop { top: auto; bottom: calc(100% + 10px); left: auto; right: 0; }
.work-card__form .field { margin: 0; position: relative; }
/* Подсказка о постоянном госте под полем телефона */
.guest-hint {
  display: flex; align-items: center; gap: 6px; margin: 6px 0 0;
  font-size: 12px; font-weight: 700; color: var(--amber-text);
}
/* Пока подсказки нет, она не должна занимать место: display у класса
   перебивает атрибут hidden, и пустая строка сдвигала поле телефона вверх */
.guest-hint[hidden] { display: none; }
.guest-hint .ic { width: 13px; height: 13px; flex: none; }
.work-card__form .field input { width: 100%; }
/* Кнопка ровно той же высоты, что и поля рядом — иначе строка «пляшет» */
.work-card__form .btn { height: 44px; white-space: nowrap; }
.work-card__form--wait { grid-template-columns: 1fr 110px auto; }

/* В карточке строки переносятся: кнопки уходят под текст, а не сжимают его */
.work-card .list-row { flex-wrap: wrap; row-gap: 4px; }
.work-card .list-row__main { flex: 1 1 220px; min-width: 180px; }
/* Кнопки действий переносим под текст, а обычные цифры оставляем справа */
.work-card .list-row__side.hostess__actions { flex: 1 1 100%; text-align: left; }
.work-card .hostess__actions { justify-content: flex-start; margin-top: 4px; }
.work-card .list-row__main h4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .work-grid { grid-template-columns: 1fr; }
  /* Поля остаются одной строкой, на вторую уходит только кнопка */
  .work-card__form { grid-template-columns: 1fr 1fr 168px 118px 92px; }
  .work-card__form--wait { grid-template-columns: 1fr 110px; }
  .work-card__form .btn { grid-column: 1 / -1; }
}
.list-row.is-late { background: color-mix(in srgb, #e5484d 6%, var(--surface)); }
.tag-chair {
  font-style: normal; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800;
  color: var(--amber-text); background: var(--amber-soft); padding: 2px 8px; border-radius: 999px;
}
.tag-chair .ic { width: 12px; height: 12px; }
.tl-card__chair { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: var(--amber-text); }
.tl-card__chair .ic { width: 12px; height: 12px; }
.tag-late { font-style: normal; font-size: 11.5px; font-weight: 800; color: #c2360d; margin-left: 6px; }

/* ---------- Карточки столов по макету ----------
   Цвет статуса — заливкой и рамкой, слева полоса 6px, поверх неё снизу
   растёт полоса визита. Бронь дышит контуром, свободный мигает точкой,
   опоздание бьёт тревогу. */
.table-card { padding: 15px 16px 15px 21px; border-radius: 16px; }
.table-card::before { width: 6px; }
.table-card::after { width: 6px; background: rgba(22, 35, 63, .36); transition: height 1s linear; }
.table-card__count { font-size: 12.5px; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.table-card__count.is-late { color: #c2360d; }
.table-card.is-reserved { animation: rb-breathe 3.4s ease-in-out infinite; }
.table-card.is-free .table-dot { animation: rb-dotwave 2.6s ease-in-out infinite; }
.table-card.is-late { animation: rb-alarm 2.6s ease-in-out infinite; }
.table-card.is-free { border-color: #cde3d6; background: linear-gradient(180deg, #ffffff, #f2fbf6); }
.table-card.is-free .table-card__status { color: #2f8f5b; }
.table-dot.is-free { background: #35a26a; }

.table-card.is-reserved { border-color: #c6d3ef; background: linear-gradient(180deg, #ffffff, #eef2fc); }
.table-card.is-reserved .table-card__status { color: var(--blue); }
.table-dot.is-reserved { background: var(--blue); }

.table-card.is-seated { border-color: #f8cfb4; background: linear-gradient(180deg, #ffffff, #fff2ea); }
.table-card.is-seated .table-card__status { color: #c2560d; }
.table-dot.is-seated { background: var(--orange); }

.table-card.is-cleaning { border-color: #c9ceda; background: var(--surface-2); }
.table-card.is-cleaning .table-card__status { color: var(--muted); }
.table-dot.is-cleaning { background: #98a2b8; }

:root[data-theme="dark"] .table-card.is-seated .table-card__status { color: var(--orange); }
:root[data-theme="dark"] .table-card.is-free .table-card__status { color: #56c68c; }

.table-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 32px)); background: var(--surface); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 86vh; display: flex; flex-direction: column;
}
.table-modal .modal__body { overflow-y: auto; }
.hostess__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .hostess__head { flex-direction: column; }
  .floor { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* Стол, который держим под бронь */
.table-card.is-locked { border-style: dashed; opacity: .92; }
.table-card__lock { font-size: 12px; font-weight: 700; color: var(--blue); }
.table-dot.is-locked { background: repeating-linear-gradient(45deg, var(--blue), var(--blue) 3px, #fff 3px, #fff 5px); }
.table-card.is-target { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 25%, transparent); }
.zone-input {
  width: 100%; max-width: 260px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 800;
}
.zone-input:hover { border-color: var(--line); }
.zone-input:focus { border-color: var(--blue); background: var(--surface); outline: none; }

/* Ташкентское время */
.tz-clock {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px;
}
.tz-clock b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tz-clock small { color: var(--muted); font-size: 12.5px; }
.tz-clock .ic { width: 16px; height: 16px; color: var(--blue); }
.booking__tz { display: flex; align-items: center; gap: 6px; margin: 8px 0 0 !important; font-size: 12.5px; color: var(--muted); }
.booking__tz .ic { width: 14px; height: 14px; }

.table-modal__booking {
  display: grid; gap: 3px; margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--blue-soft); color: var(--blue-text);
}
.table-modal__booking b { font-size: 16px; color: var(--blue-deep); }
.table-modal__booking span { font-size: 13.5px; }
:root[data-theme="dark"] .table-modal__booking b { color: #fff; }

/* ---------- Редактор меню в кабинете ---------- */
.admin { padding-top: 8px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 0 16px; flex-wrap: wrap; }
.admin-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.admin-crumbs { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.admin-crumbs button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--blue); font: inherit; }
.admin-crumbs b { color: var(--ink); }

.admin-search { position: relative; flex: 1; max-width: 340px; }
.admin-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.admin-search input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; outline: none;
}
.admin-search input:focus { border-color: var(--blue); }

.admin-table-wrap { border: 1px solid var(--line-soft); border-radius: var(--radius); overflow-x: auto; background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.admin-table th {
  text-align: left; padding: 14px 16px; font-size: 13px; font-weight: 800; color: var(--muted);
  border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.admin-table td { padding: 12px 16px; border-bottom: 1px dashed var(--line-soft); vertical-align: middle; }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:hover { background: var(--bg-soft); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table__name { font-weight: 700; }
.admin-table__name small { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.admin-table__slug { color: var(--muted); font-size: 13px; }
.admin-table__price { color: var(--blue); font-weight: 700; white-space: nowrap; }
.admin-table__empty { text-align: center; color: var(--muted); padding: 30px 16px; }

.admin-thumb { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; }
.admin-thumb--empty { background: var(--surface-2); font-size: 22px; }

.pill-status { display: inline-flex; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.pill-status.is-past { background: var(--surface-2); color: var(--muted); }
.pill-status.is-on { background: color-mix(in srgb, #35a26a 16%, var(--surface)); color: #2f8f5b; }
.pill-status.is-off { background: color-mix(in srgb, #e5484d 14%, var(--surface)); color: #c2360d; }
.pill-status.is-soon { background: var(--blue-soft); color: var(--blue-text); }
.pill-status.is-muted { background: var(--surface-2); color: var(--muted); }

/* Кнопки под бронью в кабинете гостя */
.booking-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.booking-actions .btn { flex: none; }
.booking-hint { font-size: 12.5px; color: var(--muted); }

/* Список столов в кабинете: строка открывает настройку */
.list-row--tap { cursor: pointer; }
.list-row--tap:hover { background: var(--bg-soft); }
.list-row--edit { flex-wrap: wrap; background: var(--bg-soft); }
.table-edit { display: flex; gap: 12px; flex: 1; min-width: 260px; }
.table-edit .field { flex: 1; }
.table-edit input, .table-edit select { width: 100%; }
.table-edit label { font-size: 12px; }
/* Строка брони на узком экране: статус сверху справа, текст и кнопки — во всю ширину */
@media (max-width: 640px) {
  /* Строка брони по макету: фото слева, текст справа, шеврон у края —
     переносить её на несколько строк больше не нужно */
  .list-row--booking { flex-wrap: nowrap; align-items: center; padding: 12px 14px; gap: 12px; }
  .list-row--booking .list-row__icon { width: 36px; height: 36px; order: -2; }
  .list-row--booking .list-row__side { order: -1; margin-left: auto; text-align: right; }
  .list-row--booking .list-row__main { flex: 1 1 100%; }
  .list-row--booking .booking-actions { width: 100%; }
  .list-row--booking .booking-actions .btn { flex: 1 1 46%; padding: 0 10px; }
  .list-row--booking .booking-hint { flex: 1 1 100%; }
}

.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--blue); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--blue); }
.icon-btn .ic { width: 18px; height: 18px; }

.item-form { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
.photo-drop {
  display: grid; place-items: center; gap: 8px; width: 100%; aspect-ratio: 1; border: 2px dashed var(--line);
  border-radius: 12px; cursor: pointer; overflow: hidden; position: relative; background: var(--surface-2); text-align: center;
}
.photo-drop:hover { border-color: var(--blue); }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop span { font-size: 42px; }
.photo-drop b { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; font-size: 12.5px; background: rgba(15, 30, 66, .72); color: #fff; }

.lang-fields { display: grid; gap: 8px; }
.lang-field { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.lang-field span { font-size: 12px; font-weight: 800; color: var(--muted); }
.lang-field input, .lang-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; outline: none; resize: vertical;
}
.lang-field input { height: 42px; padding: 0 12px; }
.lang-field input:focus, .lang-field textarea:focus { border-color: var(--blue); }

.admin-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

@media (max-width: 720px) {
  .item-form { grid-template-columns: 1fr; }
  .photo-drop { aspect-ratio: 16 / 9; }
}

/* Блюдо с фотографией */
.dish--rich { grid-template-columns: 72px 1fr auto; align-items: start; column-gap: 16px; }
.dish__photo { grid-row: span 2; width: 72px; height: 72px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; }
.dish__photo--empty { background: var(--surface-2); font-size: 28px; }
.dish--rich .dish__desc { grid-column: 2 / -1; }

/* Фотографии заведения */
.photo-drop--wide { aspect-ratio: 16 / 10; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-cell { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; }
.gallery-cell__del {
  position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(15, 30, 66, .72); color: #fff; font-size: 16px; cursor: pointer; line-height: 1;
}
.gallery-cell__del:hover { background: rgba(15, 30, 66, .92); }
.gallery-cell--add {
  display: grid; place-items: center; gap: 2px; border: 2px dashed var(--line); cursor: pointer; color: var(--muted);
}
.gallery-cell--add:hover { border-color: var(--blue); color: var(--blue); }
.gallery-cell--add span { font-size: 26px; font-weight: 700; }
.gallery-cell--add small { font-size: 11.5px; }
.photo--img { object-fit: cover; }

/* Выбор рабочей даты в хостес-панели */
.date-nav { display: flex; align-items: center; gap: 8px; }
.date-nav__arrow {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.date-nav__arrow:hover { border-color: var(--blue); color: var(--blue); }
.date-nav__arrow .ic { width: 18px; height: 18px; }
.date-nav__arrow .ic--prev { transform: rotate(180deg); }
.date-nav__value {
  display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer;
}
.date-nav__value:hover { border-color: var(--blue); }
.date-nav__value b { font-weight: 800; text-transform: capitalize; }
.date-nav__value em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 2px 8px; border-radius: 999px; }
.date-nav__value .ic { width: 18px; height: 18px; color: var(--muted); }
.date-nav__value .ic--caret { width: 13px; height: 13px; }

/* Список сортировки */
.fbtn--sort { gap: 8px; }
.fbtn--sort .fbtn__label { color: var(--muted); font-weight: 600; }
.fbtn--sort b { font-weight: 800; }
.fdrop--right { left: auto; right: 0; width: 300px; }
.sort-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%;
  padding: 12px 22px; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px;
  text-align: left; cursor: pointer;
}
.sort-option:hover { background: var(--bg-soft); }
.sort-option.is-active { color: var(--blue); font-weight: 800; }
.sort-option .ic { width: 18px; height: 18px; color: var(--blue); }
@media (max-width: 640px) {
  .fdrop--right { right: auto; left: 0; width: min(300px, calc(100vw - 40px)); }
}

/* Выбор адреса на карте */
.address-row { display: flex; gap: 10px; align-items: center; }
.address-row input { flex: 1; }
.address-row .btn { flex: none; white-space: nowrap; }
.address-row .btn .ic { width: 16px; height: 16px; }

.picker-modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 32px)); max-height: 88vh; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.picker-modal__map { height: min(60vh, 460px); }
#ymap-picker { width: 100%; height: 100%; }
.picker-modal__foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 16px 22px; border-top: 1px solid var(--line-soft); flex-wrap: wrap;
}
.picker-modal__address { display: grid; gap: 4px; min-width: 0; flex: 1 1 320px; }
.picker-modal__label { font-size: 13px; font-weight: 700; }
/* Адрес правится прямо здесь: карта подсказывает по ближайшему дому
   и часто промахивается на соседнюю улицу */
.picker-modal__address input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
}
.picker-modal__address input:focus { outline: none; border-color: var(--blue); }
.picker-modal__hint { font-size: 12.5px; color: var(--muted); }
.picker-modal__hint a { color: var(--blue-hi); text-decoration: underline; }
.picker-modal__hint:first-of-type { font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  /* 16px, иначе iOS увеличивает страницу при вводе */
  .picker-modal__address input { font-size: 16px; }
}

.map-picker__dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--orange); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 30, 66, .45); transform: translate(-50%, -50%);
}

/* ---------- Телефон ----------
   Колонка сетки по умолчанию не уже своего содержимого, поэтому длинное фото
   или строка вкладок растягивали страницу вбок. min-width: 0 это снимает. */
.layout-2 > *, .results-layout > *, .work-grid > *, .grid-2 > *, .row-4 > * { min-width: 0; }

@media (max-width: 900px) {
  /* Карточка бронирования встаёт в поток: липкой ей уже негде держаться */
  .booking { position: static; }
  .results-map { position: relative; top: 0; height: 340px; }
}

@media (max-width: 640px) {
  /* Шапка компактная и не липкая — иначе на телефоне она съедает треть экрана */
  .header { position: static; }
  /* Шапка на телефоне — две строки вместо четырёх: логотип и вход,
     под ними поиск. Раньше это занимало четверть экрана.
     Сверху оставляем воздух: логотип упирался в адресную строку браузера. */
  .header .header__inner { height: auto; padding: 18px 18px 10px; gap: 8px; row-gap: 8px; }
  /* Значок гостя убран: в кабинет ведёт нижняя панель, две двери в одно место не нужны */
  .header__nav .icon-link { display: none; }
  .lang-switch { order: 1; margin-left: auto; }
  .header__nav { order: 2; }
  .lang-switch { gap: 2px; }
  .lang-switch button { padding: 3px 6px; font-size: 11px; }
  /* Кнопку «Найти» заменил сам поиск: список сужается, пока набираешь */
  .searchbar .btn { display: none; }
  .logo__mark { width: 46px; height: 27px; }
  .logo__text { font-size: 21px; }
  .header__nav { gap: 2px; }
  .icon-link { padding: 0 8px; }
  .icon-link__name { display: none; }
  /* Поле и кнопка фильтров стоят в одну строку и делят ширину экрана */
  .searchbar { gap: 8px; padding: 0; flex-wrap: nowrap; }
  .searchbar__field { height: 48px; flex: 1 1 auto; order: 1; min-width: 0; border-radius: 16px; }
  .searchbar__field--city { order: 2; flex: 0 0 auto; }
  .searchbar__side { order: 3; width: 48px; height: 48px; border-radius: 16px; }

  /* iOS увеличивает страницу при фокусе, если шрифт поля меньше 16px */
  input, select, textarea,
  .field input, .field select, .field textarea,
  .lang-field input, .lang-field textarea, .zone-input { font-size: 16px; }

  /* Подборки на телефоне листаются вбок, как на витрине приложения,
     а не растягиваются на весь экран по одной карточке */
  .row-4, .rail {
    display: flex; grid-template-columns: none; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 0 -18px; padding: 2px 18px 8px; scrollbar-width: none;
  }
  .row-4::-webkit-scrollbar, .rail::-webkit-scrollbar { display: none; }
  .row-4 > .promo, .row-4 .card { flex: 0 0 74%; scroll-snap-align: start; }
  /* Лента рекомендаций: полторы карточки в экране. Уже было ровно 43% —
     в такую ширину не помещались ни название, ни средний счёт */
  .rail > .card { flex: 0 0 60%; scroll-snap-align: start; }

  /* Карточки в подборках чуть мельче, чем в общем списке */
  .rail .card__body, .row-4 .card__body { padding: 11px 12px 12px; gap: 4px; }
  .rail .card__name, .row-4 .card__name { font-size: 15.5px; }
  .rail .card__meta, .row-4 .card__meta { font-size: 12.5px; }
  .rail .card__score, .row-4 .card__score { font-size: 14px; padding: 2px 7px; }
  .rail .card__bookings, .rail .card__district,
  .row-4 .card__bookings, .row-4 .card__district { font-size: 11.5px; }
  .rail .card__hours, .row-4 .card__hours { font-size: 12px; }
  .rail .card__hours .ic, .row-4 .card__hours .ic { width: 13px; height: 13px; }
  .row-4 .pill-offer { font-size: 11.5px; padding: 4px 8px; }
  .row-4 .promo .photo { height: 140px; }
  .row-4 .promo__body { padding: 16px 18px 18px; }
  .row-4 .promo__body h3 { font-size: 20px; }
  .row-4 .promo__body p { font-size: 13.5px; margin-bottom: 12px; }

  /* Заголовки и отступы под узкий экран */
  .layout-2 { gap: 22px; }
  .tab-panel { padding: 20px 0 34px; }
  .chip-soft { font-size: 12.5px; }
  .section { padding: 30px 0; }
  /* Каталог идёт сразу за лентой рекомендаций, и полный отступ секции
     разрывал их на два не связанных экрана. Оставляем узкую полоску —
     достаточно, чтобы отделить, и не настолько, чтобы пришлось листать. */
  #catalog { padding-top: 10px; }
  /* Полоса городов теперь скрыта, и после ленты рекомендаций перед фильтрами
     оставались чужие двойные отступы секций — сверху зазор ощутимо больше, чем
     нужно, поэтому его специально ужимаем именно здесь */
  #catalog { padding-top: 8px; }
  .section__head { gap: 12px; }
  .section__head h2 { font-size: 20px; }
  .section__head--plain h2 { font-size: 18.5px; }
  /* Соседи выглядывают поровну с обеих сторон, средний баннер крупнее их */
  .promos { padding-left: 9vw; padding-right: 9vw; }
  .promo-slide { flex-basis: 82vw; transform: scale(.93); transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
  .promo-slide.is-mid { transform: scale(1); }
  .promo-slide__text b { font-size: 17px; }
  .promo-slide__text i { font-size: 12.5px; }
  .section__head a { flex: none; white-space: nowrap; font-size: 13px; }
  .section-title { font-size: 19px; margin: 24px 0 12px; }
  .partner-head h1, .hostess__head h2 { font-size: 22px; }

  /* Кнопки избранного и «Поделиться» держим рядом, не растягивая заголовок */
  .rest-fav, .rest-share { width: 40px; height: 40px; }
  .crumbs--rest { display: none; }              /* название теперь на фото */
  .rhero { margin-top: 10px; }
  .rhero__title { left: 14px; right: 14px; bottom: 12px; }
  .rhero__score { padding-right: 88px; }
  .rlink { padding: 12px 2px; font-size: 14.5px; }
  .share-nets { gap: 9px; }
  .share-net { padding: 13px 4px; font-size: 12.5px; }
  .share-net__ic svg { width: 36px; height: 36px; }
  .share-link { flex-direction: column; }
  .share-link input { font-size: 16px; }        /* меньше — и iOS увеличит страницу */
  .promo__body h3 { font-size: 22px; }

  /* Вкладки листаются пальцем */
  /* Шапка на телефоне не липкая — полоса вкладок держится у самого верха */
  .tabs--sticky { top: 0; }
  .tabs { gap: 0; margin-top: 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 12px 11px; font-size: 14px; }

  /* Кабинет гостя */
  .profile-head { padding: 16px 0 6px; }
  .pcard { gap: 14px; }
  .pcard__avatar { width: 68px; height: 68px; font-size: 23px; }
  .pcard__name input { font-size: 20px; }
  .taste { padding: 14px 16px; }
  .seg-tabs__btn { padding: 10px 4px; font-size: 13.5px; white-space: nowrap; }

  /* Плитки по две в ряд, а не по одной на весь экран */
  .stat-grid, .stat-grid--hostess { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat--rich { padding: 14px; gap: 6px; }
  .stat__value, .stat--rich .stat__value { font-size: 22px; }
  .stat__label { font-size: 12px; }
  .stat__sub { font-size: 12px; }
  .stat__icon { width: 28px; height: 28px; }

  /* Хостес-панель: столы мельче, действия во всю ширину */
  .floor { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
  .table-card { padding: 12px; }
  .table-card__name { font-size: 14.5px; }
  .table-card__status, .table-card__seats { font-size: 12px; }
  .table-card__line { font-size: 11.5px; }
  .hostess__legend { gap: 10px 14px; font-size: 12.5px; }
  .hostess__actions { justify-content: flex-start; }
  .hostess__actions .btn { flex: 1 1 auto; }
  .work-card__form, .work-card__form--wait { grid-template-columns: 1fr; }
  .date-nav__value { padding: 0 12px; font-size: 13px; }

  /* Каталог как в мобильных приложениях: карта на весь экран, список — шторкой поверх.
     Потянул список вниз — открылась карта. */
  .container { padding: 0 18px; }
  #catalog .filters__title { font-size: 22px; }
  #catalog .filters__sub { font-size: 13.5px; margin-bottom: 14px; }
  /* Полоса фильтров уезжает вместе со списком: прилипшая к верху,
     она занимала часть маленького экрана и закрывала карточки */
  .toolbar { position: relative; background: var(--bg); padding: 10px 0 8px; margin: 0 -18px; gap: 8px; }
  /* Дата, время и гости занимают всю ширину экрана, фильтры листаются под ними */
  .toolbar__pick { padding: 0 18px; }
  .toolbar__pick .fdrop-wrap, .toolbar__pick .seg { width: 100%; }
  /* Три кнопки делят ширину поровну и не переносятся на вторую строку */
  .toolbar__pick .seg__item { flex: 1; min-width: 0; justify-content: center; gap: 5px; padding: 0 6px; font-size: 13.5px; white-space: nowrap; }
  .toolbar__pick .seg__item .ic { width: 16px; height: 16px; }
  .toolbar__pick .seg__item .ic--caret { width: 12px; height: 12px; }
  .toolbar__scroll { padding: 2px 18px; }
  .toolbar__arrow { display: none; }

  .results-layout { display: block; position: relative; padding-bottom: 0; }
  .results-map {
    position: sticky; top: 56px; height: calc(100vh - 56px); height: calc(100dvh - 56px);
    margin: 0 -18px; border-radius: 0;
  }
  .results-sheet {
    /* По умолчанию список закрывает карту целиком — никакой полоски карты
       не видно, открыть её можно только кнопкой в строке поиска или ручкой.
       Скруглённые углы срезали бы уголки и в них проглядывала бы карта — поэтому
       в закрытом виде углы прямые, скругление появляется только когда шторку
       утянули вниз (см. .results-layout.is-map ниже) */
    position: relative; z-index: 10; margin: calc(-100dvh + 56px) -18px 0;
    /* Заливки у шторки нет: она рисовала белую полосу поперёк живого фона.
       Карта под ней на это время спрятана (правило ниже), поэтому сквозь
       прозрачный список видно только сам фон. */
    padding: 14px 18px 24px; background: transparent;
    border-radius: 0; box-shadow: none;
    transition: transform .28s ease, border-radius .28s ease;
  }
  /* Пока список закрывает карту, тянуть и нажимать нечего — ручки нет совсем,
     карту открывает только кнопка. Ручка появляется, только когда карта уже
     открыта (см. .results-layout.is-map ниже) — ей список возвращают обратно */
  .sheet-grab { display: none; }
  .results-layout.is-map .sheet-grab {
    display: block; width: 100%; height: 30px; padding: 0; border: 0; background: none;
    position: relative; cursor: grab; touch-action: manipulation;
  }
  .sheet-grab::before {
    content: ''; position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
    width: 46px; height: 5px; border-radius: 999px; background: var(--line);
  }
  .sheet-grab:active::before { background: var(--blue); }
  .searchbar__side:active { background: var(--blue-soft); color: var(--blue); }

  /* Страница заведения: нижняя панель разделов уступает место кнопке брони */
  body.page-rest .tabbar { display: none; }
  body.page-rest { padding-bottom: 0; }

  /* На главной шапка в две строки: заголовок с часами, под ним поиск */
  .hdr-title { border: 0; margin: 0; padding: 0; flex: 1; min-width: 0; }
  .hdr-title .ig-top__id b { font-size: 18px; }

  /* Своя страница гостя: шапки сайта нет, логотип живёт в строке заголовка */
  body.ig-own .header { display: none; }
  body.ig-own .ig-page { padding-top: calc(10px + env(safe-area-inset-top)); }

  /* «Мои брони» на телефоне — экран из вкладок и списка: ни шапки, ни крошек */
  body.page-bookings .header,
  body.page-bookings .crumbs,
  body.page-bookings .filters__title,
  body.page-bookings .filters__sub,
  body.page-bookings .footer { display: none; }
  body.page-bookings main.container { padding-top: 12px; }
  body.page-bookings .seg-tabs { position: sticky; top: 8px; z-index: 40; }

  /* ---------- Экран найденного ----------
     Это не главная с убранными частями, а отдельный экран: поиск со стрелкой
     «назад» наверху и список под ним. Ни ленты, ни карты, ни полосы фильтров. */
  body.found-screen .header { position: sticky; top: 0; z-index: 60; }
  body.found-screen .header .logo,
  body.found-screen .header__nav,
  body.found-screen [data-recommend-rail],
  body.found-screen .countries,
  body.found-screen .toolbar,
  body.found-screen .results-bar__count,
  body.found-screen .results-map,
  body.found-screen .sheet-grab,
  body.found-screen .footer,
  body.found-screen [data-view-map] { display: none; }
  body.found-screen .header .header__inner { padding-top: 10px; }
  body.found-screen .section { padding-top: 0; }
  body.found-screen .results-head { padding-top: 0; }
  /* Список больше не шторка над картой — он и есть экран */
  body.found-screen .results-sheet {
    margin: 0 -18px; padding-top: 4px; box-shadow: none; transition: none;
  }
  /* Экран приезжает снизу — так видно, что это переход, а не подмена главной */
  body.found-screen main { animation: found-in .22s ease-out both; }
  @keyframes found-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    body.found-screen main { animation: none; }
  }

  /* Когда карта открыта, ручка становится стрелкой вверх: потяните — вернётся список */
  .results-layout.is-map .sheet-grab { height: 38px; }
  .results-layout.is-map .sheet-grab::before { width: 0; height: 0; }
  .results-layout.is-map .sheet-grab::after {
    content: ''; position: absolute; left: 50%; top: 13px; width: 13px; height: 13px;
    border-left: 2.5px solid var(--blue); border-top: 2.5px solid var(--blue); border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
  }
  .results-head { padding: 4px 0 10px; }
  .results-list { padding-bottom: 10px; }
  /* Фото ресторана широкое, как в мобильных приложениях, а не квадрат */
  .result__media { aspect-ratio: 5 / 2; min-height: 0; }
  .result__act { gap: 8px; }
  .act-icon, .act-far, .btn.act-book { height: 44px; }
  .act-far { padding: 0 11px; font-size: 13px; }
  .result__media .photo { height: 100%; }
  .map__zoom { bottom: auto; top: 12px; }

  /* Карточка бронирования: полоса шагов целиком помещается в экран */
  .booking__head { padding: 18px 16px 14px; }
  .booking__head h3 { font-size: 21px; }
  .booking__body { padding: 16px; }
  .stepper { margin: 14px 16px 0; }
  .stepper__item { padding: 8px 10px; gap: 5px; font-size: 13px; }
  .stepper__item .ic { width: 16px; height: 16px; }
  .stepper__arrow { width: 10px; }

  /* Адрес и кнопка выбора на карте — в столбик, иначе поле сжимается */
  .address-row { flex-wrap: wrap; }
  .address-row input { flex: 1 1 100%; }
  .address-row .btn { width: 100%; }

  /* Диалоги на весь экран */
  .modal__panel { width: 100%; border-left: 0; }
  .modal__head, .modal__foot { padding: 14px 16px; }
  .modal__body { padding: 4px 16px 16px; }
  .table-modal, .picker-modal { width: calc(100% - 20px); max-height: 90vh; }
  .picker-modal__map { height: min(50vh, 320px); }

  /* Действия карточек и форм переносятся, а не сжимаются */
  .admin-form-actions .btn, .reports__actions .btn { flex: 1 1 auto; }
  .booking-actions .btn { flex: 1 1 auto; }
}

/* Таймер стола: сколько гости уже сидят */
.table-timer {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-text);
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.table-timer .ic { width: 13px; height: 13px; }
/* Засиделись — подсказка хостес, что стол скоро понадобится */
.table-timer.is-long { background: var(--amber-soft); color: var(--amber-text); }
.table-modal__timer { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

/* Точка гостя на карте */
.map-me {
  width: 16px; height: 16px; border-radius: 50%; background: var(--blue-hi);
  border: 3px solid #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue-hi) 25%, transparent);
  transform: translate(-50%, -50%);
}

/* Кнопка «показать, где я» на карте */
.map__locate .ic, .map__locate svg { width: 20px; height: 20px; }
.map__locate.is-busy { opacity: .55; pointer-events: none; }

/* Выбор детских стульев при бронировании */
.chairs-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2);
}
.chairs-pick__label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.chairs-pick__label .ic { width: 18px; height: 18px; color: var(--blue); }
.chairs-pick__ctrl { display: inline-flex; align-items: center; gap: 12px; }
.chairs-pick__ctrl b { min-width: 18px; text-align: center; font-size: 16px; font-weight: 800; }
.chairs-pick__ctrl button {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 19px; line-height: 1; cursor: pointer;
}
.chairs-pick__ctrl button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.chairs-pick__ctrl button:disabled { opacity: .4; cursor: default; }

/* ---------- Нижняя панель разделов (только телефон) ---------- */
.tabbar { display: none; }

@media (max-width: 640px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-template-columns: repeat(5, 1fr);
    /* Стекло: под панелью виден живой фон и край содержимого */
    background: linear-gradient(180deg, rgba(251, 250, 249, 0) 0%, rgba(251, 250, 249, .86) 34%, rgba(251, 250, 249, .97) 100%);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid rgba(22, 35, 63, .06);
    padding-bottom: env(safe-area-inset-bottom);          /* полоса жестов у iPhone */
    box-shadow: none;
  }
  :root[data-theme="dark"] .tabbar { background: var(--surface); backdrop-filter: none; }
  /* Значок выбранной вкладки коротко подпрыгивает — единственное движение здесь */
  .tabbar__item.is-active .ic { animation: rb-pop .42s cubic-bezier(.3, 1.4, .4, 1); }
  .tabbar__item {
    position: relative; display: grid; justify-items: center; gap: 3px;
    padding: 9px 4px 8px; color: var(--muted);
    font-family: var(--font-text); font-size: 11.5px; font-weight: 500;
  }
  .tabbar__item .ic { width: 23px; height: 23px; }
  /* Выбранная вкладка горит целиком: значок залит, подпись потемнее */
  .tabbar__item.is-active { color: var(--blue); font-weight: 700; }
  .tabbar__item.is-active .ic { width: 24px; height: 24px; }
  .tabbar__label { line-height: 1.1; }
  .tabbar__badge {
    position: absolute; top: 4px; left: 50%; margin-left: 6px;
    min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
    background: var(--orange); color: #fff; font-size: 10.5px; font-weight: 800;
    display: grid; place-items: center;
  }

  /* Чтобы панель не закрывала последний ресторан и подвал */
  body { padding-bottom: 62px; }
  .footer { padding-bottom: 24px; }

  /* Открытая карта: язычок списка поднимается над панелью */
}

/* ---------- Лента карточек поверх раскрытой карты (телефон) ---------- */
.map-cards { display: none; }

@media (max-width: 640px) {
  .results-layout.is-map .map-cards {
    display: block; position: fixed; left: 0; right: 0; bottom: 62px; z-index: 20;
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* Боковой отступ ровно половина того, что остаётся от карточки:
     тогда и первая, и последняя встают точно по центру экрана */
  .map-cards__row {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 22px 10px; scrollbar-width: none;
  }
  .map-cards__row::-webkit-scrollbar { display: none; }
  /* Карточка занимает почти весь экран и останавливается строго по одной:
     scroll-snap-stop не даёт пролистнуть сразу несколько и замереть между ними */
  .map-card {
    flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always;
    display: grid; grid-template-columns: 92px 1fr;
    background: var(--surface); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  }
  .map-card__media { display: block; height: 96px; }
  .map-card__media .photo { width: 100%; height: 100%; object-fit: cover; font-size: 30px; }
  .map-card__body { display: grid; align-content: start; gap: 3px; padding: 10px 12px; min-width: 0; }
  .map-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .map-card__top b { font-family: var(--font-text); font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .map-card__score { flex: none; display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #7a5410; }
  .map-card__score .ic { width: 13px; height: 13px; color: var(--saffron); }
  .map-card__meta { font-size: 12.5px; color: var(--muted); }
  .map-card .pill-offer { font-size: 11px; padding: 3px 7px; justify-self: start; }

  /* Кнопка возврата к списку — по центру над панелью разделов */
  .map-cards__list {
    display: block; margin: 0 auto 10px; padding: 9px 20px; border: 0; border-radius: 999px;
    background: var(--blue); color: #fff; font: inherit; font-size: 13px; font-weight: 800;
    box-shadow: var(--shadow); cursor: pointer;
  }

  /* На раскрытой карте список уходит за нижний край: вместо него лента карточек,
     а вернуть его можно кнопкой «Показать список» */
  /* Пока список закрывает карту, саму карту гасим: иначе сквозь прозрачную
     шторку проглядывают её кнопки. Не display:none — Яндекс.Карта не встаёт
     в скрытом блоке, а прозрачность раскладку не ломает. */
  body:not(.map-screen) .results-layout:not(.is-map) .results-map { opacity: 0; pointer-events: none; }
  .results-map { transition: opacity .2s ease; }

  .results-layout.is-map .results-sheet {
    transform: translateY(calc(100dvh - 186px));
    border-radius: 20px 20px 0 0;                /* тут скругление уместно — шторка стала карточкой поверх открытой карты */
    padding-top: 0;                               /* здесь сверху уже ручка карты, свой отступ ни к чему */
    /* Над раскрытой картой заливка нужна — иначе сквозь список видно карту */
    background: var(--bg); box-shadow: 0 -8px 24px rgba(15, 30, 66, .16);
  }
}

/* ---------- Открытая карта на телефоне ----------
   Весь экран — карта: сверху фильтры, снизу лента заведений.
   Списка ресторанов и прокрутки страницы здесь нет: заведения листают
   вбок, карта едет за ними. Кнопка «Показать список» остаётся, когда
   карту открыли из списка; на вкладке «Карта» её не рисуем вовсе. */
@media (max-width: 640px) {
  body.map-screen { overflow: hidden; height: 100dvh; padding-bottom: 0; }

  body.map-screen .header,
  body.map-screen .footer,
  body.map-screen [data-recommend-rail],
  body.map-screen .countries,
  body.map-screen .results-sheet,
  body.map-screen .view-map { display: none; }


  /* Карта — во весь экран до нижней панели разделов */
  body.map-screen .results-map {
    position: fixed; top: 0; left: 0; right: 0; bottom: 62px;
    height: auto; margin: 0; border: 0; border-radius: 0;
  }

  /* Фильтры лежат поверх карты, каждый со своей подложкой */
  body.map-screen .toolbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 22; margin: 0;
    padding: calc(10px + env(safe-area-inset-top)) 0 10px; background: none;
  }
  body.map-screen .map__zoom { top: calc(62px + env(safe-area-inset-top)); }

}

/* ---------- Строка ввода: скрепка, поле, кнопка записи ----------
   Собрана как в мессенджерах: круглая скрепка слева, поле-пилюля,
   справа одна круглая кнопка — микрофон, кружок или отправка. */
.bar__clip, .bar__go {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.bar__clip { background: var(--surface-2); color: var(--muted); }
.bar__clip:hover { color: var(--blue); }
.bar__clip svg { width: 21px; height: 21px; }

.bar__field { flex: 1; min-width: 0; }
/* Не <input>, а редактируемый блок: над полем ввода Safari на iPhone держит
   свою полосу «вверх / вниз / Готово», и убрать её страница не может. */
.bar__input {
  width: 100%; min-height: 44px; max-height: 120px; overflow-y: auto;
  padding: 11px 16px; font: inherit; font-size: 16px; line-height: 1.35;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface-2);
  color: var(--ink); outline: none; white-space: pre-wrap; word-break: break-word;
  -webkit-user-select: text; user-select: text;
}
.bar__input:focus { border-color: var(--blue); background: var(--surface); }
.bar__input:empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }

.bar__go { background: var(--blue); color: #fff; }
.bar__go svg { width: 20px; height: 20px; }
.bar__go--rec { background: var(--surface-2); color: var(--blue); }
.bar__go--rec:active { background: var(--blue); color: #fff; transform: scale(1.08); }
.bar__go--rec svg { width: 23px; height: 23px; }

/* Голосовое в ленте: кнопка, столбики и время */
.chat__voice { display: flex; align-items: center; gap: 10px; padding-right: 12px; }
.voice__play {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.chat__msg.is-mine .voice__play { background: #fff; color: var(--blue); }
.voice__play svg { width: 16px; height: 16px; }
.voice__wave { display: flex; align-items: center; gap: 2px; height: 26px; }
.voice__wave i { display: block; width: 2.5px; border-radius: 2px; background: currentColor; opacity: .45; }

/* Фотография в переписке: время кладём плашкой поверх нижнего угла.
   Класс задвоен нарочно — базовое правило .chat__bubble идёт в файле ниже
   и при равной силе перебивало бы отступы. */
.chat__bubble.chat__bubble--media { padding: 0; overflow: hidden; background: var(--surface-2); }
.chat__msg.is-mine .chat__bubble.chat__bubble--media { background: var(--blue); }
.chat__photo { display: block; max-width: 240px; width: 100%; border-radius: 14px; cursor: zoom-in; }
.chat__cap { display: block; padding: 6px 10px 8px; font-size: 14.5px; }
.chat__cap em { font-style: normal; font-size: 11px; opacity: .6; margin-left: 8px; }
.chat__msg.is-mine .chat__cap { color: #fff; }
.chat__time-over {
  position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: 11px;
  color: #fff; background: rgba(9, 22, 50, .55); padding: 2px 7px; border-radius: 999px;
}

/* Кружок — круглое видео, как в мессенджерах */
.chat__round { position: relative; display: block; width: 190px; height: 190px; }
.chat__round video {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  background: #0d2350; cursor: pointer;
}
.chat__round em {
  position: absolute; right: 12px; bottom: 8px; font-style: normal; font-size: 11px;
  color: #fff; background: rgba(9, 22, 50, .55); padding: 2px 7px; border-radius: 999px;
}

/* Окно записи кружка */
.rec { position: fixed; inset: 0; z-index: 230; display: grid; place-items: center; padding: 18px; }
.rec__backdrop { position: absolute; inset: 0; background: rgba(9, 22, 50, .72); }
.rec__card { position: relative; width: min(320px, 100%); text-align: center; }
.rec__pulse {
  width: 120px; height: 120px; margin: 0 auto; border-radius: 50%;
  background: var(--orange); color: #fff; display: grid; place-items: center;
  animation: rec-pulse 1.1s ease-in-out infinite;
}
.rec__pulse svg { width: 46px; height: 46px; }
@keyframes rec-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 26, .5); } 50% { transform: scale(1.05); box-shadow: 0 0 0 18px rgba(255, 107, 26, 0); } }
.rec__tip { margin: 6px 0 0; color: #ffffffb0; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .rec__pulse { animation: none; } }
.rec__frame {
  width: 260px; height: 260px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  background: #0d2350; box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
}
.rec.is-live .rec__frame { box-shadow: 0 0 0 4px var(--orange); }
.rec__frame video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.rec__hint { margin: 14px 0 0; color: #fff; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.rec__acts { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }

/* Поле ника при регистрации */
.nick-field { display: flex; align-items: center; gap: 4px; }
.nick-field > span { font-size: 16px; font-weight: 800; color: var(--blue); }
.nick-field input { flex: 1; min-width: 0; }

/* ---------- Переписка во весь экран ----------
   Устроена как в мессенджере: шапка с собеседником сверху, поле снизу,
   лента между ними — она одна и прокручивается. Обои — та же полоса атласа,
   что и в кайме, только едва заметная: чужой узор здесь был бы чужим. */
.tg { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; background: var(--bg-soft); }
.tg__top {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line-soft);
}
.tg__back { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--blue); cursor: pointer; display: grid; place-items: center; }
.tg__back .ic { width: 22px; height: 22px; transform: rotate(180deg); }
.tg__back:hover { background: var(--surface-2); }
.tg__who { min-width: 0; display: grid; }
.tg__who b { font-family: var(--font-display); font-size: 16.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg__who small { font-size: 12.5px; color: var(--muted); }

.tg__feed {
  position: relative;
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 3px;
  padding: 14px 12px;
  background-color: var(--chat-bg);
}
/* Узор приглушаем слоем внутри самой ленты. Раньше слой был fixed и накрывал
   ещё шапку с полем ввода — они выглядели выцветшими. Смешивания слоёв
   (background-blend-mode) здесь нет: Safari на iPhone красил им обои в чёрный. */
.tg__feed::before {
  content: ''; position: absolute; inset: 0; min-height: 100%;
  background: var(--chat-bg); opacity: .9; pointer-events: none;
}
.tg__feed > * { position: relative; z-index: 1; }

.tg__bar {
  display: flex; gap: 8px; align-items: flex-end; flex: none; padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line-soft);
}

/* Пока переписка открыта, нижняя панель разделов только мешает */
body.chat-open .tabbar { display: none; }
body.chat-open { overflow: hidden; }

/* Разделитель дня */
.chat__day { align-self: center; margin: 8px 0 6px; }
.chat__day span {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  background: rgba(13, 35, 80, .12); color: var(--ink);
  font-size: 12px; font-weight: 700; backdrop-filter: blur(4px);
}

/* Строка переписки в списке чатов */
.chat-row { cursor: pointer; }
.chat-row .fr-row__main p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .fr-row__main p i { font-style: normal; opacity: .7; }
.chat-row__side { flex: none; display: grid; justify-items: end; gap: 4px; }
.chat-row__side small { font-size: 11.5px; color: var(--muted); }

/* ---------- Чат группы ---------- */
.chat { border: 1px solid var(--line-soft); border-radius: 14px; background: var(--surface); overflow: hidden; }
.chat__list {
  display: flex; flex-direction: column; gap: 8px; height: 320px; overflow-y: auto; padding: 14px;
  background: var(--chat-bg);
}
.chat__empty { margin: auto; font-size: 13.5px; color: var(--muted); }
.chat__msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.chat__msg.is-mine { align-self: flex-end; align-items: flex-end; }
.chat__author { font-size: 12px; font-weight: 700; color: var(--blue-text); margin: 4px 0 2px 2px; }
.chat__bubble {
  position: relative; padding: 8px 52px 8px 12px; border-radius: 14px 14px 14px 4px;
  background: var(--surface-2); font-size: 14.5px; line-height: 1.4; word-break: break-word;
}
.chat__msg.is-mine .chat__bubble { border-radius: 14px; background: var(--blue); color: #fff; }
.chat__bubble { border-radius: 14px; }
/* Уголок только у последнего сообщения подряд — связка читается одной репликой */
.chat__msg.is-last .chat__bubble { border-bottom-left-radius: 4px; }
.chat__msg.is-mine.is-last .chat__bubble { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
/* Время прижато к правому нижнему углу пузыря — под него и оставлен отступ */
.chat__bubble em { position: absolute; right: 10px; bottom: 6px; font-style: normal; font-size: 11px; opacity: .6; }
/* «изменено» идёт в самом тексте, а не в углу: там уже стоит время */
.chat__edited { font-style: normal; font-size: 11px; opacity: .6; margin-left: 6px; }

/* «Изменить» и «Удалить» под репликой — тихие, чтобы не спорить с текстом.
   Показываем только у тех сообщений, где они разрешены (см. friends.js). */
.chat__acts { display: flex; gap: 12px; margin: 3px 4px 0; }
.chat__acts button {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 11.5px; color: var(--muted);
}
.chat__acts button:hover { color: var(--blue); }

.chat__form {
  display: flex; gap: 8px; align-items: flex-end; padding: 10px;
  border-top: 1px solid var(--line-soft); background: var(--surface);
}
.chat__form .bar__input { background: var(--surface-2); }
.chat__send {
  flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: var(--blue); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.chat__send:hover { background: var(--blue-hi); }
.chat__send svg { width: 19px; height: 19px; }

@media (max-width: 640px) { .chat__list { height: 260px; } }

/* ---------- Кадрирование фото профиля ---------- */
.crop { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 18px; }
.crop__backdrop { position: absolute; inset: 0; background: rgba(13, 35, 80, .6); }
.crop__card {
  position: relative; width: min(340px, 100%); padding: 20px; text-align: center;
  background: var(--surface); border-radius: 18px; box-shadow: 0 22px 56px rgba(13, 35, 80, .34);
}
.crop__card h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 19px; font-weight: 800; }
.crop__card .muted { margin: 0 0 14px; font-size: 13px; }
.crop__frame {
  position: relative; width: 260px; height: 260px; margin: 0 auto; overflow: hidden;
  border-radius: 14px; background: #0d2350; cursor: grab; touch-action: none; user-select: none;
}
.crop__frame:active { cursor: grabbing; }
.crop__frame img { position: absolute; max-width: none; }
/* Кружок рисуем одним градиентом: внутри чисто, снаружи затемнение —
   человеку видно и то, что войдёт в аватар, и то, что срежется */
.crop__mask {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, rgba(9, 22, 50, 0) 0 49.3%, rgba(9, 22, 50, .62) 50%);
}
.crop__mask::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
}
.crop__zoom { display: flex; align-items: center; gap: 10px; margin: 16px 4px 0; }
.crop__zoom .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
.crop__zoom input { flex: 1; accent-color: var(--blue); }
.crop__acts { display: flex; gap: 10px; margin-top: 16px; }
.crop__acts .btn { flex: 1; justify-content: center; }

/* Ник в шапке профиля */
.profile-nick { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.profile-nick > span { font-weight: 700; color: var(--blue); }
.profile-nick input {
  width: 12ch; min-width: 0; padding: 3px 6px; font: inherit; font-size: 14.5px;
  border: 1px solid transparent; border-radius: 7px; background: var(--surface-2); color: var(--ink); outline: none;
}
.profile-nick input:focus { border-color: var(--blue); background: var(--surface); }
.profile-nick em { font-style: normal; font-size: 12.5px; }
.profile-nick em.is-ok { color: #2e7d32; }
.profile-nick em.is-bad { color: #c62828; }

/* Цифра на вкладке «Приглашения» */
.tab__dot {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--orange); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 800;
}
.chip.is-waiting { opacity: .6; cursor: default; }

/* ---------- Друзья и группы ---------- */
.fr-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 12px; }
.fr-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 800; }

.fr-search { display: flex; gap: 10px; margin-bottom: 14px; }
.fr-search input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); outline: none;
}
.fr-search input:focus { border-color: var(--blue); }
.fr-search .btn { flex: none; }

.fr-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; font: inherit; color: var(--ink);
}
.fr-row:last-child { border-bottom: 0; }
.fr-row__main { flex: 1; min-width: 0; }
.fr-row__main h4 { margin: 0; font-size: 15.5px; font-weight: 700; }
.fr-row__main p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.fr-row__side { display: flex; align-items: center; gap: 8px; flex: none; }
.fr-row__side .ic { width: 18px; height: 18px; color: var(--muted); }
button.fr-row { cursor: pointer; }
button.fr-row:hover { background: var(--surface-2); }

.fr-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--blue-soft); color: var(--blue);
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
}
.fr-avatar img, .fr-avatar .photo { width: 100%; height: 100%; object-fit: cover; }
.fr-avatar--group { background: var(--saffron-soft); color: #7a5410; }
.fr-avatar--group .ic { width: 22px; height: 22px; }
.fr-avatar--rest { border-radius: 10px; width: 52px; height: 42px; }

.fr-invite { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13.5px; }

/* Выпавшее заведение: крупный кадр во весь экран, название поверх него,
   кнопки под ним. Появляется, когда колесо остановилось. */
.fr-pop { position: fixed; inset: 0; z-index: 210; display: grid; place-items: center; padding: 18px; }
.fr-pop__backdrop { position: absolute; inset: 0; background: rgba(13, 35, 80, .6); backdrop-filter: blur(3px); }
.fr-pop__card {
  position: relative; width: min(420px, 100%); background: var(--surface);
  border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(13, 35, 80, .38);
  animation: fr-pop-in .4s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes fr-pop-in { from { opacity: 0; transform: scale(.9) translateY(16px); } to { opacity: 1; transform: none; } }
.fr-pop__x {
  position: absolute; right: 12px; top: 12px; z-index: 2; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: rgba(13, 35, 80, .55); color: #fff;
  font-size: 21px; line-height: 1; cursor: pointer; backdrop-filter: blur(4px);
}
.fr-pop__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); }
.fr-pop__media .photo { width: 100%; height: 100%; object-fit: cover; }
.fr-pop__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 46px 18px 16px; color: #fff;
  background: linear-gradient(to top, rgba(9, 22, 50, .92) 26%, rgba(9, 22, 50, 0));
}
.fr-pop__label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .82; }
.fr-pop__cap h3 { margin: 4px 0 2px; font-family: var(--font-display); font-size: 25px; font-weight: 800; }
.fr-pop__cap p { margin: 0; font-size: 13.5px; opacity: .88; }
.fr-pop__acts { display: grid; gap: 9px; padding: 16px 18px 18px; }
.fr-pop__acts .btn { justify-content: center; }

@media (max-width: 640px) {
  .fr-pop { padding: 0; place-items: end stretch; }
  .fr-pop__card { width: 100%; border-radius: 20px 20px 0 0; }
  .fr-pop__acts { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .fr-pop__card { animation-duration: .01s; } }

.fr-spinning { margin: 0 0 10px; text-align: center; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--muted); }

/* Победитель рулетки — единственное место экрана с каймой атласа */
.fr-winner { position: relative; margin-top: 16px; padding: 20px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.fr-winner p { margin: 0; font-size: 13.5px; color: var(--muted); }
.fr-winner h3 { margin: 8px 0 2px; font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.fr-winner__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.fr-booked { display: flex; align-items: center; gap: 8px; margin-top: 14px !important; font-size: 14px; color: var(--ink) !important; }
.fr-booked .ic { width: 18px; height: 18px; color: var(--blue); }

/* Колесо: сектора цветами логотипа, стрелка сверху */
.fr-wheel { position: relative; width: min(300px, 78vw); margin: 8px auto 18px; aspect-ratio: 1; }
.fr-wheel__disc {
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 10px 30px rgba(46, 32, 14, .22), inset 0 0 0 6px var(--surface);
}
.fr-wheel__pin {
  position: absolute; left: 50%; top: -6px; z-index: 2; transform: translateX(-50%);
  width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--ink);
}
.fr-wheel__label {
  position: absolute; left: 50%; top: 50%; width: 50%; height: 0;
  transform-origin: 0 0; display: flex; align-items: center; pointer-events: none;
}
.fr-wheel__label b {
  margin-left: 16%; max-width: 78%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.fr-wheel__label.is-flip { flex-direction: row-reverse; }
.fr-wheel__label.is-flip b { margin: 0 6% 0 0; transform: rotate(180deg); }

@media (max-width: 640px) {
  .fr-head { margin: 20px 0 10px; }
  .fr-title { font-size: 22px; }
  /* Две кнопки рядом с длинным названием в 375 пикселей не помещаются:
     разрешаем им уехать на свою строку, а не сминать текст */
  .fr-row { flex-wrap: wrap; row-gap: 8px; }
  .fr-row__main { min-width: 55%; }
  .fr-row__side { margin-left: auto; }
  .fr-search { flex-wrap: wrap; }
  .fr-search input { flex: 1 1 100%; }
  .fr-search .btn { width: 100%; }
  .fr-row { padding: 11px 13px; gap: 11px; }
  .fr-winner__acts .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- Пропуск на бронь ----------
   Экран, который гость показывает на входе. Кайма атласа сверху и снизу,
   крупный код по центру. Печать чекича появляется один раз — сразу после
   того, как бронь принята. */
.pass { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; }
.pass__backdrop { position: absolute; inset: 0; background: rgba(13, 35, 80, .55); backdrop-filter: blur(3px); }
.pass__card {
  position: relative; width: min(420px, 100%); max-height: 92vh; overflow-y: auto;
  background: var(--surface); border-radius: 18px; box-shadow: 0 24px 60px rgba(13, 35, 80, .35);
  text-align: center; animation: pass-in .34s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes pass-in { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.pass__edge { display: none; }
.pass__close {
  position: absolute; right: 12px; top: 20px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.pass__label { margin: 20px 0 2px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pass__name { margin: 0 20px 4px; font-family: var(--font-display); font-size: 25px; font-weight: 800; }
.pass__addr { margin: 0 20px; font-size: 13.5px; color: var(--muted); }

.pass__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 18px 20px; background: var(--line-soft); border-radius: 12px; overflow: hidden; }
.pass__grid > div { background: var(--surface-2); padding: 12px 6px; }
.pass__grid b { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.pass__grid span { font-size: 11.5px; color: var(--muted); }

.pass__soon { margin: 0 20px; font-size: 13.5px; color: var(--muted); }
.pass__table { display: inline-flex; align-items: center; gap: 6px; margin: 0 20px; font-size: 14px; font-weight: 600; color: var(--blue-text); }
.pass__table .ic { width: 16px; height: 16px; }

.pass__code { margin: 16px 20px 0; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; }
.pass__code b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: .06em; color: var(--blue); }
.pass__code span { font-size: 12.5px; color: var(--muted); }

.pass__acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 20px 20px; }
.pass__acts .btn { flex: 1 1 auto; justify-content: center; }

/* Печать: круг чекича опускается на экран и растворяется */
.pass__stamp {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px;
  color: #fff; pointer-events: none; animation: stamp-out .5s .85s ease-in forwards;
}
.pass__stamp .chekich { width: 170px; height: 170px; animation: stamp-press .5s cubic-bezier(.3, 1.5, .4, 1) both; }
.pass__stamp .ch-ring { stroke: #ffffff; stroke-width: 3; stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.pass__stamp .ch-dot { fill: var(--orange); opacity: 1; animation: none; }
.pass__stamp .ch-ray { stroke: #ffffffcc; opacity: 1; animation: none; }
.pass__stamp b { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: .04em; text-shadow: 0 2px 12px rgba(13, 35, 80, .6); animation: stamp-press .5s .1s cubic-bezier(.3, 1.5, .4, 1) both; }
@keyframes stamp-press { from { opacity: 0; transform: scale(1.7) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes stamp-out { to { opacity: 0; transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  .pass__card, .pass__stamp, .pass__stamp .chekich, .pass__stamp b { animation-duration: .01s; }
}

@media (max-width: 640px) {
  .pass { padding: 0; place-items: end stretch; }
  .pass__card { width: 100%; max-height: 94dvh; border-radius: 20px 20px 0 0; }
  .pass__acts { margin-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- Экран поиска ---------- */
.search-page { padding-top: 18px; max-width: 720px; }
.search-field {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  padding: 0 16px; height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.search-field:focus-within { border-color: var(--blue); }
.search-field .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search-field input, .search-field select {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 16px; color: var(--ink);
}

.search-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.search-block { margin-top: 26px; }
.search-block__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.search-block h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.search-block__head button { border: 0; background: none; cursor: pointer; font: inherit; }

.search-row {
  display: flex; align-items: center; gap: 14px; padding: 15px 2px;
  border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.search-row:last-child { border-bottom: 0; }
.search-row .ic { width: 22px; height: 22px; color: var(--ink); flex: none; }
.search-row .ic--chevron { width: 16px; height: 16px; color: var(--muted); margin-left: auto; }
.search-row__main { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; display: grid; gap: 2px; }
.search-row__main small { font-size: 13px; font-weight: 500; color: var(--muted); }
.search-row__x { border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; padding: 0 4px; }
.search-row--all { border-bottom: 1px solid var(--line); }
.search-row:hover .search-row__main { color: var(--blue); }

/* ---------- Плавающая кнопка «Карта» (телефон) ---------- */
.view-map { display: none; }

@media (max-width: 640px) {
  .view-map {
    display: inline-flex; align-items: center; gap: 8px;
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 76px; z-index: 40;
    padding: 11px 20px; border: 0; border-radius: 999px;
    background: var(--blue-deep); color: #fff; font: inherit; font-size: 14px; font-weight: 800;
    box-shadow: var(--shadow); cursor: pointer;
  }
  .view-map[hidden] { display: none; }
  .view-map svg { width: 17px; height: 17px; }
  .search-page { padding-top: 12px; }
  .search-block h2 { font-size: 18px; }
}

/* ---------- Приложение на iPhone ----------
   Когда сайт открыт с экрана «Домой», у него нет полос браузера,
   поэтому содержимое надо отодвинуть от «чёлки» и от полосы жестов. */
@supports (padding: env(safe-area-inset-top)) {
  @media (display-mode: standalone), (display-mode: fullscreen) {
    .header__main { padding-top: env(safe-area-inset-top); }
    .tabbar { padding-bottom: max(env(safe-area-inset-bottom), 6px); }
    body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
    .view-map { bottom: calc(76px + env(safe-area-inset-bottom)); }
    .map-cards { bottom: calc(62px + env(safe-area-inset-bottom)); }
    .map-screen .results-map { bottom: calc(62px + env(safe-area-inset-bottom)); }
  }
}

/* Правовые страницы: удобная ширина строки для чтения */
.legal { max-width: 760px; padding-bottom: 60px; }
.legal h2 { font-size: 20px; font-weight: 800; margin: 30px 0 10px; }
.legal p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: var(--ink); }
.legal a { color: var(--blue-text); text-decoration: underline; }

/* ---------- Интро при первом запуске ----------
   Полноэкранный слой поверх сайта: в приложении из магазина это первое,
   что видит человек. Кнопка внизу — под большой палец, как в приложениях. */
/* ---------- Полноэкранное объявление от команды RestBook ----------
   Появляется поверх всего при входе. Устроено проще интро: один экран,
   закрыть можно крестиком, кнопкой «Позже» или клавишей Escape. */
.announce {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 30, 66, .55);
  padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
  animation: announce-in .24s ease-out;
}
.announce.is-away { opacity: 0; transition: opacity .22s ease; }
@keyframes announce-in { from { opacity: 0; } to { opacity: 1; } }

.announce__box {
  position: relative; width: 100%; max-width: 340px; max-height: 100%; overflow-y: auto;
  background: var(--surface); border-radius: 18px;
  text-align: center; box-shadow: 0 20px 60px rgba(15, 30, 66, .3);
  animation: announce-rise .28s ease-out;
}
@keyframes announce-rise { from { transform: translateY(14px); } to { transform: none; } }

.announce__box.has-pic { max-width: 380px; }
/* Картинку подрезаем по высоте: вертикальный снимок 500×600 иначе занимал бы
   пол-экрана и текст уезжал под сгиб */
.announce__pic { display: block; width: 100%; max-height: 34vh; object-fit: cover; }
.announce__text { padding: 18px 20px 20px; }
.announce__box:not(.has-pic) .announce__text { padding: 26px 20px 20px; }

.announce__box h2 { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.announce__box p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); white-space: pre-line; }
.announce__actions { margin-top: 18px; }
.announce__actions .btn { width: 100%; }

.announce__x {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  font-size: 23px; line-height: 1; cursor: pointer; z-index: 1;
}

@media (max-width: 640px) {
  .announce { padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
  .announce__box, .announce__box.has-pic { max-width: 320px; }
  .announce__pic { max-height: 30vh; }
  .announce__text,
  .announce__box:not(.has-pic) .announce__text { padding: 16px 16px 18px; }
  .announce__box h2 { font-size: 17.5px; }
  .announce__box p { font-size: 13.5px; }
}

.intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background: var(--bg);
  padding: calc(14px + env(safe-area-inset-top)) 22px calc(22px + env(safe-area-inset-bottom));
  animation: intro-in .28s ease-out;
}
.intro.is-away { opacity: 0; transform: scale(1.02); transition: opacity .24s ease, transform .24s ease; }
@keyframes intro-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.intro__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.intro__logo { display: block; width: 96px; }
.intro__logo svg { width: 100%; height: auto; display: block; }
.intro__skip {
  background: none; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 700; color: var(--muted); padding: 8px 4px;
}

.intro__stage { flex: 1; display: flex; align-items: center; justify-content: center; }
.intro__slide { max-width: 420px; text-align: center; animation: intro-slide .26s ease-out; }
@keyframes intro-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.intro__art { margin: 0 auto 30px; max-width: 300px; }
.intro__art svg { width: 100%; height: auto; display: block; }
.intro__slide h2 { margin: 0 0 12px; font-size: 27px; font-weight: 800; letter-spacing: -.4px; }
.intro__slide p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }

.intro__foot { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.intro__dots { display: flex; gap: 8px; }
.intro__dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--line);
  cursor: pointer; transition: width .2s ease, background .2s ease;
}
.intro__dot.is-on { width: 26px; background: var(--blue); }
.intro__foot .btn { max-width: 420px; }

@media (min-width: 641px) {
  .intro { padding: 26px 32px 32px; }
  .intro__slide h2 { font-size: 32px; }
}

/* ---------- «Нужен аккаунт» ----------
   Окно поверх страницы: гость смотрит сайт свободно, а на действии
   (бронь, избранное, отзыв) объясняем, зачем нужен вход. */
/* `.modal__panel` — боковая панель фильтров, а это окно должно стоять по центру */
.auth-ask {
  position: relative; inset: auto; right: auto; top: auto; bottom: auto;
  width: min(440px, calc(100% - 36px)); max-height: 90vh; margin: auto;
  border: 0; border-radius: 18px; box-shadow: var(--shadow);
}
.modal.is-open:has(.auth-ask) { display: flex; align-items: center; justify-content: center; }
.auth-ask .modal__body { padding-top: 4px; }
.auth-ask__text { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
/* «Не сейчас» слева, действия справа — иначе кнопки переносятся на вторую строку */
.auth-ask .modal__foot { flex-wrap: nowrap; justify-content: flex-end; gap: 10px; }
.auth-ask .modal__foot .btn--quiet { margin-right: auto; }
.auth-ask .modal__foot .btn { white-space: nowrap; }

@media (max-width: 640px) {
  /* На телефоне окно прижимаем к низу — так до кнопок дотягивается большой палец */
  .auth-ask { margin: auto 0 0; width: 100%; border-radius: 20px 20px 0 0; }
  .auth-ask .modal__foot { flex-direction: column-reverse; align-items: stretch; }
  .auth-ask .modal__foot .btn { width: 100%; text-align: center; }
}

/* ---------- Счёт стола и переключатель оборота ---------- */
.bill-modal { max-width: 420px; }
.bill-modal input[type="number"] { font-size: 22px; font-weight: 700; text-align: center; }
.bill-sum { color: var(--blue-hi); white-space: nowrap; }

/* Компактный переключатель в шапке отчётов */
.switch-inline { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); }
.switch-inline input { position: absolute; opacity: 0; pointer-events: none; }
.switch-inline i { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: background .18s ease; }
.switch-inline i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.switch-inline input:checked + i { background: var(--blue); }
.switch-inline input:checked + i::after { transform: translateX(14px); }
.switch-inline input:checked ~ span { color: var(--blue-text); }

/* ---------- Заставка приложения ----------
   Видна только в установленном приложении: логотип проявляется, надпись
   подтягивается снизу, три точки показывают, что идёт загрузка. */
.splash {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--blue);
  animation: splash-in .25s ease-out;
}
.splash.is-away { opacity: 0; transform: scale(1.06); transition: opacity .4s ease, transform .4s ease; }
@keyframes splash-in { from { opacity: 0; } to { opacity: 1; } }

/* Чекич — штамп, которым метят лепёшку. Обод прорисовывается, следом
   по кругу разбегаются точки и лучи, и только потом в середине встаёт знак. */
.splash__stamp { position: relative; width: 230px; height: 230px; display: grid; place-items: center; }
.chekich { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ch-ring {
  fill: none; stroke: #ffffff40; stroke-width: 2;
  stroke-dasharray: 446; stroke-dashoffset: 446;
  animation: ch-draw .9s .05s cubic-bezier(.4, 0, .2, 1) forwards;
}
.ch-dot { fill: var(--orange); opacity: 0; animation: ch-pop .4s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: calc(.3s + var(--i) * .035s); }
.ch-ray { stroke: #ffffff55; stroke-width: 2.4; stroke-linecap: round; opacity: 0; animation: ch-pop .4s ease-out forwards; animation-delay: calc(.5s + var(--i) * .04s); }
@keyframes ch-draw { to { stroke-dashoffset: 0; } }
@keyframes ch-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.ch-dot, .ch-ray { transform-box: fill-box; transform-origin: center; }

/* Знак: чуть подрастает и мягко встаёт на место */
.splash__mark { position: relative; width: 122px; animation: splash-mark .8s .45s cubic-bezier(.2, .8, .3, 1) both; }
.splash__mark svg { width: 100%; height: auto; display: block; }
/* Стулья на синем фоне — белые, стол остаётся оранжевым */
.splash__mark svg g[fill="#1b3f7d"] { fill: #fff; }
@keyframes splash-mark {
  from { opacity: 0; transform: scale(.82) translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.splash__name { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -.5px; animation: splash-up .6s .8s ease-out both; }
.splash__name em { font-style: normal; color: var(--orange); }
.splash__tag { font-size: 14.5px; color: #ffffffc4; letter-spacing: .02em; animation: splash-up .6s .95s ease-out both; }
@keyframes splash-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Точки-«загрузка»: перебор по очереди */
.splash__dots { display: flex; gap: 7px; margin-top: 10px; animation: splash-up .5s .6s ease-out both; }
.splash__dots i { width: 7px; height: 7px; border-radius: 50%; background: #ffffff6b; animation: splash-dot 1s infinite; }
.splash__dots i:nth-child(2) { animation-delay: .15s; }
.splash__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes splash-dot {
  0%, 100% { opacity: .35; transform: translateY(0); }
  40%      { opacity: 1;   transform: translateY(-4px); background: var(--orange); }
}

/* Кому анимация мешает — показываем статичный экран */
@media (prefers-reduced-motion: reduce) {
  .splash, .splash__mark, .splash__name, .splash__tag, .splash__dots, .splash__dots i,
  .ch-ring, .ch-dot, .ch-ray { animation: none; }
  .ch-ring { stroke-dashoffset: 0; }
  .ch-dot, .ch-ray { opacity: 1; }
}

/* ---------- Чужая страница гостя: куда человек ходит ----------
   По макету владельца. Обложка во всю ширину, фото заходит на неё снизу,
   дальше числа, две плитки и лента заведений. Личных сообщений в проекте
   нет, поэтому вторая кнопка — «Добавить в друзья», и только у не-друга. */
.gp-cover {
  position: relative; height: 176px; margin: 0 -18px; overflow: hidden;
  /* Глубокий синий как основа: на белом пятна выглядели бы блёкло */
  background: linear-gradient(150deg, #10265a 0%, #1b3f7d 45%, #22508f 100%);
}
/* Те же пятна, что в живом фоне страницы, но крупнее и ярче — обложка
   должна читаться цветом. Анимации общие: rb-blob1/2/3. */
.gp-cover__blob { position: absolute; border-radius: 50%; will-change: transform; }
.gp-cover__blob--1 {
  width: 340px; height: 340px; left: -90px; top: -150px; filter: blur(26px);
  background: radial-gradient(circle, rgba(255, 107, 26, .62) 0%, rgba(255, 107, 26, 0) 68%);
  animation: rb-blob1 19s ease-in-out infinite;
}
.gp-cover__blob--2 {
  width: 380px; height: 380px; right: -120px; top: -120px; filter: blur(30px);
  background: radial-gradient(circle, rgba(47, 107, 255, .75) 0%, rgba(47, 107, 255, 0) 70%);
  animation: rb-blob2 24s ease-in-out infinite;
}
.gp-cover__blob--3 {
  width: 300px; height: 300px; left: 34%; bottom: -140px; filter: blur(28px);
  background: radial-gradient(circle, rgba(207, 154, 52, .45) 0%, rgba(207, 154, 52, 0) 70%);
  animation: rb-blob3 27s ease-in-out infinite;
}
/* Низ уводим в фон страницы, чтобы обложка не обрывалась полосой */
.gp-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(16, 38, 90, 0) 40%, var(--bg) 100%);
}
@media (prefers-reduced-motion: reduce) { .gp-cover__blob { animation: none; } }

.gp-back {
  position: absolute; top: 14px; left: 18px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .92); box-shadow: 0 4px 12px rgba(20, 26, 48, .16);
  display: grid; place-items: center; color: #16233f;
}
.gp-back svg { width: 20px; height: 20px; transform: rotate(180deg); }

.gp { position: relative; z-index: 2; }   /* поверх затемнения обложки, иначе оно закрывает фото */
/* Фото поднимаем на обложку — как в макете */
.gp-who { display: flex; align-items: flex-end; gap: 14px; margin-top: -46px; }
.gp-ava {
  position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 30px; font-weight: 700;
  box-shadow: 0 0 0 4px var(--bg);
}
.gp-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
/* Точка у края фото — как в макете */
.gp-dot {
  position: absolute; right: 5px; bottom: 5px; width: 15px; height: 15px;
  border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 3px var(--bg);
}
/* Кольцо историй — то же, что и на своей странице */
.gp-ava.has-story::before {
  content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 220deg, #ff6b1a, #cf9a34, #2f6bff, #1b3f7d, #ff6b1a);
  animation: rb-ring 14s linear infinite;
}
.gp-who__id { padding-bottom: 6px; min-width: 0; }
.gp-who__id b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.gp-who__id em { font-style: normal; font-size: 13px; color: var(--muted); }

.gp-acts { display: flex; gap: 10px; margin-top: 18px; }
/* «Позвать в группу» длиннее второй подписи: при равных долях она
   переносилась на две строки, поэтому отдаём ей вдвое больше места */
.gp-acts .btn { flex: 2; white-space: nowrap; }
.gp-acts .btn + .btn { flex: 1; }

/* Три числа одной карточкой с тонкими разделителями */
.gp-nums {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: 18px;
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.gp-nums span { padding: 14px 16px; display: block; }
.gp-nums span + span { border-left: 1px solid var(--line-soft); }
.gp-nums i {
  display: block; font-style: normal; font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: #8b8b95;
}
.gp-nums b { display: block; margin-top: 4px; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }

.gp .ach { margin-top: 22px; }
.gp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.gp-tile {
  display: block; padding: 14px 16px; border-radius: 18px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
}
.gp-tile i { font-style: normal; font-size: 20px; }
.gp-tile b { display: block; margin-top: 6px; font-size: 15px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-tile em { font-style: normal; font-size: 12.5px; color: var(--muted); }

/* Лента заведений: точки слева соединены линией — это маршрут человека */
.gp-trail { position: relative; margin-top: 10px; display: grid; gap: 10px; }
.gp-trail__row {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  padding-left: 34px; border-radius: 16px; color: inherit; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line-soft); box-shadow: var(--shadow-sm);
}
.gp-trail__dot {
  position: absolute; left: 10px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: var(--blue);
}
/* Линия тянется от точки к следующей — у последней строки её нет */
.gp-trail__row:not(:last-child) .gp-trail__dot::after {
  content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 34px;
  margin-left: -.5px; background: var(--line-soft);
}
.gp-trail__ph { flex: none; width: 52px; height: 40px; border-radius: 10px; overflow: hidden; }
.gp-trail__ph .photo { width: 100%; height: 100%; object-fit: cover; font-size: 20px; }
.gp-trail__main { flex: 1; min-width: 0; }
.gp-trail__main b { display: block; font-size: 15px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-trail__main em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.gp-trail__score {
  flex: none; display: inline-flex; align-items: center; gap: 3px;
  font-size: 14px; font-weight: 700; color: #7a5410; font-variant-numeric: tabular-nums;
}
.gp-trail__score .ic { width: 14px; height: 14px; color: var(--saffron); }

/* ---------- 2D-план зала ----------
   Слева — редактор в кабинете (.fplan), справа — карта в хостес-панели (.fmap).
   Метки позиционируются в процентах от картинки, поэтому план одинаково
   ложится на любой ширине и переживает перезаливку в другом разрешении. */
.fplan, .fmap {
  position: relative; margin-top: 12px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--surface-2);
  touch-action: none;                    /* иначе браузер уводит перетаскивание в прокрутку */
}
.fplan img, .fmap img { display: block; width: 100%; height: auto; user-select: none; }

/* Метка редактора: её таскают, поэтому она крупнее и с тенью */
.fplan__mark, .fmark {
  position: absolute; transform: translate(-50%, -50%);
  display: grid; place-items: center; gap: 0;
  border: 2px solid #fff; border-radius: 12px; cursor: pointer;
  font: inherit; line-height: 1.05; color: #fff;
  box-shadow: 0 3px 10px rgba(20, 26, 48, .28);
}
.fplan__mark { width: 52px; height: 44px; background: var(--blue); }
.fplan__mark b { font-size: 14px; font-weight: 700; }
.fplan__mark i { font-style: normal; font-size: 10.5px; opacity: .8; }
.fplan__mark.is-dragging { transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 8px 20px rgba(20, 26, 48, .38); }

/* Полоса нерасставленных столов под планом */
.fplan__bench { display: flex; flex-wrap: wrap; gap: 8px; }
.fplan__chip {
  border: 1px dashed var(--line); border-radius: 999px; background: var(--surface);
  padding: 7px 13px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
}
.fplan__chip:hover { border-color: var(--blue); color: var(--blue); }

/* Метка хостес-панели: цвет статуса тот же, что у карточек стола */
.fmark { width: 48px; height: 40px; background: var(--blue); transition: transform .16s ease; }
.fmark b { font-size: 13.5px; font-weight: 700; }
.fmark i { font-style: normal; font-size: 10px; opacity: .85; }
.fmark:active { transform: translate(-50%, -50%) scale(.94); }
.fmark.is-free { background: #2e9e6b; }
.fmark.is-reserved { background: var(--blue); }
.fmark.is-seated { background: var(--orange); }
.fmark.is-cleaning { background: #8b8b95; }
.fmark.is-locked { box-shadow: 0 0 0 3px rgba(27, 63, 125, .3), 0 3px 10px rgba(20, 26, 48, .28); }
.fmark.is-late { animation: rb-alarm 1.6s ease-in-out infinite; }
.fmark.is-match { box-shadow: 0 0 0 4px rgba(46, 158, 107, .45), 0 3px 10px rgba(20, 26, 48, .28); }
.fmark.is-target { box-shadow: 0 0 0 4px rgba(47, 107, 255, .5), 0 3px 10px rgba(20, 26, 48, .28); }
.fmark.is-dim { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  .fmark, .fplan__mark { transition: none; animation: none; }
}

/* ---------- Меню iiko: связка товаров кассы с блюдами ---------- */
.ikm__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 14px 0 6px; }
.ikm__bar .muted { font-size: 13px; }
.ikm__head { margin: 22px 0 10px; font-size: 15px; }
.ikm__list { display: grid; gap: 10px; }
.ikm__dish { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface); }
.ikm__dish.is-open { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ikm__dish-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ikm__dish-head b { font-size: 15.5px; }
.ikm__dish-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ikm__tag {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--blue-soft); color: var(--blue-text); font-size: 11px; font-weight: 700;
}
.ikm__empty { margin: 10px 0 0; font-size: 13px; color: var(--orange, #ff6b1a); }
.ikm__links { display: grid; gap: 8px; margin-top: 12px; }
.ikm__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--line-soft);
}
.ikm__link-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ikm__link-name em, .ikm__res em { font-style: normal; color: var(--muted); font-size: 12px; font-weight: 500; }
.ikm__gone { color: #e5484d !important; }
.ikm__unit { min-width: 0; max-width: 230px; padding: 7px 30px 7px 10px; font-size: 13.5px; }
.ikm__grams {
  width: 84px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; text-align: center;
}
.ikm__del {
  width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 20px; line-height: 1;
}
.ikm__del:hover { background: rgba(229, 72, 77, .12); color: #e5484d; }
.ikm__pick { margin-top: 12px; }
.ikm__q {
  width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
}
.ikm__results { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; margin-top: 8px; }
.ikm__res {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: left;
  padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font: inherit; cursor: pointer;
}
.ikm__res:hover { background: var(--blue-soft); }
.ikm__res small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ikm__more { margin-top: 22px; }
.ikm__more summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }

@media (max-width: 640px) {
  .ikm__link { grid-template-columns: minmax(0, 1fr) auto; }
  .ikm__unit { grid-column: 1; max-width: none; width: 100%; }
  .ikm__res { flex-direction: column; gap: 2px; }
}

/* Поля приложения для ключа iiko нового типа */
.ik-v2 { margin: 4px 0 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.ik-v2 summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.ikm__arch { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.ikm__arch-tag { color: #e5484d !important; font-size: 11.5px !important; }
.ikm__tail { margin: 6px 0 0; font-size: 12.5px; text-align: center; }
.ikm__takes { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

/* Следующая партия: на кухне — кнопки и время, на табло — строка под цифрой */
/* Следующая партия — оранжевой плашкой: это обещание залу, а не служебная строка */
.kitchen__next-now {
  display: flex; align-items: center; gap: 9px; margin: 0; padding: 11px 14px; border-radius: 14px;
  background: rgba(255, 107, 26, .1); border: 1px solid rgba(255, 107, 26, .3);
  color: #b4561c; font-size: 14.5px; font-weight: 700;
}
.kitchen__next-now svg { width: 19px; height: 19px; flex: 0 0 auto; }
.board__next {
  display: block; margin-top: .25em; color: var(--orange, #ff6b1a); font-weight: 700;
  font-size: clamp(11px, min(5.5vw / var(--cols, 3), 6.5vh / var(--rows, 3)), 24px);
}

/* Кухня: три рулетки вместо россыпи кнопок — время партии, килограммы, порции */
.kitchen__wheels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 4px; }
.kwheel { text-align: center; min-width: 0; }
.kwheel__cap { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.kwheel .wheel { margin-top: 0; }
.kwheel .wheel__scroll { flex: 1 1 auto; height: 188px; }
.kwheel .wheel__pad { height: 68px; }
.kwheel .wheel__item { height: 52px; font-size: 17px; }
.kwheel .wheel__item.is-active { font-size: 26px; }
/* Барабан стоит в своей нише, а выбранное — в рамке: время оранжевой,
   добавление синей. Рука на моноблоке не должна их путать. */
.kwheel .wheel { border-radius: 20px; background: var(--line-soft); border: 1px solid var(--line); overflow: hidden; }
.kwheel .wheel__band { left: 10px; right: 10px; height: 56px; border-radius: 15px; }
.kwheel--next .wheel__band { background: rgba(255, 107, 26, .12); border-color: var(--orange); }
.kwheel--next .wheel__item.is-active { color: #b4561c; }
.kwheel__go {
  width: 100%; min-height: 54px; margin-top: 10px; border: 0; border-radius: 16px; cursor: pointer;
  font: inherit; font-family: var(--font-display); font-size: 16px; font-weight: 800;
  background: var(--blue); color: #fff; transition: transform .1s ease;
}
.kwheel__go:active { transform: scale(.97); }
.kwheel--next .kwheel__go { background: rgba(255, 107, 26, .14); color: #b4561c; box-shadow: inset 0 0 0 1.5px rgba(255, 107, 26, .55); }
.kitchen__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.kitchen__row .kitchen__stop { flex: 0 0 auto; padding: 0 18px; }
.kitchen__minus {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px;
}
.kitchen__minus:hover { color: #e5484d; }
/* У плашки и строки свой display, а он сильнее атрибута hidden */
.kitchen__flag[hidden], .kitchen__next-now[hidden], .kitchen__minus[hidden] { display: none; }

/* Табло: полоса заполнения под числом и общий остаток в шапке */
.board__bar {
  display: block; width: 72%; height: 8px; margin: .4em auto 0; border-radius: 999px;
  background: rgba(255, 255, 255, .14); overflow: hidden;
}
.board__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f8f5b, #46e08a); transition: width .5s ease; }
.board__tile.is-low .board__bar i { background: linear-gradient(90deg, #c9520f, #ff9248); }
.board__total {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 20px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: #fff;
}
.board__total b { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.board__total span { font-size: 12px; color: rgba(255, 255, 255, .72); }
@media (max-width: 900px) { .board__total { display: none; } }

/* Поле своего числа под рулеткой */
.kwheel__own {
  width: 100%; box-sizing: border-box; min-height: 44px; margin-top: 8px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600; text-align: center;
}
.kwheel__own::placeholder { font-weight: 400; color: var(--muted); }
.kwheel--next .kwheel__own { text-align: center; }

/* Вкладка «Табло раздачи»: числа смены, позиции, часы, касса */
.bstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0 6px; }
.bstat { padding: 16px 18px; border-radius: 18px; background: var(--line-soft); border: 1px solid var(--line); }
.bstat__label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bstat__num { display: block; margin-top: 8px; font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.bstat__sub { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.bstat.is-ok .bstat__num { color: #2f8f5b; }
.bstat.is-warm { background: rgba(255, 107, 26, .08); border-color: rgba(255, 107, 26, .25); }
.bstat.is-warm .bstat__num { color: #b4561c; }

.bpos { display: grid; gap: 10px; margin-top: 16px; }
.bpos__row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.bpos__mark { width: 8px; height: 40px; border-radius: 999px; background: #2f8f5b; flex: 0 0 auto; }
.bpos__row.is-low .bpos__mark { background: var(--orange); }
.bpos__row.is-out .bpos__mark, .bpos__row.is-stop .bpos__mark { background: #e5484d; }
.bpos__main { flex: 1 1 auto; min-width: 0; }
.bpos__name { font-weight: 700; font-size: 15.5px; }
.bpos__stop { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: #e5484d; color: #fff; font-family: var(--font-display); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; }
.bpos__weights { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.bpos__count { text-align: right; min-width: 110px; }
.bpos__count b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.bpos__count span { font-size: 12.5px; color: var(--muted); }
.bpos__links { padding: 5px 11px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.bpos__links.is-empty { background: rgba(255, 107, 26, .12); color: #b4561c; }

.bhours { display: flex; align-items: flex-end; gap: 10px; height: 180px; margin-top: 6px; }
.bhours__col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bhours__bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; }
.bhours__bars i { width: 13px; border-radius: 6px 6px 0 0; }
.bhours__col span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bhours__cooked { background: var(--blue); }
.bhours__sold { background: var(--orange); }
.bhours__legend { display: flex; gap: 18px; margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.bhours__legend span { display: inline-flex; align-items: center; gap: 7px; }
.bhours__legend i { width: 11px; height: 11px; border-radius: 3px; }

.biiko__state { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 14px; font-weight: 700; color: var(--muted); }
.biiko__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.biiko__state.is-live { color: #2f8f5b; }
.biiko__state.is-live .biiko__dot { background: #34d27b; box-shadow: 0 0 0 4px rgba(52, 210, 123, .18); }
.biiko__rows { display: grid; gap: 10px; font-size: 13.5px; }
.biiko__rows div { display: flex; justify-content: space-between; gap: 12px; }
.biiko__rows span { color: var(--muted); }
