/* ============ Yoobi — дизайн-система v0.5 (по DESIGN.md) ============ */
:root {
  --brand: #ffc907;
  --brand-soft: #fff6d6;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --bg: #eef1f6;
  --field: #f1f5f9;
  --card: #ffffff;
  --line: #e2e8f0;
  --green: #10b981;
  --red: #f43f5e;
  --blue: #2563eb;
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.18);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.10);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.08);
  --r-lg: 24px;
  --r-md: 14px;
  --r-sm: 10px;
  --sk-base: #e7ecf3;
  --sk-hi: #f4f7fb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* SVG-иконки */
.ic { width: 20px; height: 20px; display: block; }
svg.ic use { pointer-events: none; }

/* ============ Карта ============ */
#map { position: fixed; inset: 0; z-index: 0; background: #dde3ec; }
.leaflet-control-attribution { font-size: 10px; opacity: 0.7; }
/* Позицию курьера двигает requestAnimationFrame — CSS-переход не нужен (мешал бы) */
.courier-marker { transition: none; }
.courier-wrap .em img { transition: transform 0.25s ease; }

/* ============ Подсказка над картой ============ */
.hint-pill {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: rgba(15, 23, 42, 0.92); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-md); z-index: 50;
  max-width: min(92vw, 560px); backdrop-filter: blur(8px);
  transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
.hint-pill.hide { opacity: 0; transform: translateX(-50%) translateY(-8px); }

/* ============ Кнопки карты ============ */
.map-controls {
  position: fixed; right: 16px; bottom: 28px;
  display: flex; flex-direction: column; gap: 8px; z-index: 40;
}
.mbtn {
  width: 46px; height: 46px; border: none; border-radius: 15px;
  background: var(--card); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md); transition: transform 0.12s, background 0.12s;
}
.mbtn:hover { background: #f8fafc; transform: translateY(-1px); }
.mbtn:active { transform: scale(0.94); }

.layers-menu {
  position: fixed; right: 72px; bottom: 28px; z-index: 45;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: 8px; width: 190px; animation: pop 0.16s ease;
}
.lm-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px; padding: 4px 10px 8px;
}
.lm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; border-radius: var(--r-sm);
  background: none; font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); transition: background 0.1s;
}
.lm-item:hover { background: var(--field); }
.lm-item.active { background: var(--brand-soft); color: var(--ink); font-weight: 700; }

/* ============ Панель ============ */
#panel {
  position: fixed; top: 16px; left: 16px; bottom: 16px;
  width: 416px; z-index: 60;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(20px);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  overflow-y: auto; scrollbar-width: none;
}
#panel::-webkit-scrollbar { width: 0; height: 0; display: none; }
.sheet-handle { display: none; }

/* Шапка */
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { display: flex; align-items: center; }
.brand-logo { height: 34px; width: auto; display: block; }
.head-right { display: flex; align-items: center; gap: 10px; }

.conn { display: grid; place-items: center; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; }
.conn-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.conn-dot.off { background: var(--red); }

.account-btn {
  display: flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px 7px 11px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: 0.12s;
}
.account-btn:hover { background: var(--field); border-color: var(--muted-2); }
.account-btn .ic { width: 17px; height: 17px; }
.account-btn.logged { background: var(--brand-soft); border-color: var(--brand); }

/* ===== Шапка по макету: лого-плитка + заголовок + подзаголовок + онлайн ===== */
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(255,201,7,.45); }
.brand-mark .ic { width: 22px; height: 22px; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand-txt { display: flex; flex-direction: column; }
.brand-txt b { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 16px; letter-spacing: .5px; }
.brand-txt span { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.online-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: #f8fafc; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; flex: none; }
.online-pill .conn-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.online-pill .conn-dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.online-pill .conn-dot.off { background: var(--muted-2); }
.online-pill .chev { width: 13px; height: 13px; color: var(--muted); }

/* ===== Десктоп-навигация (сегментированное меню справа сверху) ===== */
.top-nav { position: fixed; top: 16px; right: 16px; z-index: 70; display: flex; gap: 2px; padding: 4px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-md); }
.tnav { border: none; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 500; padding: 9px 16px; border-radius: 999px; cursor: pointer; transition: .12s; white-space: nowrap; }
.tnav:hover { color: var(--ink); }
.tnav.active { background: var(--brand-soft); color: var(--ink); font-weight: 700; }

/* ===== Мобильная нижняя навигация ===== */
.mob-nav { display: none; }
/* Элементы карточки заказа, добавленные ТОЛЬКО для мобильного вида (сумма справа
   и строка статуса с точкой). На десктопе их быть не должно — там своя раскладка
   карточки со статус-чипом, маршрутом и подвалом. */
.oc-sum, .oc-dotline { display: none; }
/* Строка «Город» существует только в мобильном профиле — на десктопе город
   выбирается в шапке панели, поэтому там она скрыта. */
/* Заглушки мобильных элементов перенесены В КОНЕЦ файла (перед последним
   мобильным медиа): здесь их перебивали базовые правила (.addr-item и др.),
   объявленные ниже, — строки «Город/Адреса/Оплата/Язык» вылезали на десктоп. */
.av-cam, #mobSubBackdrop { display: none; }
.sc-ic-m { display: none; }

/* 3D-посылка в карточке заказа: БАЗОВЫЕ стили (десктоп и телефон).
   Раньше картинка была стилизована только в мобильном медиа — на десктопе
   выводилась в натуральные 160px и разваливала карточки списка. */
.oc-ic.art { position: relative; overflow: hidden; background: var(--field); }
.oc-ic.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.oc-ic.art .ic { opacity: 0; }
/* Редактор профиля → строка «Номер телефона»: раньше у .pc-row/.pc-cur/.pc-link
   не было НИКАКИХ стилей — кнопка «Изменить» выглядела голой браузерной.
   Стилизуем в духе остальных полей (одинаково на десктопе и телефоне). */
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--field); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px 11px 14px; }
.pc-cur { font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pc-link { flex: none; border: none; background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer; transition: .12s; }
.pc-link:hover { border-color: var(--ink); }
.pc-link:active { transform: scale(.96); }

/* ===== Действия маршрута (Добавить точку / Поменять) ===== */
.route-actions { display: flex; gap: 8px; }
.route-actions .add-point { flex: 1; justify-content: center; }

/* ===== Гость в профиле ===== */
.guest-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 12px; }
.guest-box .profile-av.big { width: 64px; height: 64px; }
.guest-box .profile-av.big .ic { width: 32px; height: 32px; }
.guest-box b { font-size: 18px; font-family: "Unbounded", sans-serif; }
.guest-box span { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.guest-box .cta { width: 100%; }

/* ===== Режим «страница» (Еда/Заказы/Профиль) — полноширинный контент, без карты ===== */
body.b-page #map, body.b-page .map-controls, body.b-page #hintPill, body.b-page #panel > .head, body.b-page .sheet-handle { display: none !important; }
body.b-page { background: var(--bg); }
body.b-page #panel {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%); bottom: 16px;
  width: min(840px, 94vw); background: transparent; backdrop-filter: none; box-shadow: none;
  padding: 0 4px 8px; gap: 16px;
}
/* витрина «Еда» — широкая раскладка на всю ширину */
body.b-food #panel { width: min(1450px, 96vw); padding-top: 6px; }
/* отступы между шапкой (заголовок/поиск/категории) и карточками */
#marketView { display: flex; flex-direction: column; gap: 16px; }
#marketView .mkt-headrow { margin-bottom: 2px; }
#marketView .chips { margin-bottom: 4px; }
/* Иконки в чипах категорий витрины (Еда/Магазин/Аптека) — как разделы-блоки. */
#mktChips .chip { display: inline-flex; align-items: center; gap: 6px; }
#mktChips .chip .ic { width: 15px; height: 15px; }
.page-head { margin-bottom: 2px; }
.page-head h2 { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 24px; line-height: 1.1; }
.page-head span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ===== Карточки заказов (как в макете) ===== */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); }
.oc-head { display: flex; align-items: center; gap: 11px; }
.oc-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; }
/* Обложка заведения в карточке заказа (как _orderAvatar в приложении):
   картинка поверх иконки-фолбэка; при ошибке загрузки класс cover снимается
   скриптом и остаётся обычная иконка. */
