/* Eslat Mini App — цвета и размеры из утверждённого дизайна (docs/design/Eslat-Main.dc.html) */
:root {
  --bg: #FBF7F0; --shadow: 0 1px 2px rgba(60,40,10,.05), 0 8px 20px rgba(60,40,10,.07); --card: #FFFFFF; --soft: #F2EBDF; --text: #17161A; --muted: #67626B;
  --line: #E9E0D2; --line-strong: #DDD1BE; --nav: #FFFFFF; --accent: #D62839; --hero: #D62839;
  --red-soft: #FCE7EA; --red-text: #A51D2C; --green: #12704A; --green-soft: #E2F3EA; --bad-soft: #FDF1DC; --bad: #8A5A00;
  --tint: #F5ECDA; --brand: #D62839; --ink: #17161A;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  --bg: #131215; --card: #1E1C21; --soft: #26242A; --text: #F4F2F0; --muted: #A9A4AD;
  --line: #2E2C33; --line-strong: #4A4650; --nav: #18171B; --accent: #FF6B78; --hero: #A3223A;
  --red-soft: #3B1A20; --red-text: #FF8C98; --green: #5BD49A; --green-soft: #173528; --bad-soft: #3A2A12; --bad: #F5B94A;
  --tint: #2A2622; --shadow: none;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overscroll-behavior-y: none; touch-action: pan-x pan-y; } /* без увеличения щипком (решение владельца 06.10.2026); карты масштабируют щипком сами */
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; }
.scroll-x { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-x::-webkit-scrollbar { display: none; }
.uf { font-family: Unbounded, 'Golos Text', sans-serif; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Каркас */
#app { min-height: 100vh; padding-bottom: calc(76px + var(--safe-bottom)); }
.top { position: sticky; top: 0; z-index: 5; padding: 14px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); display: flex; align-items: center; justify-content: center; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.ctl { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--soft); }
.seg { display: flex; padding: 3px; border-radius: 12px; gap: 2px; background: var(--soft); }
.seg button { min-width: 44px; height: 34px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
main { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 24px; }
.pad { padding: 0 16px; }

.search { width: 100%; height: 46px; border-radius: 14px; padding: 0 14px; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--soft); color: var(--muted); }

/* Герой: «Выгоднее всего» */
.hero-row { gap: 12px; padding: 0 16px; scroll-snap-type: x mandatory; }
.hero { flex: 0 0 calc(100% - 24px); scroll-snap-align: center; border-radius: 24px; padding: 18px 12px 18px 18px; background: var(--hero); color: #fff; display: flex; align-items: center; gap: 8px; text-align: left; overflow: hidden; }
.hero-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.hero-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.hero-dot.on { width: 18px; background: var(--text); }
.hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.hero-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 6px; }
.hero-badge { font-size: 30px; font-weight: 700; line-height: 1; }
.hero-dish { font-size: 16px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-rest { font-size: 13px; opacity: .88; }
.hero-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hero-price b { font-size: 18px; }
.hero-price s { font-size: 13px; opacity: .75; }
.hero-pic { width: 128px; height: 128px; flex-shrink: 0; border-radius: 64px; overflow: hidden; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; }
.hero-pic img { width: 100%; height: 100%; object-fit: cover; }

/* Категории и сервисы */
.cats { gap: 10px; padding: 0 16px; }
.cat { flex-shrink: 0; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cat-ic { width: 60px; height: 60px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--soft); font-size: 26px; }
.cat-ic img { width: 46px; height: 46px; }
.cat span { font-size: 12px; font-weight: 600; }
.cat[aria-pressed="true"] .cat-ic { background: var(--red-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cat[aria-pressed="true"] span { color: var(--accent); }
.chips { gap: 6px; padding: 0 16px; }
.chip { flex-shrink: 0; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; }
.svc-ic { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; object-fit: cover; }
.svc-ic.big { width: 34px; height: 34px; border-radius: 11px; }

.list-head { display: flex; align-items: center; justify-content: space-between; }
.list-head h2 { margin: 0; font-size: 17px; font-weight: 500; }
.sort { height: 34px; padding: 0 10px; border-radius: 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; background: var(--soft); }
.empty { margin: 0 16px; padding: 36px 20px; border-radius: 20px; text-align: center; line-height: 1.5; background: var(--card); color: var(--muted); }

/* Карточка ресторана в ленте */
.cards { display: flex; flex-direction: column; gap: 14px; padding: 0 16px; }
.card { width: 100%; text-align: left; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
:root:not([data-theme="dark"]) .card, :root:not([data-theme="dark"]) .mini { border-color: transparent; } /* в светлой теме карточку отделяет тень */
/* Светлая тема (05.10.2026): карточка ленты в чёрной обводке, «Ещё N акций» — отдельный блок в такой же рамке. Для тёмной темы — позже */
/* 06.10.2026 (выбор владельца, вариант А): кремовый фон и тонкие тёплые рамки вместо чёрных 2 px — см. --bg/--line-strong в :root */
:root:not([data-theme="dark"]) .card { border: 1px solid var(--line-strong); }
/* Светлая тема: поиск и «На карте»/район — белые в тонкой рамке; кружки категорий — белые с лёгкой тенью (выбранная — красная) */
:root:not([data-theme="dark"]) .search, :root:not([data-theme="dark"]) .dist-pill, :root:not([data-theme="dark"]) .chip:not([aria-pressed="true"]), :root:not([data-theme="dark"]) .sort { background: var(--card); border: 1px solid var(--line-strong); }
:root:not([data-theme="dark"]) .cat-ic { background: var(--card); box-shadow: 0 2px 8px rgba(60, 40, 10, .10); }
:root:not([data-theme="dark"]) .cat[aria-pressed="true"] .cat-ic { background: var(--red-soft); box-shadow: inset 0 0 0 2px var(--accent); }
:root:not([data-theme="dark"]) .card > .more { width: calc(100% - 20px); align-self: center; margin: 10px 0 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card); }
/* iPhone: содержимое кнопки само не растягивается на всю ширину — растягиваем явно */
.card > *, .mini > *, .svc-block > * { width: 100%; align-self: stretch; }
.pic { position: relative; height: 172px; display: flex; align-items: center; justify-content: center; background: var(--tint); overflow: hidden; }
.pic > img.photo { width: 100%; height: 100%; object-fit: contain; }
.pic.has-photo { background: #fff; } /* фото блюд из сервисов — на белом фоне, целиком (размытый фон владелец отклонил 02.10.2026) */
.pic > img.illu { width: 140px; height: 140px; }
.ph-rest { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.badge { position: absolute; top: 12px; left: 12px; padding: 7px 11px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; flex-direction: column; gap: 1px; }
.badge .gift-ic { display: block; width: 1.15em; height: 1.15em; } /* коробка подарка: белый контур на красном фоне значка */
.gift-line { margin-top: 4px; font-size: 14px; line-height: 1.35; }
.gift-line b { font-weight: 700; }
.badge b { font-size: 20px; line-height: 1; }
.badge small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.more { padding: 9px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: var(--soft); }
.more > span { flex: 1; font-size: 13px; font-weight: 700; color: var(--accent); }
.thumb { position: relative; width: 38px; height: 38px; flex-shrink: 0; border-radius: 19px; background: var(--card); box-shadow: 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.thumb img { width: 38px; height: 38px; border-radius: 19px; object-fit: cover; }
.thumb i { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); padding: 1px 4px; border-radius: 5px; background: var(--brand); color: #fff; font-size: 9px; font-weight: 700; font-style: normal; white-space: nowrap; }
.body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.rest-row { display: flex; align-items: center; gap: 8px; }
/* Части карточки, открывающие страницу ресторана (09.10.2026): стрелка «›» и подсветка только той части, куда нажали */
.rest-row.tap .rest-name { flex: 1; min-width: 0; }
.tap-arrow { color: var(--muted); flex-shrink: 0; }
.more > .tap-arrow { flex: none; color: var(--accent); }
.hero-rest.tap, .res-name b.tap, .mini-rest { display: flex; align-items: center; gap: 4px; }
.mini-rest { font-size: 11px; font-weight: 700; color: var(--muted); }
.tap { cursor: pointer; transition: opacity .12s; }
.tap:active { opacity: .5; }
.card:active:not(:has(.tap:active)) > .pic, .card:active:not(:has(.tap:active)) > .body { opacity: .8; }
.mini.from { outline: 2px solid var(--accent); outline-offset: -2px; }
.adm-sure { color: var(--green); font-weight: 700; }
.ini { position: relative; overflow: hidden; width: 30px; height: 30px; flex-shrink: 0; border-radius: 15px; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ini.big { width: 40px; height: 40px; border-radius: 20px; font-size: 13px; }
/* Логотипы у Yandex часто широкие (≈384×152): показываем целиком внутри круга, без обрезки */
.ini .logo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; box-sizing: border-box; background: #fff; opacity: 0; }
.ini .logo-img.own { object-fit: cover; padding: 0; } /* свои логотипы (аватарки) уже сделаны под круг — заполняют его целиком */
.ini.has-logo { box-shadow: 0 0 0 1px var(--line); }
.ini.has-logo .logo-img { opacity: 1; } /* логотип показываем, только когда он загрузился */
.rating { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.rating::first-letter { color: #F2A900; }
.rest-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.rest-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-name span { font-size: 12px; display: flex; align-items: center; gap: 5px; color: var(--muted); }
.dish { font-size: 17px; font-weight: 600; line-height: 1.25; }
.prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prices b { font-size: 19px; }
.prices s { font-size: 13px; color: var(--muted); }
.report-btn { align-self: center; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.report-btn:disabled { text-decoration: none; opacity: .8; }
.for-qty { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pay-hint { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--green); }
.save { font-size: 12px; font-weight: 700; padding: 3px 7px; border-radius: 7px; background: var(--green-soft); color: var(--green); }
.fee { font-size: 12px; margin-top: -2px; color: var(--muted); }
.cmp { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--soft); }
.cmp .cmp-num, .cmp .cmp-ok { color: var(--green); white-space: nowrap; }
.cmp .cmp-ok { font-weight: 800; }
.foot { font-size: 12px; color: var(--muted); }
.loader { padding: 40px 16px; text-align: center; color: var(--muted); }
.sentinel { height: 1px; }

/* Окно акции (лист снизу) */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10,10,12,.5); }
.sheet { position: relative; max-height: 92vh; overflow-y: auto; border-radius: 26px 26px 0 0; background: var(--card); animation: up .28s ease-out; padding-bottom: var(--safe-bottom); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .pic { height: 210px; }
.round-btn { position: absolute; top: 12px; width: 44px; height: 44px; border-radius: 22px; background: rgba(23,22,26,.55); color: #fff; display: flex; align-items: center; justify-content: center; }
.sheet-body { padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet-rest { display: flex; align-items: center; gap: 10px; text-align: left; }
.sheet-rest .ini { width: 40px; height: 40px; border-radius: 20px; font-size: 13px; }
.sheet-dish { font-size: 20px; font-weight: 500; line-height: 1.25; }
.sheet .prices b { font-size: 24px; }
.sheet .prices s { font-size: 15px; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); }
.tabs button { height: 42px; border-radius: 11px; font-size: 14px; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pane { display: flex; flex-direction: column; gap: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.svc-block { width: 100%; text-align: left; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); }
.svc-block[aria-pressed="true"] { border-color: var(--accent); }
.svc-head { min-height: 48px; padding: 0 14px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; background: var(--soft); }
.svc-block[aria-pressed="true"] .svc-head { background: var(--red-soft); }
.radio { width: 22px; height: 22px; flex-shrink: 0; border-radius: 11px; box-shadow: inset 0 0 0 2px var(--line-strong); display: flex; align-items: center; justify-content: center; }
.svc-block[aria-pressed="true"] .radio { background: var(--accent); box-shadow: none; }
.qty-note { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--green); color: var(--card); }
.svc-rows { padding: 4px 14px 12px; display: flex; flex-direction: column; }
.row { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.row > span:first-child { color: var(--muted); }
.row > span:last-child { font-weight: 600; text-align: right; }
/* 3.7: подробности доставки и сбора под строкой «Доставка и сбор» */
.row.dlv-sub { min-height: 26px; padding-left: 12px; font-size: 13px; }
.row.dlv-sub > span:last-child { font-weight: 500; }
.row.dlv-total { margin-top: 4px; border-top: 1px solid var(--line); font-size: 15px; }
.row.dlv-total > span:first-child { color: var(--text); font-weight: 700; }
.dlv-note { padding: 2px 0 4px; font-size: 12px; line-height: 1.35; color: var(--muted); }
/* «Сумма не совпала?» (17.10.2026): ссылка под блоками сервисов, по нажатию — поле для суммы из приложения сервиса */
.dlv-wrong { align-self: flex-start; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dlv-wrong.done { text-decoration: none; }
.dlv-wrong-form { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
.dlv-wrong-form small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.dlv-wrong-row { display: flex; gap: 8px; }
.dlv-wrong-row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-size: 16px; }
.dlv-wrong-send { padding: 8px 14px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.dlv-wrong-send:disabled { opacity: .6; }
.card-line { margin-top: 8px; padding: 10px 12px; border-radius: 12px; display: flex; align-items: center; gap: 10px; background: var(--green-soft); color: var(--green); font-size: 13px; font-weight: 600; }
.card-line span:first-of-type { flex: 1; }
.note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.cta { height: 56px; border-radius: 16px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.cta-note { margin-top: -6px; font-size: 12px; text-align: center; line-height: 1.4; color: var(--muted); }
.link-btn { height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.also { width: 100%; min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; text-align: left; }
.also span:nth-child(2) { flex: 1; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { padding: 12px 14px; border-radius: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--soft); }
.fact span { font-size: 12px; color: var(--muted); }
.fact b { font-size: 17px; }
.sec-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.box { border-radius: 14px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.box .row { padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.box .row:last-child { border-bottom: 0; }
.back-btn { height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; font-weight: 700; background: var(--red-soft); color: var(--red-text); }
.more-sec { margin-top: 4px; padding-top: 16px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); }
.more-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.more-head b { font-size: 16px; font-weight: 500; line-height: 1.3; }
.more-head button { height: 36px; font-size: 14px; font-weight: 700; color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { text-align: left; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.mini .pic { height: 108px; }
.mini .pic > img.illu { width: 80px; height: 80px; }
.mini .badge { top: 8px; left: 8px; padding: 4px 8px; border-radius: 9px; }
.mini .badge b { font-size: 13px; }
.mini-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.mini-body > span:first-child { font-size: 13px; font-weight: 600; line-height: 1.3; min-height: 34px; }
.mini-body b { font-size: 16px; }
.mini-body small { font-size: 11px; display: flex; align-items: center; gap: 5px; color: var(--muted); }

/* Поиск */
.search-bar { display: flex; align-items: center; gap: 8px; }
.search-bar .icon-btn { width: 44px; height: 46px; border-radius: 14px; flex-shrink: 0; }
.search-field { flex: 1; height: 46px; border-radius: 14px; padding: 0 6px 0 12px; display: flex; align-items: center; gap: 8px; box-shadow: inset 0 0 0 2px var(--brand); background: var(--card); color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
.search-field input::-webkit-search-cancel-button { display: none; }
.x-btn { width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--soft); color: var(--muted); }
.res-list { display: flex; flex-direction: column; gap: 12px; }
.sugg { display: flex; flex-direction: column; gap: 18px; }
.sugg-sec { display: flex; flex-direction: column; gap: 8px; }
.sugg-head { display: flex; align-items: center; justify-content: space-between; }
.text-btn { height: 32px; font-size: 13px; font-weight: 600; color: var(--accent); }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; background: var(--soft); }
.rank { border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.rank button { width: 100%; min-height: 52px; padding: 0 14px; display: flex; align-items: center; gap: 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.rank button:last-child { border-bottom: 0; }
.rank b { width: 22px; font-size: 15px; color: var(--muted); }
.rank b.top3 { color: var(--accent); }
.rank small { font-size: 12px; }
.rest-circles { gap: 12px; margin: 0 -16px; padding: 0 16px; }
.rest-circles button { flex-shrink: 0; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; }
.rest-circles .ini { width: 58px; height: 58px; border-radius: 29px; font-size: 15px; }
.res { width: 100%; padding: 14px; border-radius: 20px; text-align: left; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.res > * { width: 100%; }
:root:not([data-theme="dark"]) .res { border-color: transparent; }
.res-head { display: flex; align-items: center; gap: 10px; }
.res-pic { width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--tint); font-size: 30px; }
.res-pic.has-photo { background: #fff; }
.res-pic img { width: 100%; height: 100%; object-fit: contain; }
.res-pic img.illu { width: 46px; height: 46px; }
.res-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-name b { font-size: 15px; font-weight: 600; }
.res-name span { font-size: 13px; line-height: 1.3; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.res-badge { flex-shrink: 0; padding: 5px 9px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; }
.res-rows { display: flex; flex-direction: column; gap: 6px; }
.res-also { margin-top: 2px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.res-box { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.res-row { min-height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; border-bottom: 1px solid var(--line); }
.res-row:last-child { border-bottom: 0; }
.res-row.best { background: var(--green-soft); }

/* Страница ресторана */
.rest-page { position: fixed; inset: 0; z-index: 15; overflow-y: auto; background: var(--bg); animation: up .25s ease-out; padding-bottom: var(--safe-bottom); }
.rest-top { position: relative; padding: 18px 16px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: var(--card); border-bottom: 1px solid var(--line); }
.rest-back { position: absolute; top: 12px; left: 12px; width: 44px; height: 44px; border-radius: 22px; }
.rest-logo { width: 80px; height: 80px; border-radius: 40px; margin-top: 8px; font-size: 24px; }
.rest-title { font-size: 22px; font-weight: 700; }
.svc-pill { padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; background: var(--soft); }
.rest-body { padding: 16px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.rest-link { display: flex; align-items: center; gap: 8px; text-align: left; color: var(--muted); }
.rest-link .rest-row { flex: 1; color: var(--text); }

/* Приветствие */
.splash { position: fixed; inset: 0; z-index: 40; padding: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--bg); transition: opacity .25s; }
.splash.out { opacity: 0; pointer-events: none; }
.splash.wait .splash-word, .splash.wait .splash-phrase { animation-play-state: paused; } /* ждём загрузки шрифтов */
.splash-logo { width: 64px; height: 64px; border-radius: 20px; margin-bottom: 18px; animation: pop .5s cubic-bezier(.3,1.4,.5,1) backwards; }
.splash-word { font-family: Pacifico, cursive; font-size: 72px; line-height: 1.25; color: var(--accent); padding: 0 16px; animation: write 1.1s cubic-bezier(.6,.1,.3,1) both; }
.splash-phrase { font-family: Caveat, cursive; font-size: 34px; font-weight: 700; line-height: 1.15; text-align: center; max-width: 352px; padding: 4px 16px; /* запас по краям: рукописные буквы выступают за рамку, а iPhone режет всё за рамкой анимируемого блока */ animation: fade .6s ease-out 1.05s both; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Знакомство */
.ob { position: fixed; inset: 0; z-index: 35; padding: 16px 24px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; background: var(--bg); }
.ob-top { height: 44px; display: flex; justify-content: flex-end; }
.ob-skip { height: 44px; padding: 0 8px; font-size: 15px; font-weight: 600; color: var(--muted); }
.ob-mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.ob-mid h2 { margin: 0; font-size: 23px; font-weight: 700; line-height: 1.25; max-width: 320px; }
.ob-mid p { margin: -12px 0 0; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 320px; }
.ob-pic { position: relative; width: 300px; max-width: 100%; height: 290px; border-radius: 28px; overflow: hidden; background: var(--card); border: 1px solid var(--line); animation: pop .5s cubic-bezier(.3,1.4,.5,1) backwards; }
.ob-bottom { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.ob-bottom .cta { width: 100%; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--line-strong); transition: all .25s; }
.ob-dots span.on { width: 22px; background: var(--brand); }
.ob-sources { position: absolute; inset: 0; }
.ob-hub { position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 45px; background: var(--red-soft); display: flex; align-items: center; justify-content: center; }
.ob-src { position: absolute; width: 128px; height: 60px; padding: 0 10px; border-radius: 16px; display: flex; align-items: center; gap: 8px; text-align: left; background: var(--bg); border: 1px solid var(--line); }
.ob-src-ic { width: 34px; height: 34px; flex-shrink: 0; border-radius: 11px; }
.ob-src > span:last-child { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ob-src b { font-size: 12px; line-height: 1.2; }
.ob-src small { font-size: 11px; }
.ob-compare { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.ob-dish { display: flex; align-items: center; gap: 10px; }
.ob-dish > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ob-dish small { font-size: 12px; }
.ob-dish-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.ob-dish-ic img { width: 38px; height: 38px; }
.ob-bar { display: flex; flex-direction: column; gap: 6px; }
.ob-bar-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ob-track { height: 10px; border-radius: 5px; overflow: hidden; background: var(--soft); }
.ob-track div { height: 10px; border-radius: 5px; }
.ob-compare > small { font-size: 11px; }
.ob-order { position: absolute; inset: 0; padding: 18px 14px; display: flex; align-items: flex-start; justify-content: center; gap: 8px; }
.ob-phone { width: 118px; height: 200px; padding: 8px; border-radius: 22px; display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--card); border: 3px solid var(--text); font-size: 11px; }
.ob-phone small { font-size: 9px; }
.ob-phone-pic { position: relative; height: 62px; flex-shrink: 0; border-radius: 11px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.ob-phone-pic img { width: 50px; height: 50px; }
.ob-phone-pic i { position: absolute; top: 5px; left: 5px; padding: 1px 5px; border-radius: 5px; background: var(--brand); color: #fff; font-size: 9px; font-weight: 700; font-style: normal; }
.ob-phone-btn { margin-top: auto; height: 26px; flex-shrink: 0; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; }
.ob-arrow { align-self: center; margin-top: -40px; width: 28px; height: 28px; border-radius: 14px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ob-notice { position: absolute; left: 16px; right: 16px; bottom: 12px; padding: 9px 12px; border-radius: 14px; background: var(--soft); font-size: 12px; font-weight: 700; line-height: 1.3; text-align: left; }

/* Профиль */
.profile { display: flex; flex-direction: column; gap: 16px; }
.p-box { border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
:root:not([data-theme="dark"]) .p-box { border-color: transparent; }
.p-set { min-height: 56px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.p-set:last-child { border-bottom: 0; }
.p-set small { font-size: 12px; }
.mini-pill { height: 24px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 600; background: var(--red-soft); color: var(--red-text); flex-shrink: 0; }
.switch { width: 52px; height: 32px; flex-shrink: 0; border-radius: 16px; padding: 3px; display: flex; background: var(--line-strong); transition: background .2s; }
.switch span { width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch.on { background: var(--brand); }
.switch.on span { transform: translateX(20px); }
.p-row { width: 100%; min-height: 60px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; text-align: left; border-bottom: 1px solid var(--line); color: var(--text); }
.p-row:last-child { border-bottom: 0; }
.p-row svg { color: var(--muted); }
.p-ic { width: 36px; display: flex; justify-content: center; font-size: 19px; }
.p-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.p-txt small { font-size: 12px; }
.p-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; }
.p-links button { min-height: 44px; padding: 0 4px; font-size: 13px; text-decoration: underline; color: var(--muted); }
.page-head { position: sticky; top: 0; z-index: 1; padding: 12px 16px; display: flex; align-items: center; gap: 12px; background: var(--bg); }
.page-head b { font-size: 18px; }
.invite-link { padding: 4px 6px 4px 14px; min-height: 48px; border-radius: 14px; display: flex; align-items: center; gap: 8px; background: var(--soft); font-weight: 600; word-break: break-all; }
.invite-link .mini-pill { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
/* Светлая тема (06.10.2026): поле со ссылкой — белое в рамке, «Скопировать» — красная кнопка, «Ещё» — белая в рамке (раньше всё было бледно-розовое и сливалось с фоном) */
:root:not([data-theme="dark"]) .invite-link { background: var(--card); border: 1px solid var(--line-strong); }
:root:not([data-theme="dark"]) .invite-link .mini-pill { background: var(--brand); color: #fff; }
:root:not([data-theme="dark"]) .back-btn { background: var(--card); color: var(--text); border: 1px solid var(--line-strong); }
.doc-text { white-space: pre-wrap; line-height: 1.55; font-size: 14px; }

/* Нижнее меню */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 8px calc(6px + var(--safe-bottom)); background: var(--nav); border-top: 1px solid var(--line); }
.nav button { height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.nav button[aria-current="page"] { color: var(--accent); }
.soon { margin: 0 16px; padding: 28px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.soon b { font-size: 18px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(90px + var(--safe-bottom)); z-index: 30; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; text-align: center; animation: up .2s ease-out; }
:root[data-theme="dark"] .toast { background: #3A373F; }
.err { margin: 40px 16px; padding: 24px; border-radius: 20px; background: var(--card); text-align: center; line-height: 1.5; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.err button { height: 44px; padding: 0 20px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; }

/* ---------- район, расстояние и карта (3.3, 03.10.2026) ---------- */
.dist-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dist-pill { min-height: 36px; padding: 0 12px; border-radius: 18px; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; background: var(--soft); color: var(--text); }
.dist-pill svg { color: var(--muted); }
.dist-fresh { flex-basis: 100%; }
.km-note { margin-left: 2px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dist-page { display: flex; flex-direction: column; gap: 12px; }
.dist-map { height: 40vh; min-height: 250px; border-radius: 16px; overflow: hidden; background: var(--soft); }
.dist-map[hidden], .dist-note[hidden], .dist-search[hidden], .dist-grid[hidden], .link-btn[hidden], .map-full[hidden], .empty[hidden] { display: none; }
.dist-note { padding: 12px 14px; border-radius: 14px; line-height: 1.45; background: var(--soft); }
.dist-search { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 8px 0 14px; border-radius: 14px; background: var(--soft); }
.dist-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
.dist-search input::-webkit-search-cancel-button { display: none; }
.dist-search .mini-pill { height: 32px; width: 40px; display: flex; align-items: center; justify-content: center; }
.dist-info { min-height: 20px; font-weight: 600; line-height: 1.4; }
.dist-row { display: flex; align-items: center; gap: 12px; }
.dist-row .dist-info { flex: 1; min-width: 0; }
.dist-pick { flex: none; height: 44px; padding: 0 22px; border-radius: 14px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 700; }
.dist-pick[disabled] { background: var(--line-strong); color: var(--muted); }
/* «Мои адреса» (19.10.2026): Дом / Работа / Недавние — внизу экрана, под «Выбрать район из списка» */
.dist-places { display: flex; flex-direction: column; gap: 6px; }
.place-row { display: flex; gap: 6px; }
.place-btn { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; color: var(--text); }
.place-btn span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-btn b { flex: none; }
.place-del { flex: none; width: 40px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 14px; }
.dist-places[hidden], small[hidden] { display: none; }
.btn-locate { height: 48px; border-radius: 14px; border: 2px solid var(--line-strong); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dist-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dist-grid button { min-height: 46px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--line); font-size: 15px; font-weight: 600; text-align: center; }
.dist-grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--red-soft); }
.dist-actions { margin-top: 4px; padding-bottom: calc(12px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; } /* не закреплены: при вводе адреса не закрывают поле (просьба владельца 04.10.2026) */
.cta[disabled] { opacity: .4; }
.deal-map { position: relative; height: 300px; border-radius: 16px; overflow: hidden; background: var(--soft); }
.deal-map-legend { font-size: 12px; line-height: 1.5; color: var(--muted); }
.deal-map-near { font-size: 14px; font-weight: 700; }
.dist-saved { display: flex; flex-direction: column; gap: 6px; }
.dist-saved[hidden] { display: none; }
.saved-addr { text-align: left; padding: 9px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-plaque { width: 100%; margin-top: 10px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; text-align: left; border-radius: 16px; background: var(--red-soft); border: 2px solid var(--accent); box-shadow: var(--shadow); }
.addr-pin { font-size: 22px; }
.addr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.addr-text b { font-size: 15px; font-weight: 700; color: var(--red-text); }
.addr-text small { font-size: 12px; color: var(--text); }
.addr-go { padding: 7px 14px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.addr-ask { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; max-width: 62%; font-size: 13px; line-height: 1.35; }
.top .ctl { display: flex; align-items: center; gap: 8px; }
.help-btn { font-size: 20px; font-weight: 700; }
.help { gap: 18px; }
.help-block { display: flex; flex-direction: column; gap: 4px; }
.help-block b { font-size: 16px; }
.help-block p { margin: 0; line-height: 1.5; color: var(--muted); }
/* Админка владельца (3.6) */
.adm-content [hidden] { display: none; }
.hours-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.hours-note.closed { color: var(--red-text); font-weight: 600; }
.adm-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; } /* 7 вкладок: два ряда (4 + 3), слова не слипаются */
.adm-tabs button { white-space: nowrap; padding: 0 2px; min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.adm-side { display: flex; flex-direction: column; gap: 2px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.adm-side-name { display: flex; align-items: center; gap: 6px; }
.adm-stat { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.adm-stat b { text-align: right; white-space: nowrap; }
.adm-pick { text-align: left; width: 100%; color: inherit; font: inherit; cursor: pointer; }
.adm-sub { margin-top: 4px; }
.adm-content, .adm-list, .adm-form { display: flex; flex-direction: column; gap: 10px; }
.adm-row { display: flex; gap: 8px; }
.adm-row .adm-input { flex: 1; min-width: 0; }
.adm-input { width: 100%; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 14px; }
textarea.adm-input { resize: vertical; }
.adm-field { display: flex; flex-direction: column; gap: 4px; }
.adm-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 14px; }
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.adm-st { height: auto; padding: 3px 8px; background: var(--soft); color: var(--muted); }
.adm-st.ok { background: var(--red-soft); color: var(--red-text); }
.adm-warn { color: var(--red-text); font-weight: 600; }
.adm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.adm-actions .back-btn, .adm-actions .cta { width: auto; flex: 1; min-width: 120px; }
:root:not([data-theme="dark"]) .adm-card, :root:not([data-theme="dark"]) .adm-input { border: 1px solid var(--line-strong); }
.map-wrap { position: relative; }
.map-bar { padding: 0 0 8px; }
.map-bar .chip[hidden], .map-all-hint[hidden] { display: none; }
.map-all-hint { display: block; margin-top: 6px; line-height: 1.35; }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--card); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.map-card[hidden] { display: none; }
.map-card-note { font-size: 13px; font-weight: 600; }
.map-full { height: calc(100vh - 200px); min-height: 320px; border-radius: 16px; overflow: hidden; background: var(--soft); }
/* Светлая тема: карты и кнопка «Все рестораны» в рамке, чтобы не сливались с фоном (06.10.2026; тёмная без изменений) */
:root:not([data-theme="dark"]) .map-full, :root:not([data-theme="dark"]) .dist-map, :root:not([data-theme="dark"]) .deal-map,
:root:not([data-theme="dark"]) .map-all { border: 1.5px solid #CDBFA9; }
