/* ============ Вариант 2: карта-карточка, тёмно-сливовый + малиновый WB ============ */
:root {
  --ink: #2a0f3d;          /* основной тёмный */
  --accent: #cb11ab;       /* малиновый WB */
  --accent-text: #a00d87;  /* малиновый для текста (контраст) */
  --bg: #faf8fc;
  --card: #ffffff;
  --lilac: #efe7f6;
  --lilac-2: #e2d6ee;
  --line: #ece4f4;
  --muted: #6e6380;
  --muted-2: #5b4f6e;
  --ok: #1f8a4c;
  --err: #d0244f;
  --safe-b: env(safe-area-inset-bottom);
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #ebe4f2;
  font-size: 16px;
  line-height: 1.4;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.app {
  position: relative;
  display: flex; flex-direction: column;
  max-width: 430px;
  height: 100vh; height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}
@media (min-width: 500px) { .app { box-shadow: 0 0 60px rgba(42, 15, 61, .15); } }

/* ======================= Карта-карточка ======================= */
.map {
  position: relative; z-index: 0;
  flex: 1 1 auto; min-height: 170px;
  margin: 12px 12px 0;
  border-radius: 28px;
  overflow: hidden;
  background: #ede5f5;
}
.app.no-tabbar .map { margin-bottom: 12px; }
.app[data-view="order"] .map { display: none; }
/* Скрываем нижний блок Яндекса: логотип, «Условия использования», «Как добраться» */
.map [class*="copyrights-pane"],
.map [class*="gotoymaps"],
.map [class*="gototech"],
.map [class*="gototaxi"],
.map [class*="map-copyrights-promo"] { display: none !important; }

/* Кнопка «Слои» */
.layers { position: absolute; top: 12px; right: 12px; z-index: 5; }
.layers__btn {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: #fff;
  color: #481173;
  box-shadow: 0 4px 14px rgba(72, 17, 115, .18);
}
.layers__btn[aria-expanded="true"] { background: #481173; color: #fff; }
.layers__menu {
  position: absolute; top: 52px; right: 0;
  display: flex; flex-direction: column;
  min-width: 140px; padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(72, 17, 115, .18);
}
.layers__menu button {
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 15px; font-weight: 600;
}
.layers__menu button:hover { background: #f3eef8; }
.layers__menu button.is-on { background: #cb11ab; color: #fff; }

/* Кнопка «Карта на весь экран» — под «Слоями» */
.map-expand { position: absolute; top: 64px; right: 12px; z-index: 5; }
.app.map-full .map-expand,
.app.picking .map-expand { display: none; }

.mk-wrap { background: none; border: 0; overflow: visible; }
.mk-wrap > * { width: max-content; }
.mk-wrap > .mk-pin { width: 40px; }
.mk-wrap > .mk-pvz { width: 30px; }
.mk-pvz {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  transform: translate(-50%, -50%);
  border: 3px solid #fff; border-radius: 50%;
  background: linear-gradient(135deg, #cb11ab 0%, #8a1bb0 55%, #481173 100%); color: #fff;
  font: 800 10px/1 'Manrope', 'Onest', sans-serif;
  box-shadow: 0 4px 12px rgba(72, 17, 115, .35);
}
.mk-pin {
  position: relative;
  width: 40px; height: 52px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 6px 8px rgba(42, 15, 61, .3));
  cursor: grab;
}
.mk-pin svg { display: block; }
.mk-pin svg path { fill: var(--accent); }
.mk-pin span {
  position: absolute; left: 50%; bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 4px; padding: 5px 10px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font: 600 12px/1.2 'Onest', sans-serif;
  white-space: nowrap;
}

/* ======================= Нижняя часть (шаги) ======================= */
.sheet {
  flex: 0 1 auto;
  max-height: 70%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px calc(96px + var(--safe-b));
}
.app.no-tabbar .sheet { padding-bottom: calc(20px + var(--safe-b)); }
.app[data-view="order"] .sheet { flex: 1 1 auto; max-height: none; padding-top: 16px; }
.sheet.is-hidden { display: none; }

.step { display: none; animation: stepIn .25s ease; }
.step.is-active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.title {
  margin: 0 0 8px;
  font-family: var(--display); font-size: clamp(20px, 6.6vw, 26px); line-height: 1.15; font-weight: 700; letter-spacing: -.5px;
  white-space: nowrap;
}
.subtitle { margin: 0 0 16px; font-size: 15px; font-weight: 500; color: var(--muted-2); }

/* Шапка шага */
.head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-bottom: 16px; }
.head__text { display: flex; flex-direction: column; }
.head__text small { font-size: 13px; font-weight: 600; color: var(--muted); }
.head__text h2 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 700; }
.head__spacer { width: 48px; }
.back-btn {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--lilac-2);
  color: var(--ink);
  transition: transform .12s, background .2s;
}
.back-btn:active { transform: scale(.94); background: var(--lilac); }

/* «Вернуться к расчёту» */
.resume {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-bottom: 12px; padding: 12px 14px 12px 16px;
  border-radius: 18px; background: var(--accent); color: #fff; text-align: left;
}
.resume__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.resume__body small { font-size: 12px; font-weight: 600; }
.resume__body b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume__price { flex: none; font-family: var(--display); font-size: 18px; font-weight: 700; }
.resume__arrow { flex: none; }

/* Быстрый адрес «домой» */

/* Сёла — сегменты */
.segment {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; margin-bottom: 12px;
  border-radius: 16px; background: var(--lilac);
}
.segment .chip {
  min-height: 44px; border-radius: 12px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  transition: background .2s, color .2s, box-shadow .2s;
}
.segment .chip[aria-checked="true"] { background: #fff; box-shadow: 0 2px 8px rgba(42, 15, 61, .1); }

/* Поле адреса */
.field {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 10px 0 16px;
  border-radius: 18px; background: #fff;
  border: 1.5px solid var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(203, 17, 171, .12); }
.field__ico { flex: none; color: var(--ink); }
.field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 17px; font-weight: 600; padding: 16px 0;
}
.field input::placeholder { color: #7d7290; font-weight: 500; }
.field__clear {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; background: var(--lilac); color: var(--ink);
}

.suggest {
  list-style: none; margin: 10px 0 0; padding: 4px 0;
  background: #fff; border-radius: 20px; border: 1px solid var(--line);
}
.suggest li {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 16px; cursor: pointer;
}
.suggest li + li { border-top: 1px solid #f3edf8; }
.suggest li:active { background: var(--lilac); }
.suggest li::before {
  content: ''; flex: none; width: 36px; height: 36px; border-radius: 12px;
  background: #fbe6f6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='18' height='18' fill='none' stroke='%23a00d87' stroke-width='2'%3E%3Cpath d='M12 21s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12Z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.suggest b { display: block; font-weight: 700; }
.suggest small { color: var(--muted); font-size: 13px; }
.suggest .suggest__empty { color: var(--muted); cursor: default; }
.suggest .suggest__empty::before { background-color: var(--lilac); }

.note { margin: 8px 4px 0; color: var(--err); font-size: 14px; font-weight: 600; }

.alt-actions { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 10px; padding-left: 2px; }
.text-btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; font-size: 15px; font-weight: 600; color: var(--accent-text);
}

/* ======================= Кнопки ======================= */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 0 18px;
  border-radius: 18px; font-size: 17px; font-weight: 700;
  transition: transform .12s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.btn + .btn { margin-top: 10px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--outline { border: 1.5px solid var(--ink); color: var(--ink); }
.btn--light { background: var(--lilac); color: var(--ink); }
.btn--big { min-height: 60px; font-size: 18px; border-radius: 20px; }
.btn--wa { background: #1f8a4c; color: #fff; margin-top: 12px; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn-row .btn + .btn { margin-top: 0; }

/* ======================= Шаг 2: стоимость ======================= */
.loading { padding: 20px 0 26px; text-align: center; color: var(--muted); font-weight: 500; }
.spinner {
  width: 38px; height: 38px; margin: 0 auto 12px;
  border: 4px solid var(--lilac); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.price-card { margin-bottom: 12px; }
.price-card__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.price-card__main { display: flex; flex-direction: column; }
.price-card__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.price-card__price {
  font-family: var(--display); font-size: 44px; font-weight: 700; line-height: 1.05; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.km-chip {
  flex: none; padding: 8px 12px; border-radius: 999px;
  background: var(--lilac); font-size: 14px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.price-card.is-updating .price-card__price,
.price-card.is-updating .km-chip { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

.timeline {
  display: flex; flex-direction: column;
  padding: 16px; border-radius: 22px; background: #fff; border: 1px solid var(--line);
}
.timeline__stop { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.timeline__stop > span:not(.timeline__dot) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.timeline__edit {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; margin: -4px -6px -4px 0;
  border-radius: 12px; background: var(--lilac); color: var(--ink);
}
.timeline__edit img { display: block; width: 22px; height: 22px; object-fit: contain; }
.timeline__edit:active { transform: scale(.94); }
.timeline__stop b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline__stop small { font-size: 13px; color: var(--muted); }
.timeline__dot { width: 14px; height: 14px; margin-top: 3px; flex: none; border-radius: 50%; background: var(--ink); }
.timeline__dot--home { background: var(--accent); box-shadow: 0 0 0 4px #fbe6f6; }
.timeline__line { width: 0; height: 18px; margin: 2px 0 2px 6px; border-left: 2px dashed var(--accent); }

.hint { margin: 0 4px 14px; font-size: 13px; color: var(--muted-2); }
.hint b { color: var(--ink); }
.hint--warn { padding: 10px 12px; margin: 0 0 14px; border-radius: 14px; background: #fbe6f6; color: var(--ink); }

.state { padding: 0 0 4px; text-align: center; }
.state__image {
  display: block; width: 132px; height: 132px; margin: -12px auto -2px;
  object-fit: contain; user-select: none; pointer-events: none;
}
.state__image--zone { width: 146px; height: 146px; margin-top: -18px; margin-bottom: -8px; }
.state h3 { margin: 0 0 6px; font-family: var(--display); font-size: 19px; font-weight: 700; }
.state p { margin: 0 0 16px; color: var(--muted-2); }

/* ======================= Шаг 3: оформление ======================= */
.dark-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 18px;
  border-radius: 22px; background: var(--ink); color: #fff;
}
.dark-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dark-card__main small { font-size: 13px; color: #d9cbe8; }
.dark-card__main b { font-size: 16px; font-weight: 600; }
.dark-card__price { flex: none; font-family: var(--display); font-size: 21px; font-weight: 700; }

.input { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.input__label { font-size: 14px; font-weight: 600; }
.input__label i { color: var(--accent-text); font-style: normal; }
.input__label small { font-weight: 500; color: var(--muted); font-size: 14px; }
.input input, .input textarea {
  width: 100%; min-height: 56px; padding: 14px 16px;
  border-radius: 16px; border: 1.5px solid #d9cce8; background: #fff;
  outline: 0; font-size: 17px; font-weight: 500; resize: none;
  transition: border-color .2s, box-shadow .2s;
}
.input input:focus, .input textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(42, 15, 61, .08); }
.input input::placeholder, .input textarea::placeholder { color: #7d7290; }
.input.is-error input { border-color: var(--err); }
.input__error { color: var(--err); font-size: 14px; font-weight: 600; }
.fine { margin: 10px 4px 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ======================= Готово ======================= */
.done { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.done__check {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border-radius: 50%; background: var(--ok);
  animation: pop .4s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done__title { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 700; }
.done__text { margin: 0; font-size: 14px; color: var(--muted-2); }
.done__text b { color: var(--ink); white-space: nowrap; }

.summary {
  padding: 4px 18px; margin-bottom: 16px;
  border-radius: 22px; background: #fff; border: 1px solid var(--line);
}
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 15px; }
.summary div + div { border-top: 1px solid #f3edf8; }
.summary span { color: var(--muted); flex: none; }
.summary b { text-align: right; font-weight: 600; }

/* ======================= Выбор точки ======================= */
.picker { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
/* Сверху выбора точки: сёла + подсказка */
.picker__top {
  position: absolute; left: 24px; right: 24px; top: calc(24px + env(safe-area-inset-top));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: auto;
}
.picker__top .picker__hint { position: static; transform: none; }
.picker__villages {
  display: flex; gap: 4px; padding: 4px;
  border-radius: 999px; background: #fff; box-shadow: 0 8px 20px rgba(42, 15, 61, .18);
}
.picker__villages button {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.picker__villages button[aria-checked="true"] { background: var(--ink); color: #fff; }
.picker__bar .btn:disabled { opacity: .5; }

/* Адрес под меткой в режиме выбора точки */
.picker__addr {
  width: 100%; padding: 10px 12px 12px 16px;
  border-radius: 18px; background: #fff; box-shadow: 0 8px 20px rgba(42, 15, 61, .18);
}
.picker__addr small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.picker__addr-row { display: flex; align-items: center; gap: 10px; }
.picker__addr-row b { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; }
.picker__addr-row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 12px;
  border-radius: 12px; border: 1.5px solid var(--ink); outline: 0;
  font-size: 16px; font-weight: 600;
}
.picker__addr-row button {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--lilac); color: var(--ink); font-weight: 700; font-size: 14px;
}

.picker__suggest {
  margin: 8px -4px 0 -8px; max-height: 38vh; overflow-y: auto;
  box-shadow: none;
}

.picker__hint {
  position: absolute; top: calc(28px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 48px);
  padding: 10px 16px; border-radius: 14px;
  background: var(--ink); color: #fff;
  text-align: center; font-size: 14px; font-weight: 500;
}
.picker__pin {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 6px 8px rgba(42, 15, 61, .3));
}
.picker__bar {
  position: absolute; left: 24px; right: 24px; bottom: calc(28px + var(--safe-b));
  display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
  pointer-events: auto;
}
.picker__bar .btn + .btn { margin-top: 0; }
.picker__bar .btn--light { background: #fff; }

/* ======================= Маршрут на весь экран ======================= */
.map-full-bar {
  position: absolute; left: 24px; right: 24px; bottom: calc(28px + var(--safe-b));
  z-index: 15;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: 22px; background: var(--ink); color: #fff;
}
.map-full-bar__info { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.map-full-bar__info b { font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.map-full-bar__info span { font-size: 14px; color: #d9cbe8; }
.map-full-bar .btn { width: auto; min-width: 120px; }

/* ======================= Страницы ======================= */
.page {
  position: absolute; inset: 0; z-index: 12;
  overflow-y: auto;
  padding: calc(28px + env(safe-area-inset-top)) 16px calc(100px + var(--safe-b));
  background: var(--bg);
}
.page__title {
  margin: 0 4px 18px;
  font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.4px;
}
.page__fine { margin: 14px 8px 0; text-align: center; font-size: 13px; color: var(--muted); }
.group-label { margin: 6px 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.card {
  margin-bottom: 16px; padding: 16px;
  border-radius: 22px; background: #fff; border: 1px solid var(--line);
}

/* Заказы */
.order {
  display: flex; flex-direction: column;
  margin-bottom: 12px; padding: 18px;
  border-radius: 24px; background: #fff; border: 1px solid var(--line);
}
.order__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order__date { font-size: 13px; font-weight: 600; color: var(--muted); }
.order__status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: #fff1d6; color: #6b4300; font-size: 12px; font-weight: 700;
}
.order__status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c98300; }
.order__addr { font-size: 16px; font-weight: 700; line-height: 1.3; }
.order__meta { margin-top: 4px; font-size: 14px; color: var(--muted); }
.order__meta b { font-family: var(--display); color: var(--ink); }
.order .btn { min-height: 48px; margin-top: 14px; font-size: 15px; border-radius: 16px; }

.empty { padding: 10px 12px 36px; text-align: center; }
.empty__image {
  display: block; width: 180px; height: 180px; margin: -8px auto -8px;
  object-fit: contain; user-select: none; pointer-events: none;
}
.empty h3 { margin: 0 0 6px; font-family: var(--display); font-size: 20px; }
.empty p { margin: 0 0 18px; color: var(--muted-2); }

/* Профиль */
.profile-card { display: flex; align-items: center; gap: 16px; padding: 4px 4px 22px; }
.profile-card b { display: block; font-size: 20px; font-weight: 700; }
.profile-card small { font-size: 15px; color: var(--muted-2); }
.avatar {
  display: grid; place-items: center; flex: none;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--ink); color: #fff;
  font-family: var(--display); font-size: 26px; font-weight: 700;
}
.home-row { display: flex; align-items: center; gap: 12px; }
.home-row__ico {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px; background: var(--lilac); font-size: 18px;
}
img.home-row__ico { object-fit: contain; background: var(--lilac); padding: 2px; }
.home-row__addr { flex: 1; min-width: 0; font-weight: 600; }
.home-row .link-btn { min-height: 44px; padding: 0 4px; color: var(--err); font-weight: 600; font-size: 14px; }
.muted { margin: 0; color: var(--muted); font-size: 14px; }
.home-empty { display: flex; align-items: center; gap: 10px; margin: -8px 0; }
.home-empty > img { flex: none; width: 92px; height: 92px; object-fit: contain; margin: -8px 0; }
.home-empty > div { min-width: 0; }
.home-empty b { display: block; margin-bottom: 3px; font-size: 15px; }

/* Помощь */
.steps3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.steps3 div {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
}
.steps3 span { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--accent-text); }
.steps3 b { font-size: 14px; line-height: 1.25; }

.tariff-card {
  display: flex; flex-direction: column;
  padding: 18px; margin-bottom: 16px;
  border-radius: 24px; background: var(--ink); color: #fff;
}
.tariff-card small { font-size: 13px; color: #d9cbe8; margin-bottom: 4px; }
#villagesBox span + span::before { content: ' и '; }
.tariff-card__title { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.tariff div { display: flex; justify-content: space-between; padding: 9px 0; font-size: 15px; }
.tariff div + div { border-top: 1px solid #4a2c60; }
.tariff span { color: #e4d8ef; }
.tariff b { font-weight: 600; }

.faq { padding: 0 16px; }
.faq__item + .faq__item { border-top: 1px solid #f3edf8; }
.faq__item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 0;
  font-size: 15px; font-weight: 700; list-style: none; cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+'; flex: none;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--lilac); color: var(--ink);
  font-size: 18px; font-weight: 700; line-height: 1;
}
.faq__item[open] summary::after { content: '−'; background: var(--ink); color: #fff; }
.faq__item p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted-2); }

/* ======================= Нижнее меню ======================= */
.tabbar {
  position: absolute; left: 16px; right: 16px; bottom: calc(16px + var(--safe-b));
  z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  height: 64px; padding: 6px;
  border-radius: 32px; background: var(--ink);
  box-shadow: 0 12px 30px rgba(42, 15, 61, .28);
}
.app.no-tabbar .tabbar { display: none; }
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 26px; color: #d9cbe8;
  font-size: 11px; font-weight: 600;
  transition: background .2s, color .2s;
}
.tab svg { width: 22px; height: 22px; }
.tab.is-active { background: var(--accent); color: #fff; }
.tab__badge {
  position: absolute; top: 3px; right: calc(50% - 22px);
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font: 700 10px/18px 'Onest', sans-serif; font-style: normal; text-align: center;
}
.tab.is-active .tab__badge { background: #fff; color: var(--accent-text); }

/* Уведомление */
.toast {
  position: absolute; left: 16px; right: 16px; top: calc(20px + env(safe-area-inset-top));
  z-index: 40;
  padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 500; text-align: center;
  animation: stepIn .25s ease;
}

/* Активные / Архив */
.orders-switch {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px;
  padding: 4px; margin-bottom: 14px; border-radius: 16px; background: var(--lilac);
}
.orders-switch button { min-height: 44px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--ink); }
.orders-switch button[aria-selected="true"] { background: #fff; box-shadow: 0 2px 8px rgba(42, 15, 61, .1); }
.orders-switch span { color: var(--muted); }
.order__actions { display: flex; gap: 8px; margin-top: 14px; }
.order__actions .btn { flex: 1; margin-top: 0 !important; min-width: 0; }
.order__arch {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 14px; border-radius: 16px;
  border: 1.5px solid var(--lilac-2); color: var(--ink); font-weight: 600; font-size: 14px;
}
.order--archived { opacity: .85; }
.order__status--archived { background: var(--lilac); color: var(--muted); }
.order__status--archived::before { background: var(--muted); }

.nowrap { white-space: nowrap; }

/* Узкие экраны (320–359 px) */
@media (max-width: 359px) {
  .order__arch-t { display: none; }
  .order__arch { padding: 0 12px; }
  .btn-row .btn, .picker__bar .btn { font-size: 15px; padding: 0 10px; }
  .price-card__price { font-size: 34px; }
  .km-chip { font-size: 13px; padding: 6px 10px; }
}
.price-card__price, .km-chip { white-space: nowrap; }

/* Невысокие экраны (iPhone SE, маленькие Android) */
@media (max-height: 700px) {
  .map { min-height: 150px; margin-top: 10px; }
  .sheet { padding-top: 12px; }
  .title { margin-bottom: 4px; }
  .subtitle { font-size: 14px; margin-bottom: 10px; }
  .segment { margin-bottom: 8px; }
  .segment .chip { min-height: 40px; }
  .field { min-height: 52px; }
  .field input { padding: 12px 0; }
  .alt-actions { margin-top: 4px; gap: 0 16px; }
  .text-btn { min-height: 40px; font-size: 14px; }
  .head { margin-bottom: 10px; }
  .back-btn { width: 44px; height: 44px; }
  .price-card__row { margin-bottom: 10px; }
  .price-card__price { font-size: 36px; }
  .timeline { padding: 12px 14px; }
  .hint { margin-bottom: 10px; }
  .btn--big { min-height: 54px; font-size: 17px; }
}

/* ======================= Возврат товара ======================= */
.order__return {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 44px; margin-top: 8px;
  border-radius: 14px;
  color: var(--accent-text, #a00d87); font-size: 15px; font-weight: 600;
}
.order__return:active { background: var(--lilac, #efe7f6); }

.order__ret {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 10px 10px 12px;
  border-radius: 16px; background: #fbe6f6;
}
.order__ret-ico {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: #fff; color: var(--accent-text, #a00d87);
}
.order__ret-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.order__ret-body b { font-size: 14px; }
.order__ret-body small { font-size: 12px; color: var(--muted, #6e6380); }
.order__ret button {
  flex: none; padding: 8px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--muted-2, #5b4f6e);
}

.rt {
  position: absolute; inset: 0; z-index: 35;
  display: flex; align-items: flex-end;
  background: rgba(42, 15, 61, .45);
  animation: rtFade .2s ease;
}
.rt__panel {
  width: 100%; max-height: 92%; overflow-y: auto;
  padding: 20px 18px calc(18px + var(--safe-b, 0px));
  border-radius: 28px 28px 0 0; background: var(--bg, #faf8fc);
  animation: rtUp .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes rtFade { from { opacity: 0; } }
@keyframes rtUp { from { transform: translateY(40px); opacity: .4; } }

.rt__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.rt__head > div { flex: 1; min-width: 0; }
.rt__head h3 { margin: 0; font-family: var(--display, inherit); font-size: 21px; font-weight: 700; }
.rt__head small {
  display: block; margin-top: 4px; font-size: 13px; color: var(--muted, #6e6380);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt__close {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--lilac, #efe7f6); color: var(--ink, #2a0f3d);
}
.rt__label { margin: 0 4px 8px; font-size: 13px; font-weight: 600; color: var(--muted, #6e6380); }

.rt__types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.rt__type {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px; border-radius: 18px; text-align: left;
  background: #fff; border: 2px solid var(--line, #ece4f4);
  transition: border-color .15s, background .15s;
}
.rt__type::before {
  content: ''; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 12px;
  background: var(--lilac, #efe7f6) center / 20px no-repeat;
}
.rt__type--fit::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a0f3d' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M8 3 3 6l2 5 2-1v11h10V10l2 1 2-5-5-3a4 4 0 0 1-8 0Z'/%3E%3C/svg%3E");
}
.rt__type--defect::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a0f3d' stroke-width='2' stroke-linejoin='round' stroke-linecap='round'%3E%3Cpath d='M3 7.5 12 3l9 4.5v9L12 21l-9-4.5z'/%3E%3Cpath d='m10 9 3 3-2 2 3 3'/%3E%3C/svg%3E");
}
.rt__type b { font-size: 16px; font-weight: 700; color: var(--ink, #2a0f3d); }
.rt__type small { font-size: 13px; line-height: 1.3; color: var(--muted, #6e6380); }
.rt__type[aria-checked="true"] { border-color: var(--accent, #cb11ab); background: #fdf3fb; }
.rt__type[aria-checked="true"]::before { background-color: #fff; }

.rt__rules { animation: rtFade .2s ease; }
.rt__steps {
  margin: 0 0 14px; padding: 6px 14px; list-style: none; counter-reset: rt;
  border-radius: 18px; background: #fff; border: 1px solid var(--line, #ece4f4);
}
.rt__steps li {
  position: relative; counter-increment: rt;
  padding: 10px 0 10px 40px; font-size: 15px; line-height: 1.35;
}
.rt__steps li + li { border-top: 1px solid var(--line, #ece4f4); }
.rt__steps li::before {
  content: counter(rt);
  position: absolute; left: 0; top: 8px;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink, #2a0f3d); color: #fff;
  font-size: 13px; font-weight: 700;
}

.rt__warn {
  display: flex; gap: 10px; align-items: flex-start;
  margin-bottom: 16px; padding: 12px 14px;
  border-radius: 16px; background: #fff1d6; color: #6b4300;
}
.rt__warn svg { flex: none; margin-top: 1px; }
.rt__warn p { margin: 0; font-size: 14px; line-height: 1.4; }
.rt__warn b { color: #4d3000; }

.rt__check { display: flex; align-items: flex-start; gap: 10px; margin: 0 4px 16px; }
.rt__check input {
  flex: none; width: 22px; height: 22px; margin: 0;
  accent-color: var(--accent, #cb11ab);
}
.rt__check label { font-size: 15px; font-weight: 600; line-height: 1.35; cursor: pointer; }

/* В режиме выбора точки верх занят панелью сёл — «Слои» переезжают вниз, над кнопками, меню открывается вверх */
.app.picking .layers { top: auto; bottom: calc(82px + var(--safe-b, 0px)); }
.app.picking .layers__menu { top: auto; bottom: 52px; }

/* ======================= Подсказки ======================= */
.toast { white-space: pre-line; }
.tip {
  position: relative;
  margin: 12px 2px 0; padding-left: 26px;
  font-size: 13px; line-height: 1.4; color: var(--muted-2);
}
.tip::before {
  content: 'i';
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--lilac); color: var(--ink);
  font: italic 700 11px/1 Georgia, serif;
}
.tip b { color: var(--ink); }
.step[data-step="order"] .tip[data-tip] { margin: 0 2px 12px; }

/* ======================= Посылки и оплата ======================= */
.bulky {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 18px; padding: 14px;
  border-radius: 18px; background: #fff1d6; color: #6b4300;
}
.bulky__ico { flex: none; color: #c98300; }
.bulky p { margin: 0; font-size: 14px; line-height: 1.4; }
.bulky b { display: block; margin-bottom: 2px; font-size: 15px; color: #4d3000; }

.pay { margin-bottom: 18px; }
.pay > .input__label { display: block; margin-bottom: 6px; }
.pay__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay__opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px; border-radius: 18px; text-align: left;
  background: #fff; border: 2px solid var(--line);
  transition: border-color .15s, background .15s;
}
.pay__opt svg { margin-bottom: 6px; color: var(--ink); }
.pay__opt b { font-size: 16px; font-weight: 700; }
.pay__opt small { font-size: 13px; color: var(--muted); }
.pay__opt[aria-checked="true"] { border-color: var(--accent); background: #fdf3fb; }
.pay__opt[aria-checked="true"] svg { color: var(--accent-text); }
.pay.is-error .pay__opt { border-color: #f1b6c6; }
.pay > .input__error { display: block; margin-top: 6px; }

.pay__panel {
  margin-top: 10px; padding: 14px;
  border-radius: 20px; background: #fff; border: 1px solid var(--line);
  animation: stepIn .2s ease;
}
.pay__panel .tip { margin-top: 10px; }
.pay__q { display: block; margin: 0 2px 6px; font-size: 14px; font-weight: 600; }
.pay__panel .segment { margin-bottom: 0; }
#changeBox { margin-top: 12px; }

.req { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 16px; background: var(--lilac); }
.req__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req__body small { font-size: 12px; color: var(--muted-2); }
.req__body b { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }
.req__copy {
  flex: none; min-height: 40px; padding: 0 12px; border-radius: 12px;
  background: #fff; font-size: 14px; font-weight: 700; color: var(--accent-text);
}

.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-bottom: 10px; }
.preset {
  min-height: 42px; padding: 0 6px; border-radius: 999px;
  border: 1.5px solid var(--lilac-2); background: #fff; white-space: nowrap;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.preset[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.input--rub { margin-bottom: 0; }
.input--rub input { min-height: 48px; padding: 10px 14px; font-size: 16px; }

/* ======================= Готово: что дальше ======================= */
.todo { margin-bottom: 16px; }
.todo__label { margin: 0 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.todo__list { margin: 0; padding: 0; list-style: none; counter-reset: todo; }
.todo__item {
  position: relative; counter-increment: todo;
  margin-bottom: 10px; padding: 14px 14px 14px 56px;
  border-radius: 20px; background: #fff; border: 1.5px solid var(--accent);
}
.todo__item::before {
  content: counter(todo);
  position: absolute; left: 14px; top: 13px;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 700;
}
.todo__item b { display: block; font-size: 16px; line-height: 1.3; }
.todo__item p { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted-2); }
.todo__item p b { display: inline; font-size: inherit; color: var(--ink); }
.todo__item .btn { min-height: 48px; margin-top: 12px; font-size: 15px; border-radius: 14px; }
.todo__item--info { border-color: var(--line); }
.todo__item--info::before { background: var(--lilac); color: var(--ink); }
.todo__item.is-done { border-color: #bfe3cd; }
.todo__item.is-done::before { content: '✓'; background: var(--ok); }
.btn--wa-done { background: #e6f4ec; color: var(--ok); }
.todo__item .btn--wa, .order .btn--wa { margin-top: 12px; }

/* ======================= Статус заказа ======================= */
.order__date b { color: var(--ink); }
.order__status--new { background: #fff1d6; color: #6b4300; }
.order__status--confirmed, .order__status--picked { background: #e9e3fb; color: #3b2a8a; }
.order__status--confirmed::before, .order__status--picked::before { background: #5b45d6; }
.order__status--on_way { background: #fbe6f6; color: var(--accent-text); }
.order__status--on_way::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.order__status--delivered { background: #e3f4ea; color: #17673a; }
.order__status--delivered::before { background: var(--ok); }
.order__status--cancelled { background: #f6e3e8; color: #9c1b3d; }
.order__status--cancelled::before { background: var(--err); }
.order--cancelled .order__addr, .order--cancelled .order__meta { opacity: .6; }

.track {
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  margin: 14px 0 0; padding: 0; list-style: none;
}
.track li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.track li::before {
  content: ''; position: absolute; top: 6px; right: 50%; width: 100%; height: 3px;
  background: var(--lilac-2);
}
.track li:first-child::before { display: none; }
.track li.is-past::before, .track li.is-now::before { background: var(--accent); }
.track i {
  position: relative; z-index: 1;
  width: 15px; height: 15px; border-radius: 50%;
  background: #fff; border: 3px solid var(--lilac-2);
}
.track li.is-past i { background: var(--accent); border-color: var(--accent); }
.track li.is-now i { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px #fbe6f6; }
.track span { font-size: 11px; font-weight: 600; color: var(--muted); line-height: 1.2; }
.track li.is-now span { color: var(--ink); font-weight: 700; }

.order__pay { margin-top: 2px; font-size: 14px; color: var(--muted); }
.order__hint { margin: 10px 0 0; font-size: 14px; color: var(--muted-2); }

.order__remind {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 12px 12px 12px 14px;
  border-radius: 16px; background: #e6f4ec; color: #17673a;
  font-size: 15px; font-weight: 700;
}
.order__remind span { flex: 1; min-width: 0; }
.order__remind:active { transform: scale(.99); }

.order__links { display: flex; justify-content: center; gap: 4px 20px; flex-wrap: wrap; margin-top: 6px; }
.order__links a, .order__links button {
  min-height: 40px; display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 600; color: var(--muted-2);
}
.order__links a { color: var(--ok); }
.order__ret--off { opacity: .7; }