.oc-ic.cover { position: relative; overflow: hidden; background: var(--field); }
.oc-ic.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oc-ic.cover .ic { opacity: 0; }
.oc-ic.courier { background: var(--brand-soft); color: #b8860b; }
.oc-ic.food { background: #dcfce7; color: #16a34a; }
.oc-ic .ic { width: 20px; height: 20px; }
.oc-ti { flex: 1; min-width: 0; }
.oc-ti b { display: block; font-size: 14px; }
.oc-ti span { font-size: 12px; color: var(--muted); }
.oc-status { font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; flex: none; }
.oc-status.delivered { background: #dcfce7; color: #15803d; }
.oc-status.cancelled { background: #ffe4e6; color: #be123c; }
.oc-status.active { background: var(--brand-soft); color: #92711a; }
.oc-sched { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: #b8860b; background: var(--brand-soft); border-radius: 9px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; }
/* инлайн-иконка часов (замена эмодзи 🕒) */
.ic-clock { width: 1.05em; height: 1.05em; flex: none; vertical-align: -0.16em; margin-right: .15em; }
.oc-sched .ic-clock, .when-hint .ic-clock, #ftSub .ic-clock { color: currentColor; }
.oc-route { margin: 11px 0; display: flex; flex-direction: column; gap: 6px; }
.ocr { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.ocr span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ocr-dot.a { background: var(--green); }
.ocr-dot.b { background: var(--red); }
/* Детали заказа (модалка) */
.auth-card.od-card { width: min(450px, 100%); max-height: 90vh; overflow-y: auto; text-align: left; scrollbar-width: none; padding-top: 20px; }
@media (max-width: 480px) { .auth-card.od-card { width: 100%; max-height: 92vh; padding: 18px 15px; } .order-grid { grid-template-columns: 1fr; } }
.od-card::-webkit-scrollbar { display: none; }
.od-card .auth-close { top: 16px; left: 16px; }
.od-head { display: flex; align-items: center; gap: 11px; margin: 30px 0 4px; }
.od-ti { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-ti b { font-size: 16px; }
.od-ti span { font-size: 12px; color: var(--muted); }
.od-sec { border-top: 1px solid var(--line); padding-top: 13px; margin-top: 13px; }
.od-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 11px; }
.od-items { display: flex; flex-direction: column; gap: 11px; }
.od-photos { display: flex; gap: 10px; flex-wrap: wrap; }
.od-photo { display: block; width: 120px; height: 120px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.od-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.od-it { display: flex; align-items: center; gap: 11px; }
.od-it-img { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; background: var(--field); flex: none; }
.od-it-img img { width: 100%; height: 100%; object-fit: cover; }
.od-it-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-it-main span { font-size: 13.5px; font-weight: 600; }
.od-it-main small { font-size: 12px; color: var(--muted); }
.od-it > b { font-variant-numeric: tabular-nums; font-size: 13.5px; flex: none; }
.od-route { display: flex; flex-direction: column; gap: 9px; }
.od-route .ocr { align-items: flex-start; }
.od-route .ocr span:last-child { white-space: normal; }
.od-route .ocr-dot { margin-top: 5px; }
.od-row { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; margin-bottom: 9px; }
.od-row span { color: var(--muted); }
.od-row.od-total { font-size: 16px; font-weight: 800; margin-top: 4px; margin-bottom: 0; }
.od-card .cta { margin-top: 16px; }
/* курьер в деталях заказа */
.od-courier { display: flex; align-items: center; gap: 12px; }
.od-cav { position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none; background: var(--brand-soft); color: #92711a; display: grid; place-items: center; font-weight: 800; font-size: 17px; overflow: hidden; }
.od-cav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.od-cmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-cmain b { font-size: 14.5px; }
.od-cmain small { font-size: 12px; color: var(--muted); }
.od-cveh { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; color: var(--ink-2); }
.od-cveh img { width: 34px; height: 22px; object-fit: contain; }
.od-cveh span { font-size: 11px; font-weight: 600; }
/* оценка/чаевые в деталях заказа */
.od-rate-done { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.od-stars { color: var(--line); font-size: 20px; letter-spacing: 2px; }
.od-star.on { color: #f5a623; }
.od-tip { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.btn-rate { display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; padding: 11px; border: 1.5px solid var(--brand); background: var(--brand-soft); color: #92711a; border-radius: 12px; font-size: 14px; font-weight: 700; }
.btn-rate .ic { width: 17px; height: 17px; }
.od-prate { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.od-pname { font-size: 13.5px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.od-pstars { display: flex; gap: 1px; flex: none; }
.od-pstar { border: none; background: none; font-size: 23px; line-height: 1; color: var(--line); cursor: pointer; padding: 0 1px; transition: color .1s; }
.od-pstar.on { color: #f5a623; }
/* «бегущий» эффект по жёлтому треку на карте */
.route-flow { animation: routeflow 1s linear infinite; }
@keyframes routeflow { to { stroke-dashoffset: -14; } }
/* Пульсирующая граница города (как в приложении): дыхание толщины/яркости контура */
.city-border { animation: cityborder 2.4s ease-in-out infinite; }
@keyframes cityborder {
  0%, 100% { stroke-opacity: .55; stroke-width: 2.5; }
  50% { stroke-opacity: 1; stroke-width: 4.5; }
}
.od-parcel { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; }
.od-pic { width: 40px; height: 40px; border-radius: 11px; flex: none; background: var(--brand-soft); color: #92711a; display: grid; place-items: center; }
.od-pic .ic { width: 21px; height: 21px; }
.oc-foot { display: flex; align-items: center; justify-content: space-between; }
.oc-foot b { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.oc-repeat { padding: 9px 16px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--ink); transition: .12s; }
.oc-repeat:hover { border-color: var(--ink); }

/* ===== Шапка витрины «Еда» ===== */
.mkt-headrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mkt-h h2 { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 24px; line-height: 1.1; }
.mkt-h span { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.mkt-headrow .mkt-addr { width: auto; flex: none; max-width: 220px; margin: 0; }
.mkt-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.mkt-fav-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted-2); flex: none; box-shadow: var(--shadow-sm); cursor: pointer; transition: 0.12s; }
.mkt-fav-btn .ic { width: 19px; height: 19px; }
.mkt-fav-btn.active { color: var(--red); border-color: var(--red); }
.mkt-fav-btn.active .ic { fill: var(--red); }
.mkt-mic { border: none; background: none; color: var(--muted); padding: 2px 4px; flex: none; }
.mkt-mic.on { color: var(--red); }
.mkt-mic .ic { width: 18px; height: 18px; }

/* ===== Витрина (Yandex-стиль): карточки ресторанов ===== */
.rc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: .14s; }
.rc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rc-cover { position: relative; height: 150px; overflow: hidden; background: linear-gradient(135deg, var(--tint), var(--tint2)); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 10px, rgba(255,255,255,0) 10px 20px), linear-gradient(135deg, var(--tint), var(--tint2)); }
.rc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-fav { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255,255,255,.92); color: #94a3b8; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.rc-fav .ic { width: 18px; height: 18px; }
.rc-fav.on { color: var(--red); }
.rc-fav.on .ic { fill: var(--red); }
.rc-promo { position: absolute; left: 10px; bottom: 10px; background: var(--brand); color: var(--ink); font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.rc-body { padding: 11px 12px 13px; }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rc-top b { font-size: 15.5px; font-weight: 800; }
.rc-rt { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 800; flex: none; }
.rc-rt .ic { width: 13px; height: 13px; color: #f59e0b; }
.rc-rt i { color: var(--muted); font-weight: 600; font-style: normal; }
.rc-time { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.rc-time .ic { width: 14px; height: 14px; }
.rc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.rc-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: var(--field); color: var(--ink-2); }
.rc-badge.free { background: #dcfce7; color: #15803d; }
.rc-badge.promo { background: var(--brand-soft); color: #92711a; }

/* ===== Страница магазина (Yandex-стиль) ===== */
.store-hero { position: relative; height: 200px; border-radius: 18px; overflow: hidden; margin-bottom: 12px; background: linear-gradient(135deg, var(--tint), var(--tint2)); }
.store-hero img { width: 100%; height: 100%; object-fit: cover; }
.store-hero-in { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; }
.store-hero-in h2 { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 26px; }
.store-hero-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.store-hero-meta .rc-rt { color: #fff; } .store-hero-meta .rc-rt i { color: #e2e8f0; }
.store-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }
.store-hero-meta .ic { width: 14px; height: 14px; }
/* 3-колоночный блок доставки + промо-баннер (как на макете) */
.store-stats { display: flex; margin: 0 0 12px; padding: 14px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.store-stats .ss { flex: 1; text-align: center; border-right: 1px solid var(--line); padding: 0 6px; }
.store-stats .ss:last-child { border-right: none; }
.store-stats .ss b { display: block; font-family: "Unbounded", sans-serif; font-size: 15px; font-weight: 800; color: var(--ink); }
.store-stats .ss b.ss-free { color: var(--green); }
.store-stats .ss span { font-size: 12px; color: var(--muted); margin-top: 2px; display: block; }
@media (max-width: 640px) { .store-stats { padding: 12px 0; } .store-stats .ss { padding: 0 4px; } .store-stats .ss b { font-size: 13.5px; } .store-stats .ss span { font-size: 11px; } }
.store-promo { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px; background: #fff3d2; border-radius: var(--r-md); }
.store-promo .ic { width: 20px; height: 20px; color: #7a5e00; flex: none; }
.store-promo span { font-size: 13.5px; font-weight: 700; color: #7a5e00; }
.store-banner { display: flex; align-items: center; gap: 9px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.store-banner .ic { width: 18px; height: 18px; color: var(--green); }
.store-layout { display: grid; grid-template-columns: 180px 1fr 300px; gap: 18px; align-items: start; }
.store-menu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.sm-item { text-align: left; border: none; background: none; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.sm-item:hover { background: var(--field); color: var(--ink); }
.sm-item.active { background: var(--brand-soft); color: var(--ink); font-weight: 700; }

/* карточки товаров (Yandex-стиль) */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: .12s; }
.pcard:hover { box-shadow: var(--shadow-md); }
.pcard-img { position: relative; aspect-ratio: 1 / 0.82; background: linear-gradient(135deg, var(--tint), var(--tint2)); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 9px, rgba(255,255,255,0) 9px 18px), linear-gradient(135deg, var(--tint), var(--tint2)); }
.pcard-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-disc { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.pcard-price { font-size: 16px; font-weight: 800; padding: 10px 12px 2px; font-variant-numeric: tabular-nums; }
.pcard-price s { color: var(--muted-2); font-weight: 600; font-size: 12px; margin-left: 4px; }
.pcard-name { font-size: 13px; color: var(--ink-2); padding: 0 12px; line-height: 1.3; flex: 1; }
.pcard-act { padding: 10px 12px 12px; }
.pcard-add { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: none; border-radius: 11px; background: var(--field); color: var(--ink); font-size: 13px; font-weight: 700; transition: .12s; }
.pcard-add:hover { background: var(--brand-soft); }
.pcard-add .ic { width: 15px; height: 15px; }
.pcard-qty { display: flex; align-items: center; justify-content: space-between; background: var(--brand-soft); border-radius: 10px; padding: 3px; max-width: 150px; margin: 0 auto; }
.pcard-qty button { width: 30px; height: 28px; border: none; background: #fff; border-radius: 8px; display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow-sm); }
.pcard-qty button .ic { width: 15px; height: 15px; }
.pcard-qty b { font-weight: 800; font-variant-numeric: tabular-nums; }

/* правая панель корзины */
.store-cart { position: sticky; top: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; max-height: calc(100vh - 100px); }
.scart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.scart-head b { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 18px; }
.scart-clear { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; }
.scart-clear:hover { color: var(--red); }
.scart-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted-2); padding: 30px 0; text-align: center; font-size: 13px; }
.scart-empty .ic { width: 44px; height: 44px; }
/* товар в корзине с фото */
.cit { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cit:last-child { border-bottom: none; }
.cit-img { width: 52px; height: 52px; flex: none; border-radius: 11px; overflow: hidden; background: var(--field); }
.cit-img img { width: 100%; height: 100%; object-fit: cover; }
.cit-main { flex: 1; min-width: 0; }
.cit-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cit-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cit-q { display: flex; align-items: center; gap: 4px; background: var(--field); border-radius: 9px; padding: 3px; }
.cit-q button { width: 26px; height: 26px; border: none; background: #fff; border-radius: 7px; display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow-sm); }
.cit-q button .ic { width: 14px; height: 14px; }
.cit-q b { min-width: 16px; text-align: center; font-weight: 800; font-size: 13px; }
.cit-p { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scart-foot { margin-top: auto; padding-top: 12px; }
.scart-deliv { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); margin-bottom: 10px; }
.scart-deliv b { font-weight: 800; }
.scart-go { width: 100%; }
.scart-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 4px; flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.scart-list::-webkit-scrollbar { display: none; }
.scart-row { display: flex; align-items: center; gap: 9px; }
.scart-q { display: flex; align-items: center; gap: 6px; flex: none; }
.scart-q button { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; display: grid; place-items: center; color: var(--ink); }
.scart-q button .ic { width: 14px; height: 14px; }
.scart-q b { min-width: 14px; text-align: center; font-weight: 800; font-size: 13px; }
.scart-n { flex: 1; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scart-p { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.scart-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); margin-bottom: 10px; }
.scart-total b { font-size: 18px; font-weight: 800; }

/* ===== Пикер адреса доставки ===== */
.auth-card.addr-picker { width: min(960px, 94vw); max-width: none; max-height: 94vh; overflow-y: auto; scrollbar-width: none; }
.addr-picker::-webkit-scrollbar { display: none; }
.addr-picker .auth-close { top: 22px; left: 18px; }
.ap-title { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 20px; margin-bottom: 6px; padding-left: 46px; min-height: 36px; display: flex; align-items: center; }
.ap-search { position: relative; margin-bottom: 10px; }
.ap-gps { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.ap-gps .ic { width: 18px; height: 18px; color: var(--blue); }
.ap-saved { display: flex; flex-direction: column; gap: 6px; }
.ap-saved:empty { display: none; }
.ap-saved-item { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font-size: 13.5px; text-align: left; margin-bottom: 0; }
.ap-saved-item .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ap-saved-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-map-wrap { position: relative; height: 420px; border-radius: 14px; overflow: hidden; margin: 10px 0; border: 1px solid var(--line); }
.ap-map { position: absolute; inset: 0; }
.ap-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 500; }
.ap-pin .ic { display: none; }
.ap-pin::before { content: ''; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); border: 3px solid #1a1a1a; box-shadow: 0 0 0 5px rgba(255,201,7,.25), 0 3px 6px rgba(0,0,0,.3); }
.ap-current { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 12px; min-height: 18px; text-align: center; }

/* ============ Карточки ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.hidden { display: none !important; }
section { display: flex; flex-direction: column; gap: 12px; }

/* ============ Маршрут (мультиточки) ============ */
.route-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 8px 12px 10px; box-shadow: var(--shadow-sm);
}
.points-list { display: flex; flex-direction: column; }
.point-row { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.pr-dot {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800;
  position: relative; z-index: 1;
}
.pr-dot.pickup { background: var(--green); }
.pr-dot.drop { background: var(--red); }
.point-row:not(:last-child)::before {
  content: ""; position: absolute; left: 10px; top: 26px; bottom: -7px;
  width: 2px; background-image: linear-gradient(var(--muted-2) 45%, transparent 45%);
  background-size: 2px 7px;
}
.pr-field { flex: 1; min-width: 0; background: var(--field); border: 1.5px solid transparent; border-radius: 12px; padding: 7px 12px 8px; transition: border-color 0.15s, background 0.15s; }
.pr-field:focus-within { border-color: var(--ink); background: #fff; }
.pr-field .flabel { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.pr-field input { width: 100%; border: none; outline: none; font-size: 14.5px; font-weight: 500; color: var(--ink); background: transparent; padding: 0; }
.pr-field input::placeholder { color: var(--muted-2); font-weight: 400; }
.add-point {
  display: flex; align-items: center; gap: 8px; margin: 6px 0 2px 4px;
  border: none; background: none; color: var(--blue); font-size: 13.5px; font-weight: 600; padding: 4px;
}
.add-point:hover { color: var(--ink); }
.add-point .ic { width: 16px; height: 16px; }

/* старые маршрутные стили (на случай переиспользования) */
.route-grid { display: flex; gap: 10px; }
.route-rail { display: flex; flex-direction: column; align-items: center; padding: 24px 0; width: 12px; flex: none; }
.rdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rdot.a { background: var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.rdot.b { background: var(--red); box-shadow: 0 0 0 3px rgba(244,63,94,0.16); }
.rline { flex: 1; width: 2px; margin: 5px 0; background-image: linear-gradient(var(--muted-2) 45%, transparent 45%); background-size: 2px 7px; }

/* Получатели */
.recip-mode { display: flex; gap: 6px; margin-bottom: 10px; background: var(--field); padding: 4px; border-radius: 12px; }
.recip-tab { flex: 1; border: none; background: none; padding: 8px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.recip-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.recip-form { display: flex; flex-direction: column; gap: 8px; }
.recip-form + .recip-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.recip-form .rf-title { font-size: 12px; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.recip-form .rf-dot { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 9px; font-weight: 800; background: var(--red); }
.recip-inputs { display: flex; gap: 8px; }
.recip-inputs .ri { flex: 1; background: var(--field); border: 1.5px solid transparent; border-radius: 12px; padding: 9px 12px; transition: border-color 0.15s, background 0.15s; }
.recip-inputs .ri:focus-within { border-color: var(--ink); background: #fff; }
.recip-inputs input { width: 100%; border: none; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.recip-inputs input::placeholder { color: var(--muted-2); }
.recip-phone { display: flex; align-items: center; gap: 4px; }
.recip-phone .pfx { font-size: 14px; font-weight: 600; color: var(--muted); }
.route-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field-row { position: relative; display: flex; align-items: center; gap: 8px; }
.fwrap {
  flex: 1; min-width: 0; background: var(--field);
  border: 1.5px solid transparent; border-radius: 12px;
  padding: 7px 12px 8px; transition: border-color 0.15s, background 0.15s;
}
.fwrap:focus-within { border-color: var(--ink); background: #fff; }
.flabel { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.finput { width: 100%; border: none; outline: none; font-size: 14.5px; font-weight: 500; color: var(--ink); background: transparent; padding: 0; }
.finput::placeholder { color: var(--muted-2); font-weight: 400; }

.ibtn {
  width: 38px; height: 38px; flex: none; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink-2);
  display: grid; place-items: center; transition: 0.12s;
}
.ibtn:hover { background: var(--brand-soft); border-color: var(--brand); }
.ibtn .ic { width: 18px; height: 18px; }
.ibtn.loading { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fspin {
  position: absolute; right: 56px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%;
  animation: spin 0.7s linear infinite; opacity: 0; transition: opacity 0.15s; pointer-events: none; z-index: 5;
}
.field-row.searching .fspin { opacity: 1; }

/* Подсказки адресов — текст полностью виден */
.suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); z-index: 90; overflow: hidden auto;
  display: none; max-height: 300px;
}
.suggest.open { display: block; animation: pop 0.16s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.s-head { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; padding: 9px 14px 3px; }
.sitem { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px 14px; border: none; background: none; text-align: left; transition: background 0.1s; }
.sitem:hover, .sitem.kbd { background: var(--field); }
.si-ic { width: 30px; height: 30px; flex: none; background: var(--field); border-radius: 9px; display: grid; place-items: center; color: var(--muted); margin-top: 1px; }
.si-ic .ic { width: 15px; height: 15px; }
.si-t { min-width: 0; flex: 1; }
.si-t b { display: block; font-size: 13.5px; font-weight: 600; white-space: normal; line-height: 1.35; }
.si-t small { display: block; font-size: 11.5px; color: var(--muted); white-space: normal; line-height: 1.4; margin-top: 1px; }

/* ============ Транспорт (иллюстрации курьеров) ============ */
.sec-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin: 2px 2px -6px; }
.tariffs { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; }
.tariff {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 10px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-md); transition: 0.15s; overflow: hidden;
}
.tariff:hover { border-color: var(--muted-2); transform: translateY(-1px); }
.tariff.selected { border-color: var(--ink); background: var(--brand-soft); box-shadow: var(--shadow-sm); }
/* Транспорт недоступен для этой дистанции (слишком далеко) — приглушаем, цену зачёркиваем */
.tariff.too-far { opacity: 0.5; border-style: dashed; }
.tariff.too-far .t-price { text-decoration: line-through; color: var(--muted); }
.tariff.too-far .t-eta { color: #f43f5e; font-weight: 700; }
.t-img { width: 100%; max-width: 72px; height: 44px; object-fit: contain; }
.t-name { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.t-price { font-size: 12.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.t-eta { font-size: 10px; color: var(--muted); min-height: 12px; font-variant-numeric: tabular-nums; }

/* ============ Расчёт ============ */
.quote { display: flex; flex-direction: column; gap: 10px; }
.q-stats { display: flex; align-items: center; }
.q-stat { flex: 1; text-align: center; }
.q-label { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.q-stat b { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.q-sep { width: 1px; height: 26px; background: var(--line); }
.q-break summary { font-size: 12.5px; color: var(--muted); font-weight: 500; cursor: pointer; user-select: none; }
.q-rows { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.q-row { display: flex; justify-content: space-between; font-size: 12.5px; }
.q-row span { color: var(--muted); }

/* ===== Скелетоны загрузки (shimmer-плейсхолдеры) — единая система, токены под тему ===== */
@keyframes sk-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes shimmer { to { background-position: -200% 0; } } /* legacy alias */
.skel { display: flex; flex-direction: column; gap: 9px; }
.sk, .sk-line {
  background-color: var(--sk-base);
  background-image: linear-gradient(100deg, transparent 18%, var(--sk-hi) 45%, var(--sk-hi) 55%, transparent 82%);
  background-size: 200% 100%; background-repeat: no-repeat; background-position: 200% 0;
  animation: sk-shimmer 1.4s cubic-bezier(.4, 0, .2, 1) infinite;
  border-radius: 8px;
}
.sk { display: block; color: transparent !important; user-select: none; pointer-events: none; }
.sk-line { display: block; height: 13px; border-radius: 6px; }
.sk-line.sm { height: 10px; } .sk-line.lg { height: 18px; }
.w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w90 { width: 90%; }
/* формы-плейсхолдеры */
.sk-img { width: 100%; aspect-ratio: 1 / 0.82; border-radius: 11px; }
.sk-cover { width: 100%; height: 92px; border-radius: 0; }
.sk-cover.tall { height: 150px; }
.sk-circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.sk-thumb { width: 52px; height: 52px; border-radius: 11px; flex: none; }
.sk-pill { height: 22px; width: 64px; border-radius: 999px; flex: none; }
.sk-pill.btn { height: 36px; width: 100%; border-radius: 11px; }
/* строки/колонки внутри карточек-скелетонов */
.sk-row { display: flex; align-items: center; gap: 11px; }
.sk-col { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.sk-spacer { flex: 1; }
/* карточка-скелетон не реагирует на наведение/клик */
.sk-static { pointer-events: none; cursor: default; }
.sk-static:hover { transform: none !important; box-shadow: var(--shadow-sm) !important; }
@media (prefers-reduced-motion: reduce) { .sk, .sk-line { animation: none; } }

/* ============ CTA ============ */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 16px; border: none; border-radius: var(--r-md); background: var(--ink); color: #fff;
  font-size: 15.5px; font-weight: 700; transition: 0.15s; box-shadow: var(--shadow-md);
}
.cta:hover:not(:disabled) { background: #1e293b; transform: translateY(-1px); }
.cta:active:not(:disabled) { transform: scale(0.985); }
.cta:disabled { background: #cbd5e1; color: #f8fafc; cursor: not-allowed; box-shadow: none; }
.cta-price { background: var(--brand); color: var(--ink); font-size: 14px; font-weight: 800; padding: 4px 12px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.cta-price:empty { display: none; }

.link-btn { border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 4px; align-self: center; }
.link-btn:hover { color: var(--ink); }

/* ============ Живой заказ ============ */
.live-head { display: flex; flex-direction: column; gap: 12px; }
.live-status { display: flex; align-items: center; gap: 12px; }
.live-status b { display: block; font-size: 16px; }
.live-order-id { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.4px; }
.pulse-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--brand); animation: pulse 1.4s infinite; }
.pulse-dot.done { background: var(--green); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,201,7,.55); } 70% { box-shadow: 0 0 0 12px rgba(255,201,7,0); } 100% { box-shadow: 0 0 0 0 rgba(255,201,7,0); } }

.courier-chip { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; }
.cc-av { width: 46px; height: 34px; object-fit: contain; flex: none; }
.cc-t b { display: block; font-size: 13.5px; }
.cc-t span { font-size: 11.5px; color: var(--muted); }

.live-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.lmetric { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; text-align: center; }
.lmetric span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.lmetric b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ===== Оценка курьера ===== */
.rate-card { text-align: center; }
.rate-success { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; animation: ratePop .4s cubic-bezier(.34,1.56,.64,1); }
.rate-success .ic { width: 34px; height: 34px; }
@keyframes ratePop { from { transform: scale(.3); opacity: 0; } }
.rate-courier { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stars { display: flex; justify-content: center; gap: 6px; margin: 14px 0 6px; }
.star { border: none; background: none; padding: 4px; cursor: pointer; color: var(--line); transition: transform .1s; }
.star .ic { width: 38px; height: 38px; }
.star:active { transform: scale(.88); }
.star.on { color: var(--brand); }
.tip-row { display: flex; gap: 8px; margin: 4px 0 12px; }
.tip-chip { flex: 1; padding: 11px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tip-chip.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
.rate-review { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font-family: inherit; font-size: 14px; resize: none; margin-bottom: 12px; background: var(--field); }
.rate-review:focus { outline: none; border-color: var(--ink); background: #fff; }
/* Проблема с заказом: вторичная кнопка под заказом + сетка вариантов */
.btn-line { display: inline-flex; align-items: center; gap: 8px; width: 100%; justify-content: center; padding: 12px; margin-top: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 12px; font-size: 14px; font-weight: 700; }
.btn-line .ic { width: 17px; height: 17px; }
.btn-line:active { transform: scale(.99); }
.prob-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 6px 0 14px; }
.prob-opt { padding: 12px 10px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-align: center; transition: 0.12s; }
.prob-opt.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
/* Оценка заведения (для заказов из «Еды») */
.rate-store { margin: 2px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); animation: ratePop .35s cubic-bezier(.34,1.56,.64,1); }
.rate-store-h { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rate-store .pm-title { margin: 0; }
.rate-store-name { font-size: 13px; font-weight: 700; color: var(--ink); }
.rate-store .stars { margin: 8px 0 0; }
.rate-store .star .ic { width: 32px; height: 32px; }

/* ===== Компактное отслеживание заказа «Еда» ===== */
.live-back { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; font-family: inherit; box-shadow: var(--shadow-sm); margin-bottom: 6px; align-self: flex-start; cursor: pointer; }
.live-back .ic { width: 16px; height: 16px; }
.ft { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); animation: ratePop .35s cubic-bezier(.34,1.56,.64,1); }
.ft-hero { display: flex; align-items: center; gap: 13px; }
.ft-badge { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(150deg, var(--brand), #ffb300); box-shadow: 0 6px 16px rgba(255,201,7,.45); color: #1a1205; }
.ft-badge .ic { width: 24px; height: 24px; }
.ft-head { min-width: 0; }
.ft-title { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 18px; line-height: 1.15; }
.ft-sub { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-oid { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ft-metrics { display: flex; gap: 10px; }
.ft-metrics.hidden { display: none; }
.ft-m { flex: 1; background: var(--field); border-radius: 14px; padding: 11px 14px; }
.ft-m span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ft-m b { font-size: 18px; font-weight: 800; }
.ft-steps { display: flex; flex-direction: column; padding-left: 2px; }
.ft-step { display: flex; align-items: center; gap: 11px; padding: 7px 0; position: relative; }
.ft-step::before { content: ''; position: absolute; left: 11px; top: 26px; height: calc(100% - 12px); width: 2px; background: var(--line); }
.ft-step:last-child::before { display: none; }
.ft-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line); color: transparent; z-index: 1; transition: .25s; }
.ft-dot .ic { width: 13px; height: 13px; }
.ft-st-label { font-size: 14px; font-weight: 600; color: var(--muted); transition: .25s; }
.ft-step.done .ft-dot { background: var(--green); border-color: var(--green); color: #fff; }
.ft-step.done::before { background: var(--green); }
.ft-step.done .ft-st-label { color: var(--ink-2); }
.ft-step.active .ft-dot { background: var(--brand); border-color: var(--brand); color: #1a1205; box-shadow: 0 0 0 5px rgba(255,201,7,.2); animation: pulse 1.6s infinite; }
.ft-step.active .ft-st-label { color: var(--ink); font-weight: 800; }
.ft-courier { display: flex; align-items: center; gap: 12px; background: var(--field); border-radius: 14px; padding: 12px 14px; }
.ft-cav { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.ft-cinfo { flex: 1; min-width: 0; }
.ft-cinfo b { font-size: 14.5px; }
.ft-cinfo small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 1px; }
.ft-cinfo small .ic { width: 13px; height: 13px; color: var(--brand); }
.ft-cveh { width: 46px; height: 32px; object-fit: contain; flex: none; }
.ft-code { display: flex; align-items: center; gap: 12px; background: #fff7e0; border: 1px solid #ffe49b; border-radius: 14px; padding: 12px 14px; }
[data-theme="dark"] .ft-code { background: rgba(255,201,7,.1); border-color: rgba(255,201,7,.3); }
.ft-code-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--brand); color: #1a1205; display: grid; place-items: center; }
.ft-code-ic .ic { width: 19px; height: 19px; }
.ft-code span { display: block; font-size: 12px; color: var(--muted); }
.ft-code b { font-size: 19px; font-weight: 800; letter-spacing: 3px; }
.ft-map-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ft-map-btn .ic { width: 18px; height: 18px; }
.ft-secondary { width: 100%; padding: 13px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r-md); font-size: 14.5px; font-weight: 700; font-family: inherit; cursor: pointer; }

.lang-row { display: flex; gap: 8px; margin-bottom: 12px; }
.lang-chip { flex: 1; padding: 10px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: .15s; }
.lang-chip.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
#cityLang { max-width: 280px; margin: 0 auto 16px; }
/* Поле поиска города (раньше класс .ef-input не имел стилей — браузерный дефолт) */
.ef-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); font-size: 15px; font-family: inherit; font-weight: 500; color: var(--ink); outline: none; transition: border-color .15s, background .15s; }
.ef-input::placeholder { color: var(--muted-2); font-weight: 400; }
.ef-input:focus { border-color: var(--brand); background: var(--card); }

.deliv-code { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff6d6, #fff); border: 1.5px solid var(--brand); border-radius: var(--r-md); padding: 12px 14px; }
.deliv-code.hidden { display: none !important; }
.deliv-code .dc-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--brand); color: #7c5a00; display: grid; place-items: center; }
.deliv-code .dc-ic .ic { width: 20px; height: 20px; }
.deliv-code .dc-txt span { display: block; font-size: 11px; color: #92711a; font-weight: 600; }
.deliv-code .dc-txt b { font-size: 24px; font-weight: 800; letter-spacing: 6px; font-variant-numeric: tabular-nums; }

.timeline { list-style: none; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 9px 0; opacity: 0.45; transition: opacity 0.3s; }
.timeline li.done, .timeline li.active { opacity: 1; }
.timeline li i { width: 22px; height: 22px; flex: none; border-radius: 50%; background: #f1f5f9; border: 2px solid var(--line); margin-top: 1px; display: grid; place-items: center; font-style: normal; font-size: 11px; position: relative; z-index: 1; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 32px; bottom: -10px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done i { background: var(--green); border-color: var(--green); }
.timeline li.done i::after { content: "✓"; color: #fff; font-weight: 800; }
.timeline li.active i { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 4px rgba(255,201,7,.25); }
.timeline li div b { display: block; font-size: 13.5px; }
.timeline li div span { font-size: 11.5px; color: var(--muted); }

.addr-recap { display: flex; flex-direction: column; gap: 7px; padding: 2px 4px; }
.ar-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.ar-row span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ar-dot.a, .ar-dot.pickup { background: var(--green); }
.ar-dot.b, .ar-dot.drop { background: var(--red); }

/* ============ Маркеры на карте ============ */
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 3px 10px rgba(15,23,42,.35); border: 2.5px solid #fff; }
.pin b { transform: rotate(45deg); color: #fff; font-size: 13px; font-weight: 800; }
/* Вариант точек «кружочки» (mapStyle.pointStyle = dots) */
.pdot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 7px rgba(15,23,42,.4); }
/* точка А-заведение: круглая метка с моделью ресторана/магазина */
.venue-pin { width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 2.5px solid #fff; box-shadow: 0 4px 14px rgba(15,23,42,.32); overflow: hidden; }
.venue-pin img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Курьер на карте — иллюстрация транспорта (премиум-маркер) */
.courier-wrap { position: relative; display: grid; place-items: center; width: 56px; height: 56px; }
/* мягкая тень на «земле» под маркером — даёт ощущение объёма */
.courier-wrap::after { content: ''; position: absolute; bottom: 2px; left: 50%; width: 24px; height: 7px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at center, rgba(15,23,42,.32), rgba(15,23,42,0) 72%); z-index: 0; }
/* два расходящихся кольца — «радар» движущегося курьера */
.courier-wrap .ring { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none; }
.courier-wrap .ring::before, .courier-wrap .ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,201,7,.6); animation: cping 2.2s cubic-bezier(.22,.61,.36,1) infinite; }
.courier-wrap .ring::after { animation-delay: 1.1s; }
.courier-wrap .em { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(157deg, #ffffff 0%, #eef1f7 100%);
  box-shadow: 0 7px 18px rgba(15,23,42,.28), 0 2px 5px rgba(15,23,42,.16), inset 0 0 0 2.5px var(--brand), inset 0 1.5px 2px rgba(255,255,255,.95);
  animation: mk-pop .42s cubic-bezier(.34,1.56,.64,1) both; }
.courier-wrap .em img { width: 40px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.2)); transition: transform .25s ease; }

/* Свободные курьеры рядом — лёгкая стеклянная «шайба» (без жёсткого бордера) */
.nearby-marker .nb { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #eef1f7 100%);
  box-shadow: 0 4px 11px rgba(15,23,42,.2), 0 1px 2.5px rgba(15,23,42,.14), inset 0 0 0 1.5px rgba(255,201,7,.55), inset 0 1px 2px rgba(255,255,255,.9);
  animation: mk-pop .4s cubic-bezier(.34,1.56,.64,1) both; }
.nearby-marker .nb img { width: 30px; height: 22px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.16)); }

/* 3D-модель курьера (вариант .model): крупный спрайт без «шайбы», радар-кольцо и тень на земле */
.courier-wrap.model { width: 72px; height: 72px; animation: mk-pop .42s cubic-bezier(.34,1.56,.64,1) both; }
.courier-wrap.model::after { bottom: 7px; width: 30px; height: 8px; }
.courier-wrap.model .ring { top: auto; bottom: 4px; left: 50%; width: 34px; height: 34px; margin: 0 0 0 -17px; }
.courier-wrap.model .em { width: 60px; height: 60px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.courier-wrap.model .em img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(15,23,42,.38)); transition: transform .25s ease; will-change: transform; }
/* модель в маркере «курьеры рядом» — спрайт без круглой подложки */
.nearby-marker .nb.model { background: none; box-shadow: none; border-radius: 0; overflow: visible; width: 44px; height: 44px; }
.nearby-marker .nb.model img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(15,23,42,.32)); }

/* === Анимация ДВИЖЕНИЯ: играет только при классе .moving (когда курьер реально едет/идёт) === */
/* пеший: качается + слегка подпрыгивает (живая ходьба) */
.courier-wrap.model.moving.veh-walk .em { animation: walk-bob .6s ease-in-out infinite; }
/* мопед/авто/груз: мелкая «вибрация двигателя» — езда */
.courier-wrap.model.moving.veh-moped .em,
.courier-wrap.model.moving.veh-car .em,
.courier-wrap.model.moving.veh-truck .em { animation: ride-bounce .5s ease-in-out infinite; }
/* СТОЯ: модель не «статуя» — спокойное живое покачивание (медленный walk-bob) */
.courier-wrap.model:not(.moving) .em { animation: walk-bob 1.9s ease-in-out infinite; }
/* «след шага/движения»: тень на земле пульсирует в такт */
.courier-wrap.model.moving::after { animation: ground-step .6s ease-in-out infinite; }
@keyframes walk-bob { 0% { transform: translateY(0) rotate(-2.6deg); } 50% { transform: translateY(-4px) rotate(2.6deg); } 100% { transform: translateY(0) rotate(-2.6deg); } }
@keyframes ride-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.8px); } }
@keyframes ground-step { 0%, 100% { opacity: .5; transform: translateX(-50%) scaleX(1); } 50% { opacity: .85; transform: translateX(-50%) scaleX(1.35); } }

/* появление маркера: мягкий «поп» из точки */
@keyframes mk-pop { 0% { transform: scale(0); opacity: 0; } 55% { transform: scale(1.14); opacity: 1; } 100% { transform: scale(1); } }
/* расходящееся кольцо-радар вокруг активного курьера/кандидата */
@keyframes cping { 0% { transform: scale(.5); opacity: .85; } 75% { opacity: 0; } 100% { transform: scale(2); opacity: 0; } }

/* ============ Тост ============ */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.94); color: #fff; padding: 12px 20px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 9999; max-width: 90vw; animation: toast-in 0.25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateX(-50%) translateY(10px); } }

/* ============ Модалка авторизации ============ */
.auth-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  overflow-y: auto;
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } }
.auth-card {
  position: relative; width: min(380px, 100%); max-width: 100%; margin: auto; flex: none;
  background: var(--card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 28px 24px 24px;
  display: flex; flex-direction: column; gap: 16px;
  animation: authpop 0.25s cubic-bezier(.2,.8,.2,1);
}
@keyframes authpop { from { opacity: 0; transform: translateY(16px) scale(.96); } }
.auth-close { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border: none; background: var(--field); border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.auth-close:hover { background: var(--line); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; margin-top: 6px; }
.auth-mark { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 6px 18px rgba(255,201,7,.4); }
.auth-title { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 21px; }
.auth-sub { font-size: 13.5px; color: var(--muted); max-width: 280px; }
.auth-step { display: flex; flex-direction: column; gap: 12px; }

.auth-field { display: flex; align-items: center; gap: 6px; background: var(--field); border: 1.5px solid transparent; border-radius: 12px; padding: 12px 14px; transition: border-color 0.15s, background 0.15s; }
.auth-field:focus-within { border-color: var(--ink); background: #fff; }
.auth-prefix { font-size: 16px; font-weight: 700; color: var(--ink); }
.auth-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: 0.5px; }
.auth-input::placeholder { color: var(--muted-2); font-weight: 400; letter-spacing: 0; }

.auth-cta { margin-top: 4px; }
.auth-note { font-size: 11.5px; color: var(--muted-2); text-align: center; line-height: 1.45; }

.auth-back { display: flex; align-items: center; gap: 6px; border: none; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px; align-self: flex-start; }
.auth-back:hover { color: var(--ink); }
.auth-back .ic { width: 15px; height: 15px; }

.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-box {
  width: 56px; height: 64px; text-align: center;
  font-size: 26px; font-weight: 800; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: 14px;
  outline: none; transition: 0.15s; font-variant-numeric: tabular-nums;
}
.otp-box:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(15,23,42,.08); }
.otp-box.filled { border-color: var(--brand); background: var(--brand-soft); }

.auth-dev { background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); text-align: center; }
.auth-dev b { font-size: 18px; letter-spacing: 3px; color: var(--ink); }
.auth-error { background: #fef2f2; border: 1px solid #fecdd3; color: #b91c1c; border-radius: 10px; padding: 10px 12px; font-size: 13px; text-align: center; }

/* ============ Адаптивность ============ */
@media (max-width: 720px) {
  .top-nav { display: none; }
  /* Нижняя навигация — как в нативном приложении: 5 РАВНЫХ вкладок (было 4 колонки на
     5 кнопок — «Профиль» уезжал на вторую строку), пилюля-подсветка активной, блюр-подложка,
     отклик на нажатие. Десктоп не затронут (весь блок внутри @media 720px). */
  .mob-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
    height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--card);
    background: color-mix(in srgb, var(--card) 90%, transparent);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(15,23,42,.08);
  }
  .mnav { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: none; color: var(--muted-2); font-size: 10px; font-weight: 700; font-family: inherit; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
  .mnav:active { transform: scale(.92); }
  .mnav::before { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 46px; height: 28px; border-radius: 999px; background: transparent; transition: background .18s; }
  .mnav .ic { width: 21px; height: 21px; }
  .mnav .ic-img { position: relative; z-index: 1; width: 24px; height: 24px; object-fit: contain; opacity: .5; transition: opacity .15s, transform .15s; }
  .mnav span { position: relative; z-index: 1; }
  .mnav.active { color: var(--ink); }
  .mnav.active::before { background: var(--brand-soft); }
  .mnav.active .ic { color: #b8860b; }
  .mnav.active .ic-img { opacity: 1; transform: translateY(-1px) scale(1.06); }
  #panel {
    top: auto; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); width: 100%;
    max-height: 62vh; border-radius: 22px 22px 0 0;
    padding: 10px 14px 14px;
  }
  /* шторка: плавное сворачивание/разворачивание (только в режиме карты, не на страницах) */
  body:not(.b-page) #panel { transition: transform .34s cubic-bezier(.32,.72,0,1); will-change: transform; }
  body.sheet-collapsed:not(.b-page) #panel { transform: translateY(calc(100% - 74px)); box-shadow: 0 -8px 28px rgba(15,23,42,.14); }
  body.sheet-collapsed:not(.b-page) .map-controls,
  body.sheet-collapsed:not(.b-page) .layers-menu { bottom: calc(60px + env(safe-area-inset-bottom) + 92px); transition: bottom .34s cubic-bezier(.32,.72,0,1); }
  /* режим «страница» на мобайле — на весь экран над нижней навигацией */
  body.b-page #panel {
    top: calc(8px + env(safe-area-inset-top)); transform: none; left: 0; right: 0; width: 100%;
    bottom: calc(60px + env(safe-area-inset-bottom)); max-height: none; border-radius: 0;
    background: var(--bg); padding: 14px;
  }
  .page-head h2, .mkt-h h2 { font-size: 21px; }
  .store-layout { grid-template-columns: 1fr; gap: 0; }
  .store-cart { display: none; }
  .store-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
  .store-menu { position: sticky; top: 0; z-index: 5; flex-direction: row; overflow-x: auto; gap: 8px; padding: 8px 0; margin-bottom: 4px; background: linear-gradient(var(--bg) 70%, transparent); scrollbar-width: none; }
  .store-menu::-webkit-scrollbar { display: none; }
  .store-menu .sm-item { flex: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; }
  .store-menu .sm-item.active { border-color: var(--ink); }
  .store-hero { height: 160px; }
  .store-hero-in h2 { font-size: 21px; }
  .ap-map-wrap { height: 260px; }
  .sheet-handle { display: block; position: relative; width: 44px; height: 5px; background: var(--muted-2); border-radius: 999px; margin: 2px auto 8px; flex: none; cursor: grab; touch-action: none; transition: background .15s, width .15s; }
  .sheet-handle::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 160px; height: 32px; }
  body.sheet-collapsed .sheet-handle { width: 56px; background: var(--brand); }
  .hint-pill { top: calc(12px + env(safe-area-inset-top)); font-size: 12.5px; }
  .map-controls { bottom: calc(62vh + 70px); }
  .layers-menu { bottom: calc(62vh + 70px); }
  .cart-fab { bottom: calc(60px + env(safe-area-inset-bottom) + 14px); width: calc(100vw - 28px); }
  .otp-box { width: 48px; height: 58px; font-size: 23px; }

  /* ============ УДОБСТВО НА ТЕЛЕФОНЕ (поведение, не дизайн) ============
     Размеры, цвета и раскладка НЕ меняются — правим только то, из-за чего
     страница ощущается сайтом, а не приложением. */

  /* 1. Поля ввода 16px: Safari на iPhone увеличивает страницу при фокусе, если
        шрифт мельче 16px. Раньше при каждом тапе в поле экран «прыгал», и его
        приходилось сводить пальцами обратно. Визуально текст почти не меняется. */
  input, textarea, select { font-size: 16px; }
  /* Поля-ячейки кода оставляем крупными, как были */
  .otp-box { font-size: 23px; }

  /* 2. Тап без серой вспышки и без задержки 300 мс (браузер больше не ждёт
        возможный двойной тап) — нажатия отзываются сразу, как в приложении. */
  button, a, label, .mnav, .tnav, [role="button"], [onclick] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* 3. Прокрутка как в приложении: инерция и «упор» — прокрутка внутри панели
        не утягивает за собой страницу и не вызывает случайный pull-to-refresh. */
  #panel, .sheet, .modal, .mkt-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* 4. Никакого случайного горизонтального сдвига: страница не «уезжает» вбок,
        если какой-то блок оказался чуть шире экрана. */
  html, body { overflow-x: hidden; max-width: 100%; }

  /* 5. Safari не меняет размер шрифтов при повороте телефона. */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }


  /* Поиск и категории «прилипают» к верху при прокрутке — как в приложении,
     где строка поиска всегда под рукой. */
  .mkt-search { position: sticky; top: 0; z-index: 6; padding: 11px 13px; border-radius: 15px; }
  .mkt-search input { font-size: 16px; }
  .chips { gap: 7px; padding: 2px 0 4px; }
  .chip { padding: 9px 15px; font-size: 13.5px; }
  .chips.mkt-switch .chip { padding: 10px 0; flex: 1; text-align: center; }
  /* В «Аптеке» переключателя Еда|Продукты нет — пустая полоса не должна
     оставлять лишний отступ над списком аптек. */
  .chips:empty { display: none; }

  /* Адрес доставки — крупнее и на всю ширину, чтобы легко попасть пальцем */
  .mkt-addr { padding: 12px 13px; border-radius: 15px; }
  .mkt-addr span { font-size: 14.5px; }

  /* Товары внутри заведения: две ровные колонки с читаемой ценой и кнопкой */
  .prod-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard { border-radius: 18px; }
  .pcard-price { font-size: 15.5px; padding: 10px 11px 2px; }
  .pcard-name { font-size: 12.5px; padding: 0 11px; }
  .pcard-act { padding: 9px 11px 11px; }
  .pcard-add { padding: 11px; font-size: 13.5px; border-radius: 12px; }
  .pcard-qty button { width: 34px; height: 32px; }

  /* Шапка заведения и меню разделов */
  .store-hero { height: 175px; border-radius: 18px; }
  .store-menu .sm-item { padding: 8px 14px; font-size: 13.5px; }

  /* Плавающая корзина: крупная кнопка над нижним меню, всегда читаемая */
  .cart-fab { padding: 14px 16px; border-radius: 16px; font-size: 15px; box-shadow: 0 10px 26px rgba(15,23,42,.20); }

  /* Баннеры акций — во всю ширину, без обрезанных краёв */
  .mkt-banners { gap: 10px; }
  .mkt-banner { border-radius: 18px; }


  /* «На карте» не должна попадать под круглую кнопку чата */
  .mkt-map-fab { bottom: calc(60px + env(safe-area-inset-bottom) + 16px); margin-right: 74px; margin-left: auto; }


  /* ===== ЗАКАЗЫ на телефоне — как orders_screen.dart =====
     Карточка: слева обложка заведения (или иконка типа), название и статус
     читаются целиком, сумма крупная, «Повторить» — нормальная кнопка. */
  .order-card { padding: 13px; border-radius: 18px; box-shadow: 0 4px 14px rgba(15,23,42,.06); }
  .order-card:active { transform: scale(.995); }
  .oc-head { gap: 12px; }
  .oc-ic { width: 52px; height: 52px; border-radius: 14px; }
  .oc-ti b { font-size: 15.5px; }
  .oc-ti span { font-size: 12px; }
  .oc-status { font-size: 11px; padding: 5px 9px; }
  .oc-route { margin: 12px 0 10px; gap: 7px; }
  .ocr { font-size: 13.5px; }
  .oc-foot b { font-size: 17px; }
  .oc-repeat { padding: 10px 16px; font-size: 13.5px; border-radius: 12px; }
  /* фильтры Все | Курьер | Покупки — крупнее под палец */
  #ordFilters .chip { padding: 9px 14px; font-size: 13.5px; }


  /* ===== Список заказов ===== */
  .order-grid { grid-template-columns: 1fr; gap: 12px; }
  #screenOrders .page-head h2 { font-size: 22px; }
  #screenOrders .page-head span { font-size: 12.5px; }


}
@media (max-width: 380px) {
  .tariffs { gap: 6px; }
  .t-img { height: 38px; }
  .otp-box { width: 44px; height: 54px; }
}
@media (max-width: 360px) {
  /* Узкий телефон (320-360px): чуть больше полезной ширины и компактнее
     карточки — на 320px раньше всё жалось и текст переносился по слогам. */
  body.b-page #panel { padding: 11px; }
  #panel { padding: 10px 11px 12px; }
  .page-head h2, .mkt-h h2 { font-size: 19px; }
  /* витрина магазинов: те же 2 колонки, но с меньшим зазором */
  /* карточки заведений идут в одну колонку — зазор вертикальный, не сжимаем */
  .store-grid { gap: 13px; }
  .store-card h3, .store-card .sc-name { font-size: 13.5px; }
  .store-card .sc-meta, .store-card small { font-size: 11px; }
  /* товары: колонка уже, чтобы помещалось два столбца без сжатия текста */
  /* ровно две колонки товаров: три на 320px были бы нечитаемо мелкими */
  .prod-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .prod-card b, .prod-card .p-name { font-size: 12.5px; }
  .prod-card .p-price { font-size: 13px; }
  /* нижняя корзина и кнопки — во всю доступную ширину */
  .cart-fab { width: calc(100vw - 22px); }
  .btn, .btn-lg { padding-left: 14px; padding-right: 14px; }
  /* карточка заведения */
  .store-hero { height: 140px; }
  .store-hero-in h2 { font-size: 19px; }
  .store-menu .sm-item { padding: 6px 11px; font-size: 12.5px; }
}

/* ============ Маркетплейс «Еда и продукты» ============ */
.mode-switch { display: flex; gap: 6px; background: var(--field); padding: 4px; border-radius: 14px; }
.mode-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; border: none; background: none; padding: 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: 0.12s; }
.mode-tab .ic { width: 17px; height: 17px; }
.mode-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

#screenMarket { gap: 12px; }
.mkt-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 15px; box-shadow: var(--shadow-sm); transition: border-color 0.15s; }
.mkt-search:focus-within { border-color: var(--ink); }
.mkt-search .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mkt-search input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14.5px; color: var(--ink); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: 0.12s; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
/* переключатель «Еда | Продукты» (раздел «Еда и продукты») */
.chips.mkt-switch { display: inline-flex; gap: 4px; overflow: visible; background: var(--field); border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.chips.mkt-switch .chip { flex: none; border: none; background: transparent; border-radius: 10px; padding: 9px 24px; color: var(--ink-2); font-weight: 700; }
.chips.mkt-switch .chip.active { background: var(--card); color: var(--ink); border-color: transparent; box-shadow: var(--shadow-sm); }

.store-list { display: flex; flex-direction: column; gap: 10px; }
.store-card { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; cursor: pointer; transition: 0.12s; box-shadow: var(--shadow-sm); }
.store-card:hover { border-color: var(--muted-2); transform: translateY(-1px); }
.store-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.store-ic .ic { width: 24px; height: 24px; }
.store-ic.food { background: #fef3c7; color: #d97706; }
.store-ic.grocery { background: #dcfce7; color: #16a34a; }
.store-ic.pharmacy { background: #dbeafe; color: #2563eb; }
.store-info { flex: 1; min-width: 0; }
.store-info b { display: block; font-size: 14.5px; }
.store-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.store-meta .rt { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-weight: 600; }
.store-meta .rt .ic { width: 12px; height: 12px; color: #f59e0b; }

.mkt-back { display: flex; align-items: center; gap: 7px; border: none; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; padding: 2px; align-self: flex-start; }
.mkt-back:hover { color: var(--ink); }
.mkt-back .ic { width: 16px; height: 16px; }
.store-head { display: flex; gap: 12px; align-items: center; padding: 4px 2px; }
.store-head h2 { font-size: 18px; }

.prod-cat { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin: 8px 2px 2px; }
.prod-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #f1f5f9; }
.prod-info { flex: 1; min-width: 0; }
.prod-info b { display: block; font-size: 14px; font-weight: 600; }
.prod-info span { font-size: 13px; color: var(--ink-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); display: grid; place-items: center; }
.qty button.add { background: var(--brand); border-color: var(--brand); }
.qty button .ic { width: 16px; height: 16px; }
.qty b { min-width: 18px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

.cart-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border: none; border-radius: 16px; padding: 14px 20px; font-size: 14.5px; font-weight: 700; box-shadow: var(--shadow-lg); width: min(520px, calc(100vw - 32px)); }
.cart-fab .ic { width: 19px; height: 19px; }
.cart-fab-count { background: var(--brand); color: var(--ink); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.cart-fab-spacer { flex: 1; }
.cart-fab-sum { font-variant-numeric: tabular-nums; }

/* Плавающая кнопка поддержки (раздел «Еда»/«Заказы») */
.sup-fab { position: fixed; right: 24px; bottom: 26px; z-index: 72; width: 56px; height: 56px; border: none; border-radius: 50%; background: var(--brand); box-shadow: 0 12px 28px rgba(180,130,0,.45); cursor: pointer; display: grid; place-items: center; transition: transform .15s; animation: supBob 4s ease-in-out infinite; }
.sup-fab::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); animation: supPing 2.6s cubic-bezier(.22,.61,.36,1) infinite; pointer-events: none; }
.sup-fab:hover { transform: scale(1.07); animation-play-state: paused; }
.sup-fab:active { transform: scale(.92); }
.sup-fab svg { width: 26px; height: 26px; position: relative; z-index: 1; }
.sup-fab .sup-fab-dot { position: absolute; top: 5px; right: 5px; width: 12px; height: 12px; border-radius: 50%; background: #16c172; border: 2.5px solid #fff; z-index: 2; }
@keyframes supPing { 0% { transform: scale(1); opacity: .6; } 70% { opacity: 0; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes supBob { 0%,90%,100% { transform: translateY(0); } 94% { transform: translateY(-6px); } 97% { transform: translateY(-2px); } }
@media (max-width: 720px) { .sup-fab { right: 16px; bottom: calc(60px + env(safe-area-inset-bottom) + 84px); } }

.cart-store { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; margin-bottom: 10px; }
.cart-store-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; margin-bottom: 8px; }
.cart-store-h .ic { width: 15px; height: 15px; color: var(--muted); }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.cart-item .ci-name { flex: 1; min-width: 0; font-size: 13.5px; }
.cart-item .ci-price { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-warn { font-size: 12px; color: var(--red); margin-top: 6px; }
.cart-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; padding: 6px 2px; }
.cart-total b { font-variant-numeric: tabular-nums; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 12px; font-size: 14px; }

.co-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.co-section .sec-label { margin: 0 0 8px; }
.split-note { background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); }

/* ===== Оформление заказа (Еда): узкая колонка по центру ===== */
.checkout-wrap { max-width: 600px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.co-section .pay-methods { gap: 8px; }
.co-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.co-toggle input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.co-recip { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.co-recip.hidden { display: none; }
.co-recip input { width: 100%; border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; padding: 11px 13px; font-size: 14px; outline: none; }
.co-recip input:focus { border-color: var(--ink); background: #fff; }
.co-hint { font-size: 12px; color: var(--muted); }
.co-section .promo-row { margin: 0; }

/* ============ Поиск курьера (dispatch) ============ */
.search-box { display: flex; align-items: center; gap: 16px; }
.search-box.hidden { display: none !important; }
.radar { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; }
.radar .rw { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: radar 1.8s ease-out infinite; }
.radar .rw:nth-child(2) { animation-delay: 0.6s; }
.radar .rw:nth-child(3) { animation-delay: 1.2s; }
@keyframes radar { 0% { transform: scale(0.25); opacity: 0.85; } 100% { transform: scale(1); opacity: 0; } }
.radar-core { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; color: var(--ink); box-shadow: 0 3px 10px rgba(255,201,7,.5); }
.radar-core .ic { width: 17px; height: 17px; }
.search-text { min-width: 0; }
.search-text b { display: block; font-size: 14.5px; }
.search-text span { font-size: 12px; color: var(--muted); }

/* Радар на карте (в точке А) */
.map-radar { pointer-events: none; }
.map-radar .mr { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; border: 2px solid rgba(255,201,7,.9); animation: mapradar 2.2s ease-out infinite; }
.map-radar .mr:nth-child(2) { animation-delay: 0.7s; }
.map-radar .mr:nth-child(3) { animation-delay: 1.4s; }
@keyframes mapradar { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(6); opacity: 0; } }

/* Кандидат-курьер, которому предлагают заказ (премиум) */
.cand-marker .cand { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.cand-marker .cand::after { content: ''; position: absolute; bottom: 1px; left: 50%; width: 22px; height: 6px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse at center, rgba(15,23,42,.3), rgba(15,23,42,0) 72%); }
.cand-marker .cand .ring { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; pointer-events: none; }
.cand-marker .cand .ring::before, .cand-marker .cand .ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,201,7,.7); animation: cping 1.6s cubic-bezier(.22,.61,.36,1) infinite; }
.cand-marker .cand .ring::after { animation-delay: .8s; }
.cand-marker .cand .em { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(157deg, #ffffff 0%, #eef1f7 100%);
  box-shadow: 0 7px 18px rgba(255,201,7,.45), 0 2px 6px rgba(15,23,42,.18), inset 0 0 0 2.5px var(--brand), inset 0 1.5px 2px rgba(255,255,255,.95);
  animation: mk-pop .42s cubic-bezier(.34,1.56,.64,1) both; }
.cand-marker .cand .em img { width: 40px; height: 28px; object-fit: contain; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.2)); }

/* Живые свободные курьеры — позицию двигает requestAnimationFrame */
.nearby-marker { transition: none; }
.nearby-marker img { transition: transform 0.3s ease; }

/* Кнопка отмены заказа */
.btn-cancel { width: 100%; padding: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--red); border-radius: var(--r-md); font-size: 14.5px; font-weight: 700; transition: 0.12s; }
.btn-cancel:hover { background: #fef2f2; border-color: var(--red); }
.btn-cancel.hidden { display: none !important; }

/* ============ Автодополнение: подсветка совпадения ============ */
.sitem mark { background: var(--brand-soft); color: var(--ink); font-weight: 800; border-radius: 3px; padding: 0 1px; }
.sitem.gps .si-ic { background: var(--brand-soft); color: var(--ink); }

/* ============ Профиль ============ */
.profile-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; }
.profile-av { width: 54px; height: 54px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--ink); flex: none; }
.profile-av .ic { width: 26px; height: 26px; }
.profile-head b { display: block; font-size: 17px; }
.profile-head span { font-size: 13px; color: var(--muted); }
.pm-title { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin: 4px 0; }
.profile-orders { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; }
.po-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--field); border-radius: 12px; padding: 10px 12px; }
.po-item .po-l b { font-size: 13.5px; display: block; }
.po-item .po-l span { font-size: 11.5px; color: var(--muted); }
.po-item .po-r { text-align: right; }
.po-item .po-r b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.po-item .po-r span { font-size: 11px; display: block; }
.po-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 18px; }

/* ============ Город ============ */
.city-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city-item { display: flex; align-items: center; gap: 9px; padding: 13px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md); font-size: 14px; font-weight: 600; color: var(--ink); transition: .12s; }
.city-item:hover { border-color: var(--muted-2); }
.city-item.active { border-color: var(--ink); background: var(--brand-soft); }
.city-item .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }

/* ============ Карточка курьера ============ */
.courier-card { display: flex; align-items: center; gap: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.courier-card.hidden { display: none !important; }
.cc-avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.cc-info { flex: 1; min-width: 0; }
.cc-info b { display: block; font-size: 14.5px; }
.cc-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 2px; flex-wrap: wrap; }
.cc-rating { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-2); font-weight: 700; }
.cc-rating .ic { width: 13px; height: 13px; color: #f59e0b; }
.cc-veh { width: 48px; height: 34px; object-fit: contain; flex: none; }
/* Кнопка чата с курьером + панель чата */
.cc-chat { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--brand-soft); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; }
.cc-chat .ic { width: 19px; height: 19px; color: var(--ink); }
.cc-call { text-decoration: none; background: #dcfce7; border-color: #bbf7d0; }
.cc-call .ic { color: #15803d; }
.cc-call:active { transform: scale(.95); }
.cc-chat-badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.oc-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); display: flex; flex-direction: column; justify-content: flex-end; }
.oc-backdrop.hidden { display: none !important; }
.oc-sheet { background: var(--bg); border-radius: 22px 22px 0 0; height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.oc-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.oc-close { width: 34px; height: 34px; border: none; background: var(--field); border-radius: 50%; font-size: 16px; color: var(--ink-2); cursor: pointer; }
.oc-head-t b { display: block; font-size: 15px; } .oc-head-t span { font-size: 12px; color: var(--muted); }
.oc-body { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.oc-msg { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.35; word-break: break-word; }
.oc-msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.oc-msg.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.oc-input { display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.oc-input input { flex: 1; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14px; color: var(--ink); }
.oc-send { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--brand); display: grid; place-items: center; border: none; cursor: pointer; box-shadow: 0 3px 9px rgba(255,201,7,.4); }
.oc-send .ic { width: 20px; height: 20px; color: #1a1205; } /* жёлтая кнопка, чёрная иконка */
.oc-send:active { transform: scale(.94); }
.oc-attach { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; }
.oc-attach .ic { width: 20px; height: 20px; color: var(--ink-2); }
.oc-attach:active { transform: scale(.94); }
.oc-call { margin-left: auto; width: 40px; height: 40px; flex: none; border-radius: 50%; background: #dcfce7; border: 1px solid #bbf7d0; display: grid; place-items: center; text-decoration: none; }
.oc-call .ic { width: 18px; height: 18px; color: #15803d; }
.oc-msg img { display: block; max-width: 200px; width: 100%; border-radius: 10px; cursor: zoom-in; }
.oc-msg.has-img { padding: 4px; background: none; border: none; }

/* ============ Оплата ============ */
.pay-card.hidden { display: none !important; }
/* Грузчики (тариф «Грузовик») */
.movers-card { padding: 16px; }
.movers-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.movers-ic { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; overflow: hidden; }
.movers-ic .ic { width: 22px; height: 22px; color: var(--ink); }
.movers-ic .movers-img { width: 40px; height: 40px; object-fit: contain; display: block; }
.movers-h b { font-size: 15px; font-weight: 800; display: block; }
.movers-h span { font-size: 12.5px; color: var(--muted); }
.movers-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.movers-step { display: flex; align-items: center; gap: 14px; }
.movers-step button { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--ink); }
.movers-step button:disabled { opacity: .4; }
.movers-step button .ic { width: 18px; height: 18px; }
.movers-step b { font-size: 20px; font-weight: 800; min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.movers-price { font-size: 14px; font-weight: 700; color: var(--ink-2); }

/* Время доставки (предзаказ) */
.when-tabs { display: flex; gap: 8px; }
.when-tab { flex: 1; padding: 12px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--muted); font-family: inherit; cursor: pointer; transition: .12s; }
.when-tab.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
.when-input { width: 100%; margin-top: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 13px; font-family: inherit; font-size: 14.5px; background: var(--field); color: var(--ink); }
.when-input:focus { outline: none; border-color: var(--ink); background: #fff; }
.when-hint { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
/* промокод */
.promo-card { padding: 14px 16px; }
.promo-row { display: flex; gap: 8px; }
.promo-input { flex: 1; min-width: 0; border: 1.5px solid var(--line, #E6E2D7); border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; outline: none; background: #fff; }
.promo-input:focus { border-color: var(--brand, #FFC81A); box-shadow: 0 0 0 3px rgba(255,200,26,.3); }
.promo-apply { flex: none; border: none; border-radius: 12px; padding: 0 18px; font-weight: 800; font-size: 13.5px; background: var(--ink, #1A1814); color: #fff; }
.promo-apply:active { transform: scale(.98); }
.promo-hint { margin-top: 8px; font-size: 12.5px; font-weight: 700; min-height: 0; }
.promo-hint.ok { color: #15803D; }
.promo-hint.err { color: #C2241B; }
.pay-hint { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--field); border-radius: 10px; padding: 9px 12px; }
.pay-methods { display: flex; flex-direction: column; gap: 8px; }
.pay-m { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink); text-align: left; }
.pay-m .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.pay-m.active { border-color: var(--ink); background: var(--brand-soft); }
.pay-m.active .ic { color: #b8860b; }
/* «другой способ оплаты» — раскрывающийся блок (когда привязана карта) */
.pay-more { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border: 1.5px dashed var(--line); background: transparent; color: var(--muted); border-radius: 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pay-more:hover { border-color: var(--ink-2); color: var(--ink-2); }
.pay-more-arrow { font-size: 11px; }
.pay-more-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bonus-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13.5px; cursor: pointer; }
.bonus-row.hidden { display: none !important; }
.bonus-row input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.bonus-row b { font-weight: 800; }
.bonus-row small { color: var(--muted); }
.escrow-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; background: var(--brand-soft); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #92711a; }
.escrow-note.hidden { display: none !important; }
.escrow-note .ic { width: 16px; height: 16px; flex: none; color: #b8860b; margin-top: 1px; }

/* ============ Лояльность / реферал (профиль) ============ */
.loyalty-card { background: linear-gradient(135deg, #0f172a, #1e293b); color: #fff; border-radius: var(--r-md); padding: 16px; margin-bottom: 10px; }
.loyalty-card .lc-top { display: flex; align-items: center; justify-content: space-between; }
.loyalty-card .lc-top span { font-size: 12.5px; color: #cbd5e1; }
.loyalty-card .lc-top b { font-family: "Unbounded", sans-serif; font-size: 22px; font-variant-numeric: tabular-nums; }
.loyalty-card .lc-note { font-size: 12px; color: var(--brand); margin-top: 4px; font-weight: 600; }
.referral-card { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin-bottom: 14px; }
.referral-card .rc-ic { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--brand-soft); color: #b8860b; display: grid; place-items: center; }
.referral-card .rc-ic .ic { width: 22px; height: 22px; }
.referral-card .rc-body { flex: 1; min-width: 0; }
.referral-card .rc-body b { display: block; font-size: 14px; }
.referral-card .rc-body span { font-size: 12px; color: var(--muted); }
.rc-code { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.rc-code i { font-style: normal; font-size: 11px; color: var(--muted); }
.rc-code b { font-family: "Unbounded", sans-serif; font-size: 15px; letter-spacing: 1px; }
.rc-share { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 7px 12px; border: none; border-radius: 10px; background: var(--brand); color: var(--ink); font-size: 12.5px; font-weight: 700; }
.rc-share .ic { width: 14px; height: 14px; }
/* Прогресс к реферальной награде — только НОВЫЕ селекторы, десктопные правила выше не тронуты. */
.referral-card .rc-prog { margin-top: 9px; }
.referral-card .rc-prog-bar { height: 6px; border-radius: 999px; background: var(--field); overflow: hidden; }
.referral-card .rc-prog-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brand); transition: width .35s ease; }
.referral-card .rc-prog.done .rc-prog-bar i { background: #22c55e; }
.referral-card .rc-prog-txt { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }

/* ============ Адресная книга (профиль) ============ */
.addr-list { display: flex; flex-direction: column; gap: 8px; }
.addr-item { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.addr-item .ai-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--field); color: var(--ink-2); display: grid; place-items: center; }
.addr-item .ai-ic .ic { width: 18px; height: 18px; }
.addr-item .ai-t { flex: 1; min-width: 0; }
.addr-item .ai-t b { display: block; font-size: 13.5px; }
.addr-item .ai-t span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.addr-item .ai-del { border: none; background: none; color: var(--muted-2); padding: 6px; }
.addr-item .ai-del .ic { width: 17px; height: 17px; }
.addr-add { margin-top: 8px; }
.addr-field { position: relative; display: flex; align-items: center; gap: 8px; background: var(--field); border: 1.5px solid transparent; border-radius: 12px; padding: 11px 13px; }
.addr-field:focus-within { border-color: var(--ink); background: #fff; }
.addr-field .ic { width: 17px; height: 17px; color: var(--muted); flex: none; }
.addr-field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14px; }
.addr-field .suggest { top: calc(100% + 4px); left: 0; right: 0; }
.addr-labels { display: flex; gap: 8px; margin-top: 8px; }
.addr-labels button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.addr-labels button .ic { width: 15px; height: 15px; }

/* голосовой ввод */
.ibtn.mic.listening { color: var(--red); animation: micpulse 1s infinite; }
@keyframes micpulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.sitem.saved .si-ic { color: #b8860b; }

/* ============ Маркетплейс «Еда» — витрина по дизайну ============ */
.mkt-addr { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 14px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer; }
.mkt-addr .ic { width: 17px; height: 17px; color: #b8860b; flex: none; }
.mkt-addr span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-addr i { font-style: normal; color: var(--muted-2); }

/* категория-тинты для обложек */
.cat-food { --tint: #fef3c7; --tint2: #fde68a; --on: #d97706; }
.cat-grocery { --tint: #dcfce7; --tint2: #bbf7d0; --on: #16a34a; }
.cat-pharmacy { --tint: #dbeafe; --tint2: #bfdbfe; --on: #2563eb; }

.store-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: .12s; }
.sc:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sc-cover { position: relative; height: 92px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--tint), var(--tint2));
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 10px, rgba(255,255,255,0) 10px 20px), linear-gradient(135deg, var(--tint), var(--tint2)); }
.sc-wm { width: 40px; height: 40px; color: var(--on); opacity: .55; }
.sc-promo { position: absolute; top: 8px; left: 8px; background: var(--brand); color: var(--ink); font-size: 10.5px; font-weight: 800; padding: 4px 8px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.sc-promo.big { top: 12px; left: 12px; font-size: 12px; padding: 6px 11px; }
.sc-prep { position: absolute; bottom: 8px; left: 8px; background: rgba(15,23,42,.82); color: #fff; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.sc-body { padding: 10px 11px 12px; }
.sc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.sc-top b { font-size: 14px; line-height: 1.25; }
.sc-rt { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 800; flex: none; }
.sc-rt .ic { width: 13px; height: 13px; color: #f59e0b; }
.sc-rt small { color: var(--muted); font-weight: 600; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* поиск (строки товаров) */
.store-list { display: flex; flex-direction: column; gap: 8px; }
.srow { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; }
.srow-img { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--tint), var(--tint2)); }
.srow-img .ic { width: 20px; height: 20px; color: var(--on); }
.srow-info { flex: 1; min-width: 0; }
.srow-info b { display: block; font-size: 13.5px; }
.srow-info span { font-size: 11.5px; color: var(--muted); }
.srow-price { font-size: 13.5px; font-weight: 800; }

/* страница магазина */
.store-cover { position: relative; height: 120px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 12px, rgba(255,255,255,0) 12px 24px), linear-gradient(135deg, var(--tint), var(--tint2)); }
.store-cover .sc-wm { width: 56px; height: 56px; }
.store-card2 { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.sc2-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc2-top h2 { font-size: 18px; font-weight: 800; }
.sc2-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sc2-chips span { background: var(--field); border-radius: 999px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }

/* липкие чипы разделов */
.sec-chips { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; margin-bottom: 4px; background: linear-gradient(var(--bg) 70%, transparent); scrollbar-width: none; }
.sec-chips::-webkit-scrollbar { display: none; }
.sec-chip { flex: none; padding: 7px 13px; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sec-chip.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }

/* сетка товаров */
.prod-cat { font-size: 15px; font-weight: 800; margin: 14px 2px 8px; }
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.pc-img { position: relative; height: 82px; display: grid; place-items: center;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.25) 0 9px, rgba(255,255,255,0) 9px 18px), linear-gradient(135deg, var(--tint), var(--tint2)); }
.pc-img .sc-wm { width: 32px; height: 32px; }
.pc-disc { position: absolute; top: 7px; left: 7px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 999px; }
.pc-name { font-size: 13px; font-weight: 600; line-height: 1.3; padding: 9px 10px 6px; flex: 1; }
.pc-bottom { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px 10px; }
.pc-price { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-price s { color: var(--muted-2); font-weight: 600; font-size: 11.5px; margin-left: 3px; }

/* степпер количества */
.qty { display: flex; align-items: center; gap: 6px; flex: none; }
.qty button { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; }
.qty button.add { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.qty button .ic { width: 16px; height: 16px; }
.qty b { min-width: 16px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

/* промокод */
.promo-row { display: flex; gap: 8px; margin: 12px 0 6px; }
.promo-row input { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; padding: 11px 13px; font-size: 14px; outline: none; }
.promo-row input:focus { border-color: var(--ink); background: #fff; }
.promo-row button { padding: 0 18px; border: none; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; }
.promo-ok { font-size: 12.5px; color: var(--green); font-weight: 700; margin-bottom: 8px; }

/* ============ Профиль: аватар, редактирование, тема ============ */
.profile-av { overflow: hidden; }
.profile-av img { width: 100%; height: 100%; object-fit: cover; }
.profile-av.initials { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 18px; color: #b8860b; background: var(--brand-soft); }
.profile-av.big.initials { font-size: 26px; }
.ph-info { flex: 1; min-width: 0; }
.ph-edit { width: 38px; height: 38px; flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 11px; display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.ph-edit:hover { border-color: var(--ink); color: var(--ink); }
.ph-edit .ic { width: 17px; height: 17px; }
/* редактирование профиля */
.edit-card { width: min(420px, 94vw); }
.edit-av { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 6px; }
.edit-av .profile-av.big { width: 88px; height: 88px; }
.edit-av .profile-av.big .ic { width: 40px; height: 40px; }
.efield { display: flex; flex-direction: column; gap: 6px; }
.efield label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.efield input { border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; padding: 13px 14px; font-size: 15px; font-family: inherit; outline: none; }
.efield input:focus { border-color: var(--ink); background: var(--card); }
/* переключатель темы */
.theme-row { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; }
.theme-row .tr-l { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.theme-row .tr-l .ic { width: 18px; height: 18px; color: var(--ink-2); }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }

/* ============ Способы оплаты (профиль) ============ */
.pay-list { display: flex; flex-direction: column; gap: 8px; }
.pay-item { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.pay-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--field); color: var(--ink-2); display: grid; place-items: center; }
.pay-ic .ic { width: 20px; height: 20px; }
.pay-t { flex: 1; min-width: 0; }
.pay-t b { display: block; font-size: 14px; }
.pay-t span { font-size: 12px; color: var(--muted); }
.pay-badge { background: var(--brand-soft); color: #92711a; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pay-add { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 14px; border: 1.5px dashed var(--line); background: var(--card); border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--blue); }
.pay-add .ic { width: 17px; height: 17px; }

/* ============ Карточка товара (модалка) ============ */
.pcard-weight { font-size: 11.5px; color: var(--muted); padding: 0 12px 2px; }
.prod-modal { width: min(420px, 94vw); }
.prod-modal .auth-close { background: rgba(255,255,255,.92); border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.28); color: #1a1a1a; z-index: 3; }
.prodm-img { height: 230px; margin: -28px -24px 14px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: linear-gradient(135deg, var(--tint, #fef3c7), var(--tint2, #fde68a)); }
.prodm-img img { width: 100%; height: 100%; object-fit: cover; }
.prodm-price { font-size: 24px; font-weight: 800; margin-top: 14px; font-variant-numeric: tabular-nums; }
.prodm-price s { color: var(--muted-2); font-weight: 600; font-size: 15px; margin-left: 6px; }
.prodm-name { font-size: 17px; font-weight: 700; margin-top: 4px; }
.prodm-weight { font-size: 13px; color: var(--muted); margin-top: 4px; }
.prodm-act { margin-top: 16px; }
.prodm-qty { display: flex; align-items: center; justify-content: space-between; background: var(--brand-soft); border-radius: 14px; padding: 6px; }
.prodm-qty button { width: 52px; height: 46px; border: none; background: #fff; border-radius: 11px; display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow-sm); }
.prodm-qty button .ic { width: 18px; height: 18px; }
.prodm-qty b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ============ Тёмная тема (клиент) ============ */
[data-theme="dark"] {
  --brand-soft: rgba(255,201,7,.16);
  --ink: #e7ecf5; --ink-2: #b9c4da; --muted: #8b99b5; --muted-2: #5d6b87;
  --bg: #0b1220; --field: #1a2440; --card: #111a2e; --line: #233052;
  --shadow-lg: 0 18px 50px rgba(0,0,0,.55); --shadow-md: 0 10px 26px rgba(0,0,0,.45); --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --sk-base: #1a2440; --sk-hi: #2a3a63;
}
[data-theme="dark"] #map { background: #0b1220; }
[data-theme="dark"] #panel { background: rgba(17,26,46,.92); }
[data-theme="dark"] body.b-page { background: var(--bg); }
/* белые фоны → тёмные поверхности */
[data-theme="dark"] .mkt-search, [data-theme="dark"] .pcard-qty button, [data-theme="dark"] .cit-q button, [data-theme="dark"] .qty button { background: var(--card); }
[data-theme="dark"] .pr-field:focus-within, [data-theme="dark"] .recip-inputs .ri:focus-within, [data-theme="dark"] .fwrap:focus-within, [data-theme="dark"] .addr-field:focus-within, [data-theme="dark"] .auth-field:focus-within, [data-theme="dark"] .rate-review:focus, [data-theme="dark"] .promo-row input:focus, [data-theme="dark"] .co-recip input:focus, [data-theme="dark"] .otp-box:focus, [data-theme="dark"] .efield input:focus { background: var(--field); }
[data-theme="dark"] .online-pill, [data-theme="dark"] .courier-chip, [data-theme="dark"] .courier-card { background: var(--field); }
[data-theme="dark"] .recip-tab.active, [data-theme="dark"] .mode-tab.active { background: var(--card); color: var(--ink); }
/* жёлтые/тёмные CTA */
[data-theme="dark"] .cta { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .cta:hover:not(:disabled) { background: #ffd633; }
[data-theme="dark"] .cta:disabled { background: #2a3550; color: #6b7794; }
[data-theme="dark"] .chip.active { background: var(--brand); color: #0f172a; border-color: var(--brand); }
[data-theme="dark"] .cart-fab, [data-theme="dark"] .promo-row button { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .cc-avatar { background: var(--brand); color: #0f172a; }
[data-theme="dark"] .pcard-add { background: var(--field); }
[data-theme="dark"] .prodm-qty button { background: var(--card); }
[data-theme="dark"] .pcard-add:hover { background: var(--brand-soft); }
/* мягкие плашки */
[data-theme="dark"] .auth-error, [data-theme="dark"] .btn-cancel:hover { background: rgba(244,63,94,.14); border-color: rgba(244,63,94,.4); color: #fda4af; }
[data-theme="dark"] .rc-badge.free, [data-theme="dark"] .oc-status.delivered, [data-theme="dark"] .oc-ic.food { background: rgba(16,185,129,.16); color: #6ee7b7; }
[data-theme="dark"] .oc-status.cancelled { background: rgba(244,63,94,.16); color: #fda4af; }
[data-theme="dark"] .mbtn:hover { background: var(--field); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(17,26,46,.8) !important; color: #8b99b5 !important; }
[data-theme="dark"] .leaflet-control-attribution a { color: #b9c4da !important; }

/* ===== Профиль/Заказы — раскладка по новому шаблону TezkorApp ===== */
@media (min-width: 721px) { body.b-page:not(.b-food) #panel { width: min(1080px, 94vw); } }

/* Заказы: шапка со статистикой + сетка карточек */
.ord-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.ord-stats { display: flex; gap: 10px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 18px; min-width: 104px; box-shadow: var(--shadow-sm); }
.stat-tile span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.stat-tile b { display: block; font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 17px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.order-grid .po-empty { grid-column: 1 / -1; }

/* Профиль: аккуратная одна колонка по центру (десктоп и мобайл) */
#screenProfile { max-width: 640px; margin: 0 auto; width: 100%; }
.prof-top { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.prof-usercard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; }
.prof-usercard .profile-head { margin: 0; width: 100%; }
.prof-top .loyalty-card { margin-bottom: 0; display: flex; flex-direction: column; }
.lc-spend { align-self: stretch; border: none; border-radius: 12px; background: var(--brand); color: var(--ink); font-size: 13.5px; font-weight: 700; padding: 11px; cursor: pointer; margin-top: 14px; }
.lc-spend:active { transform: scale(.98); }
.ph-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: var(--field); border-radius: 999px; padding: 4px 11px; font-size: 10.5px; font-weight: 700; color: var(--ink-2); width: fit-content; }
.ph-status i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.prof-cols { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.prof-col { display: flex; flex-direction: column; min-width: 0; }
.prof-top { min-width: 0; }
.prof-top > * { min-width: 0; }
.prof-col .pm-title:first-child { margin-top: 0; }
.prof-col .referral-card { margin-bottom: 4px; }
#profileLogout { margin-top: 16px; }

/* Реферал — жёлтая карточка как в шаблоне */
.referral-card { background: #fffaf0; border-color: #ffe28a; }
[data-theme="dark"] .referral-card { background: #2a2410; border-color: #5a4a16; }

@media (max-width: 720px) {
  .prof-top, .prof-cols { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .ord-stats { width: 100%; }
  .stat-tile { flex: 1; min-width: 0; }
}

/* ===== Профиль: модалки адреса/карты/бонусов + способы оплаты ===== */
.addr-labels button.active { border-color: var(--ink); background: var(--brand-soft); color: var(--ink); }
.addr-field.modal { position: relative; display: flex; align-items: center; gap: 9px; background: var(--field); border: 1.5px solid transparent; border-radius: 12px; padding: 10px 12px; }
.addr-field.modal:focus-within { border-color: var(--ink); background: var(--card); }
.addr-field.modal .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.addr-field.modal input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14.5px; color: var(--ink); }
.addr-field.modal .suggest { top: calc(100% + 6px); left: 0; right: 0; }
.efield-row { display: flex; gap: 10px; }
.efield-row .efield { flex: 1; min-width: 0; }
.efield-row .efield input { width: 100%; box-sizing: border-box; }

/* способы оплаты — кнопки в строке карты */
.pay-setdef { border: 1.5px solid var(--line); background: var(--card); border-radius: 9px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); flex: none; }
.pay-setdef:hover { border-color: var(--ink); color: var(--ink); }
.pay-del { border: none; background: none; color: var(--muted-2); padding: 6px; flex: none; }
.pay-del .ic { width: 16px; height: 16px; }

/* превью карты в модалке */
.card-preview { position: relative; height: 150px; border-radius: 16px; background: linear-gradient(135deg, #1e293b, #0f172a); color: #fff; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 14px; box-shadow: var(--shadow-md); }
.card-preview .cp-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f5d57a, #d4a017); }
.card-preview .cp-num { font-size: 18px; font-weight: 600; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.card-preview .cp-bottom { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #cbd5e1; text-transform: uppercase; letter-spacing: .5px; }
.card-default { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-2); margin: 4px 0 12px; cursor: pointer; }
.card-default input { width: 18px; height: 18px; accent-color: var(--brand); }
/* бренд карты (VISA/MC/МИР) — слева внутри поля номера, не перекрывает ввод */
.card-input-wrap { position: relative; }
.card-input-wrap .card-brand-left { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); display: none; pointer-events: none; }
.card-input-wrap.has-brand .card-brand-left { display: inline-flex; }
.card-input-wrap.has-brand input { padding-left: 54px; }
.brand-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 24px; padding: 0 6px; border-radius: 5px; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .5px; }
.pay-item .brand-badge, .pay-m .brand-badge { flex: none; }
/* комментарий к заказу */
.comment-ta { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 13px; font-family: inherit; font-size: 14px; color: var(--ink); resize: vertical; min-height: 44px; background: var(--card); box-sizing: border-box; }
.comment-ta:focus { border-color: var(--ink); outline: none; }
/* детали доставки (дом/кв/подъезд/этаж/домофон) */
.co-det { margin-top: 10px; }
.co-det-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-det-in { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--ink); background: var(--card); box-sizing: border-box; width: 100%; }
.co-det-in:focus { border-color: var(--ink); outline: none; }
.co-det-in.err { border-color: var(--red); }
.co-det .co-hint { margin-top: 6px; }
/* ===== Заведения на карте (веб-маркет) — ПОЛНОЭКРАННАЯ карта ===== */
/* в режиме карты снимаем transform с #panel — иначе fixed-карта считается от его бокса, а не от viewport (десктоп) */
body.b-map #panel { transform: none !important; }
.mkt-map-wrap { position: fixed; inset: 0; z-index: 2000; background: var(--bg, #fff); overflow: hidden; }
.mkt-map { position: absolute; inset: 0; }
/* компактная панель СЛЕВА (right:auto) — не на всю ширину, чтобы не уходить под навигацию справа */
.mkt-map-top { position: absolute; top: 0; left: 0; right: auto; max-width: calc(100% - 24px); z-index: 600; display: inline-flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px calc(12px + env(safe-area-inset-left, 0px)); pointer-events: none; }
.mkt-map-top > * { pointer-events: auto; }
/* зум-контролы Leaflet — НИЖЕ панели (иначе +/− перекрывали кнопку «Назад» в углу) */
.mkt-map-wrap .leaflet-top.leaflet-left { top: calc(78px + env(safe-area-inset-top, 0px)); left: env(safe-area-inset-left, 0px); }
.mkt-map-back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; background: var(--card); border: none; box-shadow: var(--shadow-md); color: var(--ink); cursor: pointer; flex: none; }
.mkt-map-back .ic { width: 19px; height: 19px; }
.mkt-map-title { flex: 0 1 auto; min-width: 0; max-width: 260px; background: var(--card); border-radius: 14px; padding: 12px 15px; font-weight: 800; box-shadow: var(--shadow-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mkt-map-listbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; border: none; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-family: inherit; font-size: 13px; cursor: pointer; box-shadow: var(--shadow-md); flex: none; }
.mkt-map-listbtn .ic { width: 15px; height: 15px; }
/* пин-маркер: иконка/аватар в кружке + название + рейтинг под ним (стиль как у карт-сервисов) */
.smk-ico { background: none !important; border: none !important; }
.smk { display: flex; flex-direction: column; align-items: center; width: 132px; cursor: pointer; }
/* аккуратный пин: аватарка-кружок 45px с тонким бордером + хвостик */
.smk-av { position: relative; width: 45px; height: 45px; border-radius: 50%; background: #fff; border: 2px solid var(--mk, #d97706); box-shadow: 0 2px 6px rgba(0,0,0,.3); overflow: visible; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .14s ease; }
.smk-av::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--mk, #d97706); }
/* !important — перебиваем дефолт Leaflet `.leaflet-container ... img { width:auto }`, из-за которого аватарка ломалась */
.smk-av img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block; border-radius: 50%; }
.smk-av .ic { width: 22px; height: 22px; color: var(--mk, #d97706); }
.smk-lbl { margin-top: 7px; max-width: 132px; text-align: center; background: #fff; border-radius: 8px; padding: 3px 8px; box-shadow: 0 1px 6px rgba(0,0,0,.2); }
.smk-lbl b { display: block; font-size: 12px; font-weight: 700; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; max-width: 116px; }
.smk-sub { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 600; color: #64748b; white-space: nowrap; }
.smk-sub .ic { width: 10px; height: 10px; color: #f59e0b; }
.smk.sel .smk-av { transform: scale(1.16); box-shadow: 0 3px 11px rgba(0,0,0,.42); z-index: 1; }
/* карточка заведения на карте — крупная, с описанием/графиком, анимация появления */
.mkt-map-card { position: absolute; left: 12px; right: 12px; bottom: 16px; z-index: 600; max-width: 540px; margin: 0 auto; background: var(--card); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mkt-map-card.hidden { display: none; }
.mmc-in { animation: mmcUp .3s cubic-bezier(.32, .72, 0, 1); }
@keyframes mmcUp { from { transform: translateY(28px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.mmc-body { display: flex; align-items: flex-start; gap: 14px; padding: 16px 16px 12px; }
.mmc-av { width: 66px; height: 66px; border-radius: 14px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; background: var(--field); }
.mmc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mmc-av .ic { width: 28px; height: 28px; color: var(--muted); }
.mmc-info { flex: 1; min-width: 0; }
.mmc-name { display: block; font-size: 18px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mmc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.mmc-meta .ic { width: 14px; height: 14px; }
.mmc-rt { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--ink); }
.mmc-rt .ic { color: #f59e0b; }
.mmc-time { display: inline-flex; align-items: center; gap: 3px; }
.mmc-dot { color: var(--muted-2); }
.mmc-desc { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mmc-hours { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #16a34a; font-weight: 600; margin-top: 5px; }
.mmc-hours .ic { width: 13px; height: 13px; }
.mmc-foot { display: flex; gap: 10px; padding: 0 16px 16px; }
.mmc-close-btn { flex: none; padding: 12px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; }
.mmc-open-btn { flex: 1; padding: 12px 18px; border-radius: 12px; border: none; background: var(--ink); color: #fff; font-weight: 800; font-family: inherit; font-size: 15px; cursor: pointer; }
.mkt-map-fab { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 7px; width: fit-content; margin: 14px auto 4px; background: var(--ink); color: #fff; border: none; border-radius: 999px; padding: 12px 20px; font-weight: 700; font-family: inherit; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-lg); z-index: 50; }
.mkt-map-fab .ic { width: 16px; height: 16px; }

/* история бонусов */
.bonus-sum { display: flex; align-items: center; justify-content: space-between; background: var(--field); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.bonus-sum span { font-size: 12.5px; color: var(--muted); }
.bonus-sum b { font-family: "Unbounded", sans-serif; font-size: 20px; font-variant-numeric: tabular-nums; }
.lc-note.dark { color: #9a6500; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
[data-theme="dark"] .lc-note.dark { color: var(--brand); }
.bonus-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.bonus-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; }
.bonus-row .br-t b { display: block; font-size: 13.5px; }
.bonus-row .br-t span { font-size: 11.5px; color: var(--muted); }
.bonus-row .br-amt { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
.bonus-row .br-amt.plus { color: #15803d; }
.bonus-row .br-amt.minus { color: #be123c; }

/* фильтр заказов — чипы с иконками */
#ordFilters.icon-chips .chip { display: inline-flex; align-items: center; gap: 7px; }
#ordFilters.icon-chips .chip .ic { width: 15px; height: 15px; }

/* корзина-кнопка: на мобайле — над нижней навигацией (перебивает базовое правило по порядку) */
@media (max-width: 720px) {
  .cart-fab { bottom: calc(60px + env(safe-area-inset-bottom) + 14px); width: calc(100vw - 28px); }
}

/* Магазин на планшете (721–1023): одна колонка, без боковой корзины (корзина — нижняя кнопка), меню — горизонтальные чипы */
@media (min-width: 721px) and (max-width: 1023px) {
  .store-layout { grid-template-columns: 1fr; gap: 16px; }
  .store-cart { display: none; }
  .store-menu { flex-direction: row; overflow-x: auto; gap: 8px; padding: 8px 0; position: sticky; top: 0; z-index: 5; scrollbar-width: none; background: linear-gradient(var(--bg) 70%, transparent); }
  .store-menu::-webkit-scrollbar { display: none; }
  .store-menu .sm-item { flex: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 13px; }
  .store-menu .sm-item.active { border-color: var(--ink); }
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Еда: магазины и товары — 4 в ряд на десктопе, плавная адаптация при сужении экрана */
@media (max-width: 1279px) {
  .store-grid, .prod-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .store-grid, .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .store-grid { grid-template-columns: 1fr; }
}

/* Аватар в модалке: камера-бейдж в правом-нижнем углу круга */
.av-edit-wrap { position: relative; display: inline-block; border: none; background: none; padding: 0; cursor: pointer; }
.av-cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; border: 3px solid var(--card); box-shadow: var(--shadow-sm); }
.av-cam .ic { width: 15px; height: 15px; }
.av-edit-wrap:hover .av-cam { filter: brightness(0.95); }

/* Курьер на планшете: подсказка-пилюля у верха перекрывалась панелью/навигацией — прячем (поля уже подписаны) */
@media (min-width: 721px) and (max-width: 1024px) {
  body.b-courier #hintPill { display: none !important; }
}

/* Телефон получателя в оформлении: префикс +992 + ровно 9 цифр */
.co-phone { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--field); border-radius: 12px; padding: 0 13px; }
.co-phone:focus-within { border-color: var(--ink); background: #fff; }
.co-phone > span { font-size: 14px; font-weight: 600; color: var(--muted); flex: none; }
.co-recip .co-phone input { flex: 1; min-width: 0; border: none; background: none; padding: 11px 0; }
.co-recip .co-phone input:focus { border: none; background: none; }

/* Чат поддержки */
.theme-row .chev { width: 16px; height: 16px; transform: rotate(180deg); color: var(--muted-2); }
.chat-card { display: flex; flex-direction: column; max-height: 80vh; }
.sup-msgs { flex: 1; min-height: 240px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.sup-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; word-break: break-word; }
.sup-msg.op { align-self: flex-start; background: var(--field); color: var(--ink); border-bottom-left-radius: 4px; }
.sup-msg.me { align-self: flex-end; background: var(--brand); color: var(--ink); border-bottom-right-radius: 4px; }
.sup-input { display: flex; gap: 8px; margin-top: 12px; }
.sup-input input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; font-size: 14px; outline: none; background: var(--field); }
.sup-input input:focus { border-color: var(--ink); background: #fff; }
.sup-send { flex: none; width: 46px; border: none; border-radius: 12px; background: var(--ink); color: #fff; font-size: 20px; font-weight: 700; cursor: pointer; }
.sup-attach { flex: none; width: 42px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--field); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.sup-img { display: block; max-width: 200px; width: 100%; border-radius: 10px; margin-top: 4px; }
.sup-msg.me .sup-img { margin-left: auto; }

/* ===== Чат поддержки (как на лендинге) ===== */
.sup-chat-panel { position: fixed; right: 24px; bottom: 92px; z-index: 95; width: min(372px, calc(100vw - 32px)); height: min(540px, calc(100vh - 130px)); background: #fff; border-radius: 22px; box-shadow: 0 26px 64px rgba(0,0,0,.3); display: none; flex-direction: column; overflow: hidden; }
body.sup-open .sup-chat-panel { display: flex; animation: schatpop .2s ease; }
@keyframes schatpop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.schat-head { display: flex; align-items: center; gap: 11px; padding: 15px 18px; background: linear-gradient(135deg,#ffd64f,#ffc107); }
.schat-ava { width: 42px; height: 42px; flex: none; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.22); }
.schat-ava img { width: 100%; height: 100%; object-fit: cover; }
.schat-ht { flex: 1; min-width: 0; }
.schat-ht b { display: block; font-weight: 800; font-size: 15px; color: #1a1205; }
.schat-ht span { font-size: 11.5px; color: #6a5500; font-weight: 600; }
.schat-close { width: 34px; height: 34px; flex: none; border: none; background: rgba(0,0,0,.08); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.schat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #faf9f7; }
.schat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee; background: #fff; }
.schat-input input { flex: 1; min-width: 0; border: 1.5px solid #e6e6e6; border-radius: 12px; padding: 12px 14px; font-family: inherit; font-size: 14px; outline: none; }
.schat-input input:focus { border-color: var(--brand); }
.schat-input button[type="submit"] { width: 46px; flex: none; border: none; background: var(--brand); border-radius: 12px; display: grid; place-items: center; cursor: pointer; }
.schat-attach { width: 42px; flex: none; border: none; background: #f1f1f1; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: #161616; }
.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid #ececec; border-radius: 16px; border-bottom-left-radius: 5px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: #bbb; animation: ctyping 1.2s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .2s; } .chat-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes ctyping { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 720px) {
  .sup-chat-panel { right: 0; left: 0; bottom: 0; top: 0; width: auto; height: auto; border-radius: 0; }
  body.sup-open .sup-fab, body.sup-open #cartFab, body.sup-open #mobNav { display: none !important; }
  .schat-head { padding-top: calc(15px + env(safe-area-inset-top)); }
  .schat-input { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* Поддержка: список тикетов + выбор типа */
.sup-tickets { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 56vh; overflow-y: auto; }
.sup-ticket { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.sup-ticket:hover { border-color: var(--ink); }
.sup-ticket .st-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sup-ticket .st-top b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-badge { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; flex: none; }
.st-badge.open { background: var(--brand-soft); color: #92711a; }
.st-badge.closed { background: var(--field); color: var(--muted); }
.sup-ticket .st-last { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-types { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.sup-type { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; cursor: pointer; text-align: left; }
.sup-type:hover { border-color: var(--ink); }
.sup-type .st-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--brand-soft); color: #b8860b; display: grid; place-items: center; }
.sup-type .st-ic .ic { width: 19px; height: 19px; }
.sup-type .st-l { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.sup-type .chev { width: 16px; height: 16px; transform: rotate(180deg); color: var(--muted-2); flex: none; }
.sup-close-btn { margin-top: 10px; }
.sup-ct { padding-right: 38px; }

/* Поддержка — карточка во всю ширину профиля */
.support-card { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 15px 18px; margin-top: 16px; cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); transition: .12s; }
.support-card:hover { border-color: var(--ink); }
.support-card .sc-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--brand-soft); color: #b8860b; display: grid; place-items: center; }
.support-card .sc-ic .ic { width: 22px; height: 22px; }
.support-card .sc-txt { flex: 1; min-width: 0; }
.support-card .sc-txt b { display: block; font-size: 15px; }
.support-card .sc-txt small { font-size: 12.5px; color: var(--muted); }
.support-card .sc-chev { width: 18px; height: 18px; transform: rotate(180deg); color: var(--muted-2); flex: none; }

/* ---------- Уведомления / рассылки (push из админки) ---------- */
#notifHost { position: fixed; left: 0; right: 0; top: 0; z-index: 4000; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 12px; pointer-events: none; }
.notif-card { pointer-events: auto; width: 100%; max-width: 440px; background: #fff; border: 1px solid rgba(20,18,13,.08); border-radius: 16px; box-shadow: 0 14px 40px rgba(20,18,13,.18); padding: 13px 40px 13px 15px; position: relative; transform: translateY(-120%); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s; border-left: 4px solid var(--brand, #FFC81A); }
.notif-card.in { transform: translateY(0); opacity: 1; }
.notif-card.out { transform: translateY(-120%); opacity: 0; }
.notif-card .notif-t { font-weight: 800; font-size: 14.5px; color: #1A1814; line-height: 1.3; }
.notif-card .notif-b { font-size: 13px; color: #5C574E; margin-top: 3px; line-height: 1.4; }
.notif-card .notif-x { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: none; background: rgba(20,18,13,.05); border-radius: 8px; font-size: 17px; line-height: 1; color: #8A857B; cursor: pointer; }
.notif-card .notif-x:hover { background: rgba(20,18,13,.1); }

/* ---------- Баннер режима обслуживания (управляется из админки) ---------- */
#maintBanner { position: fixed; top: 0; left: 0; right: 0; z-index: 5000; background: #14120D; color: #FFC81A; font-weight: 700; font-size: 13px; text-align: center; padding: 9px 14px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
#maintBanner.hidden { display: none; }

/* ---------- Контакты поддержки в чате (управляются из админки) ---------- */
.sup-contacts { display: flex; flex-wrap: wrap; gap: 12px; padding: 8px 14px; background: #FBF6E9; border-bottom: 1px solid rgba(20,18,13,.06); font-size: 12.5px; }
.sup-contacts a, .sup-contacts span { color: #5C574E; text-decoration: none; font-weight: 600; }
.sup-contacts a:hover { color: #14120D; }
.sup-contacts.hidden { display: none; }

/* ---------- Грузовик: выбор размера машины ---------- */
.tsize-row { display: flex; gap: 10px; }
.tsize-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px 10px; border: 1.5px solid rgba(20,18,13,.12); background: #fff; border-radius: 14px; transition: border-color .15s, background .15s; cursor: pointer; }
.tsize-opt img { width: 64px; height: 48px; object-fit: contain; margin-bottom: 2px; }
.tsize-opt b { font-size: 15px; font-weight: 800; color: #14120D; }
.tsize-opt small { font-size: 11px; color: #6E6A60; }
.tsize-opt.active { border-color: var(--brand, #FFC81A); background: #FFF7DE; }

/* ---------- Баннеры приложения (CMS из админки) ---------- */
.mkt-banners { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.mkt-banners:empty { display: none; }
.mkt-banner { flex: 0 0 86%; max-width: 420px; min-height: 96px; border-radius: 16px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 14px; scroll-snap-align: start; position: relative; overflow: hidden; text-decoration: none; box-shadow: 0 6px 18px rgba(20,18,13,.12); }
.mkt-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.45) 100%); }
.mkt-banner-tx { position: relative; z-index: 1; color: #fff; }
.mkt-banner-tx b { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.mkt-banner-tx span { font-size: 12.5px; opacity: .95; text-shadow: 0 1px 6px rgba(0,0,0,.4); }

/* ============================================================================
   МОБИЛЬНЫЕ ПРАВКИ РАЗДЕЛОВ — В КОНЦЕ ФАЙЛА НАМЕРЕННО.
   Базовые (десктопные) стили витрины/заказов/профиля объявлены ниже первого
   мобильного медиа-блока, а при равной специфичности побеждает правило, которое
   идёт позже. Поэтому все переопределения для телефона держим здесь — иначе они
   молча не применяются (так .order-grid оставался шириной 330px и раздел
   «Заказы» скроллился вбок).
   ДЕСКТОП НЕ ЗАТРАГИВАЕТСЯ: всё внутри @media (max-width: 720px).
   ============================================================================ */
/* Мобильные строки профиля: скрыты на десктопе. Заглушка стоит ПОСЛЕ всех
   базовых правил (.addr-item и т.п.) — иначе при равной специфичности их
   display:flex побеждал и строки вылезали на десктоп (уже наступали). */
.mob-only-row { display: none; }
/* Маскот и «назад» экрана оценки — только мобильный вид */
.rate-back, .rate-mascot { display: none; }

@media (max-width: 720px) {
  /* ============ ВИТРИНА НА ТЕЛЕФОНЕ (Еда · Магазин · Аптека) ============
     Как в приложении (storeBigCard): заведения — крупными карточками в ОДНУ
     колонку с обложкой 16:9, а не двумя узкими столбцами. Читаемые названия,
     видимые рейтинг/время/бейджи, крупные зоны нажатия. */
  .store-grid { grid-template-columns: 1fr; gap: 16px; }
  .rc { border-radius: 20px; box-shadow: 0 6px 18px rgba(15,23,42,.07); }
  .rc:active { transform: scale(.99); }
  .rc-cover { height: auto; aspect-ratio: 16 / 9; }
  .rc-fav { width: 38px; height: 38px; top: 8px; right: 8px; }
  .rc-fav .ic { width: 19px; height: 19px; }
  .rc-body { padding: 12px 14px 14px; }
  .rc-top b { font-size: 17px; line-height: 1.2; }
  .rc-rt { font-size: 13.5px; }
  .rc-time { font-size: 13px; margin-top: 4px; }
  .rc-badges { margin-top: 8px; gap: 6px; }
  .rc-badge { font-size: 11.5px; padding: 5px 10px; }

  /* ===== Шапка витрины: адрес больше НЕ уезжает за край =====
     Было: заголовок + сердечко + адрес в одну строку, адрес шириной 220px и без
     права сжиматься — на телефоне он вылезал за экран (видно на скриншоте).
     Стало: заголовок отдельной строкой, адрес и «избранное» — своей строкой,
     адрес занимает всё оставшееся место и обрезается многоточием, а не краем. */
  .mkt-headrow { flex-wrap: wrap; gap: 10px; }
  .mkt-headrow .mkt-h { flex: 1 1 100%; min-width: 0; }
  .mkt-head-actions { flex: 1 1 100%; width: 100%; gap: 8px; }
  .mkt-addr { flex: 1 1 auto; max-width: none; min-width: 0; }
  .mkt-addr span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mkt-fav-btn { flex: none; width: 44px; height: 44px; }
  /* Заголовок и подпись компактнее: подпись в одну строку, без «простыни» */
  .mkt-h h2 { font-size: 22px; line-height: 1.15; }
  .mkt-h span { font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* ===== ДЕТАЛИ ЗАКАЗА на телефоне — как order_details_screen.dart =====
     Было: узкая модалка по центру, секции разделены тонкими линиями — на
     телефоне это выглядело как сплошная простыня. Стало: экран на всю высоту
     с шапкой и отдельными карточками-секциями (аналог YbCard). */
  #orderBackdrop { padding: 0; align-items: stretch; backdrop-filter: none; background: var(--bg); }
  .auth-card.od-card {
    width: 100%; max-width: none; max-height: none; height: 100%;
    margin: 0; border-radius: 0; background: var(--bg);
    padding: calc(58px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    box-shadow: none; overflow-y: auto;
  }
  /* Кнопка «назад» — как в шапке приложения: слева сверху, на подложке */
  .od-card .auth-close {
    position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 12px; z-index: 3;
    width: 42px; height: 42px; border-radius: 14px; background: var(--card);
    box-shadow: 0 4px 14px rgba(15,23,42,.10);
  }
  /* Шапка заказа: тип, номер с датой и статус-чип */
  .od-head { margin: 0 0 14px; gap: 12px; }
  .od-head .oc-ic { width: 52px; height: 52px; border-radius: 14px; }
  .od-ti b { font-size: 17px; }
  .od-ti span { font-size: 12.5px; }
  /* Секции — карточки, а не линии */
  .od-sec {
    border-top: none; margin-top: 12px; padding: 14px;
    background: var(--card); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 4px 14px rgba(15,23,42,.05);
  }
  .od-label { font-size: 11.5px; margin-bottom: 10px; }
  /* Курьер, состав, маршрут — крупнее и просторнее */
  .od-cav { width: 50px; height: 50px; font-size: 18px; }
  .od-cmain b { font-size: 15.5px; }
  .od-it-img { width: 46px; height: 46px; border-radius: 12px; }
  .od-it-main span { font-size: 14px; }
  .od-route .ocr { font-size: 13.5px; }
  .od-row { font-size: 14px; margin-bottom: 10px; }
  .od-row.od-total { font-size: 16px; }
  /* Кнопки внизу — крупные, во всю ширину */
  .od-card .cta { padding: 16px; font-size: 16px; border-radius: 16px; margin-top: 16px; }
  .od-card .btn-line { padding: 14px; font-size: 14.5px; border-radius: 14px; }
  /* Оценка: звёзды крупнее, чтобы попадать пальцем */
  .od-pstar, .od-star { font-size: 26px; }
  .od-pstars { gap: 4px; }

  /* ===== ПРОФИЛЬ / НАСТРОЙКИ на телефоне — как profile_screen.dart =====
     Строки-настройки крупнее и с одинаковым ритмом, карточки одного скругления,
     переключатели и чипы удобно нажимать пальцем. */
  #screenProfile .page-head h2 { font-size: 22px; }
  .pm-title { font-size: 11.5px; margin: 18px 2px 9px; }
  /* строки настроек: адреса, оплата, поддержка, тема */
  .addr-item, .pay-item, .support-card, .theme-row, .pay-add {
    border-radius: 16px; padding: 14px; min-height: 60px;
  }
  .addr-item:active, .pay-item:active, .support-card:active, .pay-add:active { background: var(--field); }
  .support-card .sc-ic, .addr-item .ic, .pay-item .ic { flex: none; }
  /* язык: три чипа во всю ширину, крупный шрифт */
  .lang-row { gap: 8px; }
  .lang-chip { padding: 12px 6px; font-size: 14px; border-radius: 14px; }
  /* бонусы и рефералы — заметные карточки */
  .loyalty-card { border-radius: 20px; padding: 18px; }
  .referral-card { border-radius: 18px; padding: 15px; }
  .rc-code { font-size: 17px; letter-spacing: 1px; }
  /* тёмная тема: строка с переключателем — крупная зона нажатия */
  .theme-row .tr-l { font-size: 15px; }

  /* ===== Список заказов: ОДНА колонка =====
     Базовое правило .order-grid задаёт колонки minmax(330px) и объявлено ниже
     первого мобильного блока — на телефоне это давало колонку шире экрана и
     горизонтальный скролл. Здесь (в конце файла) переопределение срабатывает. */
  .order-grid { grid-template-columns: 1fr; gap: 12px; }
  #screenOrders .page-head h2 { font-size: 22px; }
  #screenOrders .page-head span { font-size: 12.5px; }
  /* Ничто в заказах не должно вылезать за ширину экрана */
  .order-card, .order-card * { max-width: 100%; }
  .order-card { overflow: hidden; }
  .oc-ti b, .oc-ti span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

  /* «Посылка»: убираем с карты кнопки «вид карты» и «моё местоположение» —
     на телефоне они закрывали карту, а определить позицию можно прямо в форме
     («Откуда» → кнопка местоположения). На десктопе кнопки остаются. */
  .map-controls { display: none !important; }
  .layers-menu { display: none !important; }

  /* ================= ЗАКАЗЫ — вид как в приложении ================= */
  .order-card { padding: 12px; border-radius: 18px; }
  .oc-head { gap: 12px; align-items: center; }
  /* серый квадрат с 3D-посылкой (или обложкой заведения) */
  .oc-ic { width: 56px; height: 56px; border-radius: 14px; background: var(--field); }
  .oc-ic.art { position: relative; overflow: hidden; }
  .oc-ic.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; }
  .oc-ic.art .ic { opacity: 0; }
  .oc-ti b { font-size: 16.5px; font-weight: 800; }
  /* дата/номер в списке не нужны — как в приложении показываем статус точкой */
  .oc-ti > span { display: none; }
  .oc-dotline { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-style: normal; font-size: 13.5px; color: var(--muted); }
  .oc-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
  .oc-dot.ok { background: #16a34a; }
  .oc-dot.bad { background: #e11d48; }
  .oc-dot.wait { background: var(--brand); }
  .oc-dotline { color: var(--muted); }
  .order-card .oc-dot.bad ~ * , .oc-dotline:has(.oc-dot.bad) { color: #e11d48; }
  .oc-dotline:has(.oc-dot.ok) { color: #16a34a; }
  /* сумма справа, статус-чип и маршрут в списке скрыты (есть в деталях) */
  .oc-sum { display: block; flex: none; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
  .order-card .oc-status { display: none; }
  .order-card .oc-route { display: none; }
  .order-card .oc-foot { display: none; }
  /* заголовок раздела и фильтры — как на скриншоте */
  #screenOrders .page-head span { display: none; }
  #ordFilters { gap: 10px; margin-bottom: 6px; }
  #ordFilters .chip { padding: 12px 20px; font-size: 15px; border-radius: 999px; border: none; background: var(--card); box-shadow: 0 2px 8px rgba(15,23,42,.06); }
  #ordFilters .chip .ic { display: none; }
  #ordFilters .chip.active { background: var(--brand); color: var(--ink); font-weight: 800; }

  /* ================= ПРОФИЛЬ — вид как в приложении ================= */
  /* настройки одной карточкой: строки с иконкой, разделителем и стрелкой */
  #screenProfile .pm-title { display: none; }
  .addr-list, .pay-list { gap: 0; }
  .addr-item, .pay-item, .support-card, .theme-row {
    border-radius: 0; border: none; border-bottom: 1px solid var(--line);
    box-shadow: none; background: var(--card); padding: 16px 14px; min-height: 62px;
  }
  .addr-list, .pay-list { background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
  .support-card, .theme-row { border-radius: 18px; box-shadow: 0 4px 14px rgba(15,23,42,.05); border-bottom: none; margin-top: 10px; }
  .addr-item:last-child, .pay-item:last-child { border-bottom: none; }
  /* реферальная карточка — тёмная, как в приложении */
  .referral-card { background: #131c2e; color: #fff; border: none; border-radius: 20px; padding: 16px; }
  .referral-card b, .referral-card .rc-code { color: #fff; }
  .referral-card small, .referral-card span { color: rgba(255,255,255,.72); }
  .referral-card .rc-ic { background: rgba(255,255,255,.10); }
  /* «Выйти» — красная обводка */
  #profileLogout { border: 1.5px solid #f9c8d0; color: #e11d48; background: var(--card); border-radius: 16px; padding: 15px; font-weight: 800; font-size: 16px; width: 100%; }

  /* Шапка панели «Yoobi · Доставка из точки А в точку Б» + город на телефоне
     не нужна: место занимает, а город теперь выбирается в профиле. */
  #panel > .head { display: none !important; }
  .mob-only-row { display: flex; align-items: center; gap: 12px; width: 100%; }
  .mob-only-row .ai-main { flex: 1; min-width: 0; text-align: left; }
  .mob-only-row .ai-val { color: var(--muted); font-size: 14px; }
  .mob-only-row .ai-chev { width: 18px; height: 18px; color: var(--muted-2); transform: rotate(180deg); }
  /* Карточки заказов компактнее (по просьбе владельца — были крупноваты) */
  .order-card { padding: 10px; border-radius: 16px; }
  .oc-ic { width: 48px; height: 48px; border-radius: 12px; }
  .oc-ti b { font-size: 15px; }
  .oc-dotline { font-size: 12.5px; margin-top: 3px; }
  .oc-sum { font-size: 15.5px; }
  .order-grid { gap: 9px; }

  /* Порядок строк настроек как на скриншоте приложения:
     Город · Адреса · Оплата · Язык · Поддержка · Тёмная тема.
     В разметке поддержка стоит после темы — меняем порядок только визуально. */
  .prof-col { display: flex; flex-direction: column; }
  .prof-col > .support-card { order: 1; }
  .prof-col > .theme-row { order: 2; }
  /* «Выйти» всегда последней */
  #profileLogout { order: 3; margin-top: 14px; }

  /* Строка «Город» — отдельная карточка над списком адресов (как в приложении) */
  #profCityRow { border-radius: 18px; border-bottom: none; box-shadow: 0 4px 14px rgba(15,23,42,.05); margin-bottom: 10px; }

  /* ============ ПРОФИЛЬ: точная копия экрана приложения ============ */
  /* Шапка: аватар с камерой, чип «Постоянный» справа */
  .profile-head { position: relative; padding-right: 4px; }
  #profileAvatar { position: relative; overflow: visible; }
  .av-cam { display: grid; place-items: center; position: absolute; left: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #231900; border: 2px solid var(--card); }
  .av-cam .ic { width: 12px; height: 12px; }
  .ph-status { position: absolute; right: 0; top: 2px; background: var(--brand-soft); color: #8a6d1a; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
  .ph-status i { display: none; }
  .ph-edit { margin-top: 30px; }

  /* Рефералка — тёмная, одна строка с код+шер, поле ввода кода скрыто */
  .referral-card { align-items: center; gap: 12px; }
  .referral-card .rc-ic { width: 46px; height: 46px; flex: none; border-radius: 14px; background: rgba(255,255,255,.10); display: grid; place-items: center; }
  .referral-card .rc-ic .ic { width: 22px; height: 22px; color: var(--brand); }
  .referral-card .rc-body b { font-size: 16px; }
  .referral-card #referralSub { display: none; }
  .referral-card .rc-code { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: rgba(255,255,255,.72); }
  .referral-card .rc-code b { color: #fff; letter-spacing: .5px; }
  .referral-card .rc-share { margin-left: auto; background: none; border: none; color: #fff; padding: 8px; }
  .referral-card .rc-share span { display: none; }
  .referral-card .rc-share .ic { width: 20px; height: 20px; }
  .referral-card .rc-enter { display: none !important; }

  /* Одна карточка настроек: город сверху, тема снизу, между ними — разделители */
  .prof-cols { gap: 0; }
  #profCityRow { border-radius: 18px 18px 0 0; margin-bottom: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
  #mRowAddresses, #mRowPay, #mRowLang { border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
  .prof-col > .support-card { order: 1; border-radius: 0; box-shadow: none; margin-top: 0; border-bottom: 1px solid var(--line); }
  .prof-col > .theme-row { order: 2; border-radius: 0 0 18px 18px; box-shadow: none; margin-top: 0; }
  #profileLogout { order: 3; margin-top: 16px; }
  /* Инлайн-списки и чипы в профиле скрыты — открываются под-экраном */
  #screenProfile .addr-list, #screenProfile #addrAddBtn,
  #screenProfile .pay-list, #screenProfile #addCard,
  #screenProfile #profLangRow { display: none; }
  /* Значение справа в строках (город/язык) */
  .mob-only-row .ai-val { display: inline-flex; align-items: center; gap: 6px; }

  /* Под-экран: адреса / оплата / язык */
  #mobSubBackdrop { position: fixed; inset: 0; z-index: 210; background: var(--bg); display: flex; flex-direction: column; }
  #mobSubBackdrop.hidden { display: none !important; }
  .mobsub-head { display: flex; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 12px 12px; background: var(--card); box-shadow: 0 2px 10px rgba(15,23,42,.06); }
  .mobsub-head b { font-size: 17px; font-weight: 800; }
  #mobSubBack { width: 42px; height: 42px; border: none; background: none; color: var(--ink); display: grid; place-items: center; }
  #mobSubBack .ic { width: 22px; height: 22px; }
  #mobSubBody { flex: 1; overflow-y: auto; padding: 14px 14px calc(20px + env(safe-area-inset-bottom)); }
  /* Внутри под-экрана перенесённые блоки снова видимы и в карточном стиле */
  #mobSubBody .addr-list, #mobSubBody .pay-list { display: flex; }
  #mobSubBody #addrAddBtn, #mobSubBody #addCard { display: flex; margin-top: 10px; border-radius: 16px; padding: 14px; }
  #mobSubBody #profLangRow { display: flex; gap: 8px; }
  #mobSubBody .addr-item, #mobSubBody .pay-item { border-radius: 0; border-bottom: 1px solid var(--line); }
  #mobSubBody .addr-item:first-child, #mobSubBody .pay-item:first-child { border-radius: 18px 18px 0 0; }
  #mobSubBody .addr-item:last-child, #mobSubBody .pay-item:last-child { border-radius: 0 0 18px 18px; border-bottom: none; }

  /* ---- Доводка профиля по скриншоту ---- */
  /* «Поддержка» — как остальные строки: контурные наушники, без подзаголовка */
  .support-card .sc-ic-d { display: none; }
  .support-card .sc-ic-m { display: block; }
  .support-card .sc-ic { width: auto; height: auto; background: none; border-radius: 0; flex: none; }
  .support-card .sc-ic .ic { width: 22px; height: 22px; color: var(--ink); }
  .support-card .sc-txt small { display: none; }
  .support-card .sc-txt b { font-size: 15px; font-weight: 700; }
  .support-card .sc-chev { width: 18px; height: 18px; color: var(--muted-2); }
  /* Чип «Постоянный клиент» — компактный, как в приложении */
  .ph-status { top: 0; padding: 5px 10px; font-size: 11px; }
  /* «Пригласите друга» — компактнее */
  .referral-card { padding: 13px 14px; border-radius: 18px; }
  .referral-card .rc-ic { width: 40px; height: 40px; border-radius: 12px; }
  .referral-card .rc-body b { font-size: 15px; }
  .referral-card .rc-code { font-size: 12px; }

  /* ---- Выбор города: полноэкранный список, как city_screen.dart ---- */
  #cityBackdrop { padding: 0; align-items: stretch; background: var(--bg); backdrop-filter: none; }
  #cityBackdrop .auth-card { width: 100%; max-width: none; max-height: none; height: 100%; margin: 0; border-radius: 0; background: var(--bg); padding: calc(56px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom)); overflow-y: auto; box-shadow: none; }
  #cityBackdrop .auth-close { position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 12px; z-index: 3; width: 42px; height: 42px; border-radius: 14px; background: var(--card); box-shadow: 0 4px 14px rgba(15,23,42,.10); }
  #cityBackdrop .auth-mark { display: none; }
  #cityBackdrop .auth-title { text-align: left; font-size: 22px; }
  #cityBackdrop .auth-sub { text-align: left; }
  #cityBackdrop .lang-row { display: none; } /* язык выбирается в профиле */
  #cityBackdrop .city-grid { grid-template-columns: 1fr; gap: 0; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
  #cityBackdrop .city-item { border: none; border-radius: 0; border-bottom: 1px solid var(--line); padding: 16px 14px; min-height: 56px; font-size: 15px; }
  #cityBackdrop .city-item:last-child { border-bottom: none; }
  #cityBackdrop #citySearch { height: 48px; border-radius: 14px; }

  /* ---- Выбор языка в под-экране: строки с галочкой (не чипы) ---- */
  #mobSubBody #profLangRow { flex-direction: column; gap: 0; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(15,23,42,.05); }
  #mobSubBody #profLangRow .lang-chip { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 16px 14px; border: none; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; }
  #mobSubBody #profLangRow .lang-chip:last-child { border-bottom: none; }
  #mobSubBody #profLangRow .lang-chip.active { background: var(--card); color: var(--ink); font-weight: 800; }
  #mobSubBody #profLangRow .lang-chip.active::after { content: '\2713'; color: var(--brand); font-weight: 800; font-size: 17px; }

  /* ===== «Спасибо, что выбрали нас!» — финиш доставки как в приложении ===== */
  #rateBackdrop { padding: 0; align-items: stretch; background: var(--bg); backdrop-filter: none; }
  #rateBackdrop .rate-card { width: 100%; max-width: none; max-height: none; height: 100%; margin: 0; border-radius: 0; background: var(--bg); box-shadow: none; overflow-y: auto; padding: calc(64px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); text-align: center; }
  .rate-back { display: grid; place-items: center; position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 14px; z-index: 3; width: 42px; height: 42px; border: none; border-radius: 14px; background: none; color: var(--ink); }
  .rate-back .ic { width: 24px; height: 24px; }
  .rate-mascot { display: block; width: min(300px, 72vw); margin: 0 auto 6px; }
  #rateBackdrop .rate-success { display: none; }        /* галочка есть на маскоте */
  #rateBackdrop .rate-courier { display: none; }        /* имя курьера — без строки, как на скрине */
  #rateBackdrop .auth-title { font-size: 24px; }
  #rateBackdrop .auth-sub { font-size: 16px; margin-top: 6px; }
  #rateBackdrop .stars { justify-content: center; gap: 14px; margin: 18px 0 8px; }
  #rateBackdrop .stars .star .ic { width: 40px; height: 40px; }
  /* чаевые на телефоне не показываем — на экране приложения их нет */
  #rateBackdrop .pm-title, #rateBackdrop .tip-row { display: none; }
  #rateBackdrop .rate-review { min-height: 140px; border-radius: 16px; padding: 14px; font-size: 16px; background: var(--field); border: 1.5px solid var(--line); margin-top: 10px; }
  #rateBackdrop .rate-store { text-align: left; }
  #rateBackdrop .rate-store .pm-title { display: block; }
  #rateBackdrop .cta { background: var(--brand); color: #231900; border-radius: 18px; padding: 17px; font-size: 17px; font-weight: 800; box-shadow: 0 8px 20px rgba(247,181,0,.35); margin-top: 16px; }
  #rateBackdrop .link-btn { display: none; }            /* «Пропустить» заменяет стрелка назад */
}

/* Размер моделек курьеров под масштаб карты (переменную ставит app.js: syncModelScale).
   Спрайт нарисован в пикселях и без этого не зависел от зума: на дальнем плане модель
   закрывала полгорода, на ближнем терялась рядом с широкой дорогой — и казалось, что
   машина стоит не на своей полосе. Меняется одна переменная на контейнере карты,
   а не стили каждого маркера. */
.nearby-marker .nb.model img {
  transform-origin: 50% 50%;
  scale: var(--model-scale, 1);
  transition: transform .3s ease, scale .25s ease;
}

/* ═══════════ Закрытое заведение и стоп-лист товара ═══════════
   Всё ниже — НОВЫЕ селекторы: ни одно существующее правило не меняется, десктопная
   раскладка остаётся прежней (страж tools/check-desktop-untouched.py).
   Цвета берём переменными (--red / --brand / --muted / --field), а не литералами:
   иначе плашка «Закрыто» светилась бы белым пятном в тёмной теме. */

/* Карточка витрины: закрытая точка гаснет, но остаётся кликабельной — человек
   заходит посмотреть меню и график, чтобы решить, ждать ли до утра. */
.rc.rc-off .rc-cover, .rc.rc-off .rc-body > *:not(.rc-time) { opacity: .5; }
.rc.rc-off:hover { transform: none; }
.rc-closed-t { color: var(--red); font-weight: 700; }
.rc-closed-t.busy { color: #b26a00; }
[data-theme="dark"] .rc-closed-t.busy { color: var(--brand); }

/* Плашка «заведение сейчас не работает»: во всю ширину и ДО меню. Признак `open`
   раньше жил мелким текстом сбоку от рейтинга — его просто не замечали. */
.store-closed {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 13px 14px;
  border-radius: var(--r-md, 16px);
  background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .5);
  color: var(--red); font-size: 14px; font-weight: 700; line-height: 1.35;
}
/* Пауза приёма — состояние временное и мягкое (заведение работает, просто завалено
   кухня): жёлтая плашка вместо тревожной красной. */
.store-closed.busy { background: rgba(255, 201, 7, .16); border-color: rgba(255, 201, 7, .55); color: #7a5b00; }
[data-theme="dark"] .store-closed.busy { color: var(--brand); }
.store-closed .ic { width: 19px; height: 19px; flex: none; }

/* Кнопка «В корзину», когда добавить нельзя: причина написана на самой кнопке —
   человек не должен нажимать её, чтобы узнать, почему ничего не произошло. */
.pcard-add.pcard-off { background: var(--field); color: var(--muted); cursor: not-allowed; }
.pcard-add.pcard-off:hover { background: var(--field); }
.prodm-block { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--field); color: var(--muted); font-size: 13.5px; font-weight: 600; line-height: 1.4; }

/* Строка корзины со снятым с продажи товаром: погашена, без «+/−» (уменьшать нечего),
   с кнопкой «Убрать» — единственным осмысленным действием. */
.cit-off .cit-img, .cit-off .cit-name, .cit-off .cit-p { opacity: .45; }
.cit-off-t { font-size: 12px; font-weight: 700; color: var(--red); margin: 2px 0 6px; }
.cit-del { border: 1px solid var(--line); background: transparent; color: var(--red); font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 9px; }
.cart-rm-off { display: block; margin: 8px 0 4px; border: none; background: transparent; color: var(--red); font-size: 13.5px; font-weight: 700; padding: 6px 0; }

/* Карта: пин и карточка закрытой точки. */
.smk.smk-off { opacity: .55; }
.mmc-time.mmc-off { color: var(--red); font-weight: 700; }
