/* ============================================================
   Топливный радар — ночной приборный HUD для поиска топлива в ЛНР
   Мобайл-фёрст. Тёмная тактическая карта, статусы-блипы.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* ---- Поверхности: глубокий приборный сине-зелёный ---- */
  --bg:        oklch(0.17 0.018 220);
  --bg-deep:   oklch(0.13 0.018 220);
  --surface:   oklch(0.22 0.020 222);
  --surface-2: oklch(0.27 0.022 222);
  --surface-3: oklch(0.32 0.024 222);
  --hairline:  oklch(0.40 0.020 222 / 0.5);
  --hairline-strong: oklch(0.55 0.030 222 / 0.6);

  /* ---- Текст ---- */
  --ink:       oklch(0.97 0.006 220);
  --ink-soft:  oklch(0.86 0.010 220);
  --muted:     oklch(0.74 0.018 222);   /* ≥4.5:1 на --surface */
  --faint:     oklch(0.62 0.018 222);

  /* ---- Акцент интерфейса (НЕ статус): фирменный топливный жёлтый ---- */
  --accent:        oklch(0.87 0.128 96);
  --accent-strong: oklch(0.81 0.135 95);
  --accent-ink:    oklch(0.22 0.04 80);
  --accent-glow:   oklch(0.87 0.128 96 / 0.34);

  /* ---- Семантика статусов (зарезервированы под смысл) ---- */
  /* «возможно» — янтарь/оранжевый, чтобы не сливаться с фирменным жёлтым */
  --green:  oklch(0.82 0.17 152);
  --green-d:oklch(0.50 0.10 152);
  --yellow: oklch(0.78 0.15 62);
  --yellow-d:oklch(0.52 0.12 55);
  --red:    oklch(0.66 0.20 27);
  --red-d:  oklch(0.45 0.14 27);
  --gray:   oklch(0.64 0.012 222);
  --gray-d: oklch(0.42 0.012 222);

  /* ---- Радиусы / тени ---- */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;
  --shadow-sheet: 0 -8px 40px oklch(0.08 0.02 220 / 0.6);
  --shadow-pop:   0 8px 30px oklch(0.08 0.02 220 / 0.5);
  --shadow-fab:   0 6px 22px oklch(0.08 0.02 220 / 0.55), 0 0 0 1px var(--hairline);

  /* ---- Z-шкала (семантическая) ---- */
  --z-map: 0;
  --z-overlay: 5;
  --z-chrome: 20;
  --z-fab: 30;
  --z-backdrop: 40;
  --z-sheet: 50;
  --z-toast: 70;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);          /* ease-out-quint */
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; height: 100%;
  overscroll-behavior: none;
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Доступно скринридерам/краулерам, скрыто визуально */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================
   Каркас
   ============================================================ */
.app { position: fixed; inset: 0; overflow: hidden; }

/* ---- Карта ---- */
#map { position: absolute; inset: 0; z-index: var(--z-map); background: var(--bg-deep); }

/* Тактический дуотон: красим ТОЛЬКО подложку (тайлы),
   блипы-маркеры остаются настоящего цвета. */
ymaps [class*='-ground-pane'] {
  filter: invert(0.92) hue-rotate(176deg) saturate(0.55) brightness(0.96) contrast(0.92) sepia(0.22) hue-rotate(150deg) saturate(1.35);
}
/* Прячем стандартный балун/хинт яндекса — у нас своя карточка */
ymaps [class*='-balloon'], ymaps [class*='-hint'] { display: none !important; }
ymaps [class*='-copyright'] { filter: invert(0.9) hue-rotate(180deg); opacity: 0.5; }

/* Оверлеи поверх карты: виньетка + сетка-«радар». Не ловят клики. */
.map-fx {
  position: absolute; inset: 0; z-index: var(--z-overlay); pointer-events: none;
}
.map-fx::before { /* виньетка */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(125% 95% at 50% 42%, transparent 55%, oklch(0.10 0.02 220 / 0.55) 100%);
}
.map-fx::after { /* тонкая координатная сетка */
  content: ''; position: absolute; inset: 0; opacity: 0.09;
  background-image:
    linear-gradient(oklch(0.82 0.09 96 / 0.55) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.82 0.09 96 / 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 45%, black 30%, transparent 80%);
  mask-image: radial-gradient(120% 90% at 50% 45%, black 30%, transparent 80%);
}

/* ============================================================
   Маркеры-блипы
   ============================================================ */
.blip {
  position: relative; width: 0; height: 0;
  /* якорь маркера ставится в (0,0); рисуем от центра вверх */
}
.blip__dot {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid oklch(0.18 0.02 220 / 0.85);
  box-shadow: 0 2px 6px oklch(0.08 0.02 220 / 0.7);
  display: grid; place-items: center;
  transition: transform 0.18s var(--ease);
}
.blip__ring {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; transform: translate(-50%, -50%);
  border-radius: 50%;
}
.blip__label {
  position: absolute; left: 50%; bottom: calc(50% + 16px);
  transform: translateX(-50%);
  font: 600 10px/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
  padding: 2px 6px; border-radius: var(--r-pill);
  background: oklch(0.16 0.02 220 / 0.92);
  color: var(--ink-soft);
  border: 1px solid var(--hairline);
  white-space: nowrap; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.blip__plus {
  position: absolute; left: calc(50% + 9px); top: calc(50% - 16px);
  font: 700 9px/1 'IBM Plex Mono', monospace;
  color: var(--accent); background: oklch(0.16 0.02 220 / 0.95);
  border-radius: var(--r-pill); padding: 1px 4px; border: 1px solid var(--hairline);
}
.blip__warn {
  position: absolute; left: calc(50% + 7px); top: calc(50% + 4px);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--yellow); color: oklch(0.25 0.05 80);
  font: 800 10px/14px 'Inter'; text-align: center;
  border: 1.5px solid oklch(0.16 0.02 220);
}

/* Тоны */
.t-green  .blip__dot { background: var(--green);  }
.t-yellow .blip__dot { background: var(--yellow); }
.t-red    .blip__dot { background: var(--red);    }
.t-gray   .blip__dot { background: var(--gray);   }
.t-green  .blip__ring { box-shadow: 0 0 0 0 var(--green); }
.t-yellow .blip__ring { box-shadow: 0 0 0 0 var(--yellow); }
.t-red    .blip__ring { box-shadow: 0 0 0 0 var(--red); }

/* Пульс «живых» данных: чем свежее, тем заметнее (через --pulse). */
@keyframes radar {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: var(--pulse, 0.5); }
  70%  { box-shadow: 0 0 0 16px transparent; opacity: 0; }
  100% { box-shadow: 0 0 0 16px transparent; opacity: 0; }
}
.blip.is-live .blip__ring {
  animation: radar 2.4s var(--ease-soft) infinite;
}
.t-green  .blip.is-live .blip__ring,
.blip.is-live.t-green  .blip__ring { color: var(--green); }
.blip.is-live.t-yellow .blip__ring { color: var(--yellow); }
.blip.is-live.t-red    .blip__ring { color: var(--red); }

/* Нет данных: мельче, тише, на фоне — не отвлекает от «живых» точек */
.blip.is-nodata .blip__dot { width: 13px; height: 13px; opacity: 0.62; border-width: 1.5px; }
.blip.is-nodata { z-index: 1 !important; }

.blip.is-active .blip__dot { transform: translate(-50%, -50%) scale(1.35); }
.blip.is-active .blip__dot { box-shadow: 0 0 0 4px var(--accent-glow), 0 2px 8px oklch(0.08 0.02 220 / 0.8); }
.blip.is-closed .blip__dot { opacity: 0.55; border-style: dashed; }

/* ============================================================
   Верхняя панель: бренд + фильтр топлива
   ============================================================ */
.chrome-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: var(--z-chrome);
  padding: calc(var(--safe-t) + 10px) 12px 8px;
  background: linear-gradient(180deg, oklch(0.13 0.02 220 / 0.92) 0%, oklch(0.13 0.02 220 / 0.55) 70%, transparent 100%);
  pointer-events: none;
}
.chrome-top > * { pointer-events: auto; }

.brand {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  padding: 0 2px;
}
.brand__logo { height: 40px; width: auto; display: block; flex: none; }
@media (max-width: 360px) { .brand__logo { height: 36px; } }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-strong));
  display: grid; place-items: center;
  box-shadow: 0 0 16px var(--accent-glow), inset 0 0 0 1px oklch(1 0 0 / 0.15);
}
.brand__mark svg { width: 18px; height: 18px; display: block; }
.brand__name { font-weight: 800; font-size: 16px; letter-spacing: 0.01em; }
.brand__name b { color: var(--accent); font-weight: 800; }
.brand__sub { font-size: 11px; color: var(--muted); margin-top: -2px; }
/* Кнопки действий в шапке: уведомления + установка */
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.head-btn {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: oklch(0.24 0.02 222 / 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); color: var(--ink-soft);
  transition: background 0.16s, color 0.16s, transform 0.1s;
}
.head-btn svg { width: 19px; height: 19px; }
.head-btn:active { transform: scale(0.92); }
.head-btn--accent, .head-btn.is-on {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Индикатор свежести в шапке списка */
.stations__head .freshness { margin-top: 10px; }

/* Модалка-инструкция (установка/уведомления на iPhone) */
.howto {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 20px; background: oklch(0.06 0.02 220 / 0.66); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.howto[hidden] { display: none; }
.howto__card {
  width: min(92vw, 380px); background: var(--surface); border: 1px solid var(--hairline-strong);
  border-radius: 18px; padding: 20px 18px 16px; box-shadow: 0 24px 60px oklch(0.05 0.02 220 / 0.7);
}
.howto__body { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.howto__body b { color: var(--ink); }
.howto__body p { margin-top: 8px; }
.howto__ok {
  margin-top: 16px; width: 100%; height: 44px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}

/* Индикатор свежести данных — главный сигнал доверия */
.freshness {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 11px 0 9px; border-radius: var(--r-pill);
  background: oklch(0.24 0.02 222 / 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  font: 600 11.5px/1 'Inter', system-ui, sans-serif; color: var(--ink-soft);
  white-space: nowrap; transition: border-color 0.16s, color 0.16s, transform 0.1s;
}
.freshness:active { transform: scale(0.95); }
.freshness__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.freshness.is-fresh { color: var(--green); border-color: oklch(0.7 0.16 150 / 0.5); }
.freshness.is-fresh .freshness__dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2s var(--ease-soft) infinite; }
.freshness.is-aging { color: var(--yellow); border-color: oklch(0.78 0.15 62 / 0.45); }
.freshness.is-aging .freshness__dot { background: var(--yellow); box-shadow: 0 0 7px oklch(0.78 0.15 62 / 0.7); }
.freshness.is-stale { color: var(--muted); }
.freshness.is-stale .freshness__dot { background: var(--muted); }
.freshness.is-syncing .freshness__dot { animation: spin 0.8s linear infinite; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Заголовок-действие у фильтра топлива */
.filters__lead {
  position: sticky; left: 0; z-index: 2; flex: none;
  display: inline-flex; align-items: center; padding: 0 9px 0 3px;
  font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap;
  background: linear-gradient(90deg, oklch(0.14 0.02 220) 0%, oklch(0.14 0.02 220) 62%, transparent 100%);
}

/* Фильтр-чипы */
.filters {
  display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: var(--r-pill);
  background: oklch(0.24 0.02 222 / 0.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.1s;
}
.chip:active { transform: scale(0.95); }
.chip[aria-pressed='true'] {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
.chip .cnt {
  font: 600 11px/1 'IBM Plex Mono', monospace;
  padding: 2px 5px; border-radius: var(--r-pill);
  background: oklch(0.16 0.02 220 / 0.4);
}
.chip[aria-pressed='true'] .cnt { background: oklch(0.18 0.03 220 / 0.25); color: var(--accent-ink); }

/* Карточки городов — быстрый переход по карте */
.cities {
  display: flex; gap: 7px; overflow-x: auto; padding: 7px 2px 2px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cities::-webkit-scrollbar { display: none; }
.city-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: oklch(0.2 0.02 222 / 0.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: border-color 0.16s, color 0.16s, background 0.16s, transform 0.1s;
}
.city-chip svg { width: 13px; height: 13px; opacity: 0.7; }
.city-chip:active { transform: scale(0.94); }
.city-chip[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); background: oklch(0.24 0.03 90 / 0.4); }
.city-chip .n { font: 600 10px/1 'IBM Plex Mono', monospace; opacity: 0.65; }
.city-chip.is-empty { opacity: 0.66; }                 /* город без АЗС — приглушён */
/* Ряды фильтров/городов прокручиваются мышью (drag/колесо) — без выделения текста */
.filters, .cities { user-select: none; -webkit-user-select: none; }

/* ============================================================
   Правые круглые кнопки + легенда
   ============================================================ */
.map-tools {
  position: absolute; right: 12px; z-index: var(--z-chrome);
  bottom: calc(var(--safe-b) + 96px);
  display: flex; flex-direction: column; gap: 10px;
}
.tool {
  width: 46px; height: 46px; border-radius: 14px;
  background: oklch(0.26 0.024 222 / 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline-strong); color: var(--ink);
  display: grid; place-items: center; box-shadow: var(--shadow-pop);
  transition: transform 0.1s, background 0.16s, color 0.16s;
}
.tool:active { transform: scale(0.92); }
.tool svg { width: 22px; height: 22px; }
.tool.is-on { color: var(--accent); border-color: var(--accent); }
.tool.is-locating svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Список АЗС (правая панель / мобильный ящик)
   ============================================================ */
.stations {
  position: fixed; top: 0; right: 0; z-index: var(--z-sheet);
  width: min(87vw, 360px); height: 100dvh;
  display: flex; flex-direction: column;
  background: oklch(0.19 0.02 222 / 0.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -12px 0 40px oklch(0.08 0.02 220 / 0.5);
  transform: translateX(100%); transition: transform 0.36s var(--ease);
  padding-top: var(--safe-t);
}
.stations.is-open { transform: none; }
.stations__head { padding: 14px 14px 10px; border-bottom: 1px solid var(--hairline); flex: none; }
.stations__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.stations__title .mono { font-size: 12px; color: var(--muted); font-weight: 500; }
.st-add {
  display: none; /* добавлять АЗС может только админ (?admin=1) */
  margin-left: auto; height: 28px; padding: 0 11px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.is-admin .st-add { display: inline-block; }
.st-add:active { transform: scale(0.95); }
.stations__close { margin-left: 8px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
body:not(.is-admin) .stations__close { margin-left: auto; }
.stations__close svg { width: 17px; height: 17px; }
.stations__search {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink);
  font-family: inherit; font-size: 13px;
}
.stations__search::placeholder { color: var(--faint); }
.stations__search:focus { border-color: var(--accent); outline: none; }
.stations__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.stations__list::-webkit-scrollbar { width: 6px; }
.stations__list::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 6px; }
.stations__empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* Лента сообщества по городу */
.feed {
  position: fixed; top: 0; right: 0; z-index: var(--z-sheet);
  width: min(87vw, 360px); height: 100dvh;
  display: flex; flex-direction: column;
  background: oklch(0.19 0.02 222 / 0.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-left: 1px solid var(--hairline-strong);
  box-shadow: -12px 0 40px oklch(0.08 0.02 220 / 0.5);
  transform: translateX(100%); transition: transform 0.36s var(--ease);
  padding-top: var(--safe-t);
}
.feed.is-open { transform: none; }
.feed__head { padding: 14px 14px 10px; border-bottom: 1px solid var(--hairline); flex: none; }
.feed__title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.feed__city {
  height: 30px; padding: 0 8px; border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--hairline); color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600;
}
.feed__title .stations__close { margin-left: auto; }
.feed__hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.feed__list { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px; display: flex; flex-direction: column; gap: 7px; }
.feed__list::-webkit-scrollbar { width: 6px; }
.feed__list::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 6px; }
.feed__empty { margin: auto; padding: 24px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.feed-msg { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 9px 11px; }
.feed-msg p { font-size: 13.5px; color: var(--ink); word-wrap: break-word; overflow-wrap: anywhere; }
.feed-msg__time { display: block; margin-top: 4px; font-size: 10.5px; color: var(--faint); }
.feed__form { flex: none; display: flex; gap: 8px; padding: 10px calc(10px) calc(10px + var(--safe-b, 0px)); border-top: 1px solid var(--hairline); }
.feed__input { flex: 1; height: 40px; padding: 0 13px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink); font-family: inherit; font-size: 13.5px; }
.feed__input:focus { border-color: var(--accent); outline: none; }
.feed__send { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.feed__send:active { transform: scale(0.93); }
.feed__send svg { width: 18px; height: 18px; }

/* Кнопка подписки на пуши «о появлении топлива» */
.notify-btn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 10px 10px 0; padding: 11px 14px; border-radius: var(--r-pill);
  background: oklch(0.24 0.02 222 / 0.8); border: 1px solid var(--hairline);
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
}
.notify-btn:active { transform: scale(0.97); }
.notify-btn svg { width: 17px; height: 17px; }
.notify-btn.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }

/* Кнопка установки PWA — над контактом */
.install-btn {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 8px 10px 0; padding: 11px 14px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13.5px;
  box-shadow: 0 0 18px var(--accent-glow);
}
.install-btn:active { transform: scale(0.97); }
.install-btn svg { width: 17px; height: 17px; }

/* Контакт автора — закреплён внизу панели списка */
.contact {
  flex: none; display: flex; align-items: center; gap: 9px;
  padding: 12px 14px calc(12px + var(--safe-b, 0px));
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft); font-size: 12.5px; line-height: 1.3;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.contact:hover { color: var(--ink); background: oklch(0.24 0.03 90 / 0.18); }
.contact__icon {
  flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%;
  color: var(--accent-ink); background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}
.contact__text b { color: var(--accent); font-weight: 700; }

/* Плашка цен сети БензОН (официальный источник) — в шапке списка */
.bz-strip { margin-top: 10px; padding: 9px 10px; border-radius: var(--r-md); background: oklch(0.22 0.02 222 / 0.7); border: 1px solid var(--hairline); }
.bz-strip__h { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 7px; display: flex; align-items: center; gap: 6px; }
.bz-strip__h b { color: var(--accent); font-weight: 700; }
.bz-strip__h a { margin-left: auto; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
.bz-strip__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bz-chip { font: 600 12px/1 'Inter', system-ui, sans-serif; color: var(--ink-soft); background: oklch(0.16 0.02 220 / 0.6); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 5px 9px; white-space: nowrap; }
.bz-chip b { color: var(--accent); font-weight: 700; margin-right: 3px; }

/* Блок цены на карточке БензОН-АЗС */
.benzon-card { margin: 4px 0 14px; padding: 12px 13px; border-radius: var(--r-md); background: linear-gradient(180deg, oklch(0.26 0.05 95 / 0.18), oklch(0.22 0.02 222 / 0.5)); border: 1px solid oklch(0.6 0.1 95 / 0.35); }
.benzon-card__h { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.benzon-card__list { display: flex; flex-wrap: wrap; gap: 7px; }
.bz-price { font: 600 13px/1 'Inter', system-ui, sans-serif; color: var(--ink); background: oklch(0.16 0.02 220 / 0.5); border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 6px 11px; }
.bz-price b { color: var(--accent); font-weight: 700; margin-right: 4px; }
.benzon-card__src { display: inline-block; margin-top: 9px; font-size: 11px; color: var(--muted); }
.src-net { color: var(--accent); font-weight: 600; }

.st-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid transparent;
  transition: background 0.14s, border-color 0.14s, transform 0.08s;
}
.st-item:hover { background: var(--surface-3); }
.st-item:active { transform: scale(0.99); }
.st-item.is-active { border-color: var(--accent); background: oklch(0.27 0.03 200 / 0.6); }
.st-item__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.st-item__dot.t-green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.st-item__dot.t-yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.st-item__dot.t-red { background: var(--red); }
.st-item__dot.t-gray { background: var(--gray); }
.st-item__main { min-width: 0; }
.st-item__name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-item__area { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.st-item__fuels { display: flex; gap: 4px; }
.ff {
  font: 600 9.5px/1 'IBM Plex Mono', monospace; font-style: normal;
  padding: 3px 5px; border-radius: 5px; border: 1px solid var(--hairline);
  color: var(--faint); background: oklch(0.16 0.02 220 / 0.5);
}
.ff.s-green { color: var(--green); border-color: var(--green-d); background: oklch(0.45 0.1 152 / 0.18); }
.ff.s-yellow { color: var(--yellow); border-color: var(--yellow-d); background: oklch(0.5 0.1 90 / 0.16); }
.ff.s-red { color: var(--red); border-color: var(--red-d); }
.ff.s-gray { opacity: 0.55; }
.st-item__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.st-item__meta .age { font: 500 10.5px/1 'IBM Plex Mono', monospace; color: var(--muted); white-space: nowrap; }
.st-item__meta .age.stale { color: var(--faint); }
.st-item__meta .qd { font: 600 9px/1 'Inter'; text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 5px; border-radius: var(--r-pill); }
.qd.q-large { color: oklch(0.25 0.05 80); background: var(--yellow); }
.qd.q-medium { color: var(--yellow); border: 1px solid var(--yellow-d); }
.qd.q-none { color: var(--green); border: 1px solid var(--green-d); }

.tool.tool--list { position: relative; }
.tool .tool__badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font: 700 10px/18px 'IBM Plex Mono', monospace; text-align: center; border: 2px solid var(--bg-deep);
}

/* ============================================================
   FAB — сообщить о топливе
   ============================================================ */
/* Главные действия внизу: уведомления (основная) + установка (вторичная) */
.actions-bar {
  position: absolute; left: 12px; right: 12px; z-index: var(--z-fab);
  bottom: calc(var(--safe-b) + 14px);
  display: flex; flex-direction: column; gap: 6px;
}
.act-btn {
  height: 34px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform 0.12s var(--ease), background 0.16s, color 0.16s;
}
.act-btn:active { transform: translateY(1px) scale(0.99); }
.act-btn svg { width: 14px; height: 14px; flex: none; }
/* Основная — фирменный жёлтый (и в состоянии «включено») */
.act-btn--primary, .act-btn--primary.is-on {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 28px var(--accent-glow), var(--shadow-fab);
}
/* Вторичная — тёмное стекло */
.act-btn--ghost {
  background: oklch(0.22 0.02 222 / 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--ink); border: 1px solid var(--hairline-strong);
}

/* ============================================================
   Нижний лист (карточка АЗС / форма)
   ============================================================ */
.backdrop {
  position: fixed; inset: 0; z-index: var(--z-backdrop);
  background: oklch(0.08 0.02 220 / 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity 0.25s var(--ease), visibility 0.25s;
}
.backdrop.is-open { opacity: 1; visibility: visible; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sheet);
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-sheet);
  border-top: 1px solid var(--hairline-strong);
  transform: translateY(110%);
  transition: transform 0.4s var(--ease), visibility 0.4s var(--ease);
  visibility: hidden;                 /* полностью прячем закрытый лист (без торчащей полоски) */
  max-height: 88dvh; display: flex; flex-direction: column;
  padding-bottom: var(--safe-b);
  touch-action: none;
}
.sheet.is-open { transform: translateY(0); visibility: visible; }
.sheet__grip { padding: 9px 0 4px; display: grid; place-items: center; flex: none; cursor: grab; }
.sheet__grip i { width: 38px; height: 4px; border-radius: 4px; background: var(--hairline-strong); display: block; }
.sheet__scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px 22px; }
.sheet__scroll::-webkit-scrollbar { width: 0; }

/* ---- Шапка карточки ---- */
.card-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; }
.card-head__pin {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center; position: relative;
  border: 1px solid var(--hairline);
}
.card-head__pin .core { width: 16px; height: 16px; border-radius: 50%; }
.card-head .name { font-size: 19px; font-weight: 700; line-height: 1.15; }
.card-head .area { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.card-head .closed-tag {
  display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 600;
  color: var(--red); border: 1px solid var(--red-d); border-radius: var(--r-pill); padding: 2px 9px;
}
.card-head .x {
  margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-2); display: grid; place-items: center; color: var(--muted);
}
.card-head .x svg { width: 18px; height: 18px; }

/* ---- Полоса предупреждения о доверии ---- */
.trust-note {
  display: flex; gap: 9px; align-items: flex-start;
  background: oklch(0.27 0.03 80 / 0.35); border: 1px solid var(--yellow-d);
  border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 14px;
  font-size: 12px; line-height: 1.4; color: var(--ink-soft);
}
.trust-note svg { width: 16px; height: 16px; flex: none; color: var(--yellow); margin-top: 1px; }

/* ---- Очередь как отдельный бейдж риска ---- */
.queue-badge {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 11px 13px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.queue-badge .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.queue-badge .ico svg { width: 17px; height: 17px; }
.queue-badge .txt b { display: block; font-size: 13.5px; font-weight: 700; }
.queue-badge .txt span { font-size: 11.5px; color: var(--muted); }
.queue-badge.q-none   .ico { background: var(--green-d); color: var(--green); }
.queue-badge.q-medium .ico { background: var(--yellow-d); color: var(--yellow); }
.queue-badge.q-large  .ico { background: var(--red-d); color: var(--red); }
.queue-badge.q-unknown .ico { background: var(--gray-d); color: var(--ink-soft); }

/* ---- Список топлива ---- */
.fuel-list { display: grid; gap: 9px; }
.fuel-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 13px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.fuel-row.is-dim { opacity: 0.5; }
.fuel-row__name { font-weight: 700; font-size: 14px; min-width: 44px; }
.fuel-row__name .price { display: block; font: 500 11px/1.2 'IBM Plex Mono', monospace; color: var(--accent); margin-top: 3px; }
.fuel-row__mid { min-width: 0; }
.fuel-row__status { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.fuel-row__status .pill { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.fuel-row__meta { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 9px; }
.fuel-row__meta .conf b { color: var(--ink-soft); font-weight: 600; }
.fuel-row.s-green  .fuel-row__status { color: var(--green); }  .fuel-row.s-green  .pill { background: var(--green); box-shadow: 0 0 8px var(--green); }
.fuel-row.s-yellow .fuel-row__status { color: var(--yellow); } .fuel-row.s-yellow .pill { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.fuel-row.s-red    .fuel-row__status { color: var(--red); }    .fuel-row.s-red    .pill { background: var(--red); }
.fuel-row.s-gray   .fuel-row__status { color: var(--faint); }  .fuel-row.s-gray   .pill { background: var(--gray); }
.fuel-row.warn-q .fuel-row__status::after {
  content: 'очередь'; font: 700 9px/1 'Inter'; text-transform: uppercase; letter-spacing: 0.05em;
  color: oklch(0.25 0.05 80); background: var(--yellow); padding: 3px 6px; border-radius: var(--r-pill);
}

/* Шкала свежести (как топливный датчик) */
.gauge { width: 52px; height: 6px; border-radius: 3px; background: oklch(0.16 0.02 220 / 0.8); overflow: hidden; position: relative; }
.gauge i { display: block; height: 100%; border-radius: 3px; }
.gauge.g-green i  { background: linear-gradient(90deg, var(--green-d), var(--green)); }
.gauge.g-yellow i { background: linear-gradient(90deg, var(--yellow-d), var(--yellow)); }
.gauge.g-red i    { background: linear-gradient(90deg, var(--red-d), var(--red)); }
.gauge.g-gray i   { background: var(--gray-d); }

/* ---- Комментарии ---- */
.section-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 700; margin: 20px 0 10px; }
.comments { display: grid; gap: 8px; }
.comment {
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 10px 12px;
}
.comment p { margin: 0 0 6px; font-size: 13px; line-height: 1.4; color: var(--ink-soft); }
.comment .meta { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.src-tag {
  font: 600 9.5px/1 'Inter'; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: var(--r-pill); border: 1px solid var(--hairline);
}
.src-personal  { color: var(--green); border-color: var(--green-d); }
.src-telegram, .src-max { color: var(--accent); border-color: var(--accent-strong); }
.src-other { color: var(--muted); }
.comment .report-link { margin-left: auto; color: var(--faint); font-size: 10.5px; }

/* ---- Кнопка «сообщить обновление» в карточке ---- */
.card-cta {
  margin-top: 20px; width: 100%; height: 50px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.card-cta:active { transform: scale(0.99); }
.card-cta svg { width: 19px; height: 19px; }

/* ============================================================
   Форма сообщения
   ============================================================ */
.form-title { font-size: 18px; font-weight: 800; padding-bottom: 4px; }
.form-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 9px; }
.field .req { color: var(--accent); }
.field .opt { color: var(--faint); font-weight: 500; }

/* Сегменты / выбор */
.seg { display: flex; flex-wrap: wrap; gap: 7px; }
.seg button, .multi button {
  flex: 1 1 auto; min-width: fit-content; min-height: 42px; padding: 0 14px;
  border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hairline);
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.1s;
}
.seg button:active, .multi button:active { transform: scale(0.97); }
.seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.seg.tone-green  button[aria-pressed='true'] { background: var(--green);  color: oklch(0.2 0.05 152); border-color: var(--green); }
.seg.tone-red    button[aria-pressed='true'] { background: var(--red);    color: oklch(0.98 0.02 27); border-color: var(--red); }
.seg.tone-gray   button[aria-pressed='true'] { background: var(--gray);   color: oklch(0.2 0 0); border-color: var(--gray); }
.multi button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* select станции */
.station-select {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink);
  font-size: 14px; font-weight: 600; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%237aa' stroke-width='2'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

input.text, textarea.text {
  width: 100%; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink);
  font-family: inherit; font-size: 14px; resize: none;
}
input.text::placeholder, textarea.text::placeholder { color: var(--faint); }
input.text:focus, textarea.text:focus, .station-select:focus { border-color: var(--accent); outline: none; }
.char-count { text-align: right; font: 500 11px/1 'IBM Plex Mono', monospace; color: var(--faint); margin-top: 6px; }
.char-count.over { color: var(--red); }
.price-wrap { position: relative; }
.price-wrap .cur { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }

.form-foot {
  position: sticky; bottom: 0; margin-top: 14px;
  padding: 14px 0 calc(4px + var(--safe-b));
  background: linear-gradient(180deg, transparent 0%, var(--surface) 32%);
}
.form-submit {
  width: 100%; height: 52px; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink); font-size: 15.5px; font-weight: 700;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.form-submit:disabled { opacity: 0.45; box-shadow: none; }
.form-submit:not(:disabled):active { transform: scale(0.99); }

/* ============================================================
   Тост
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 80px); z-index: var(--z-toast);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  background: var(--green); color: oklch(0.18 0.05 152);
  font-size: 13.5px; font-weight: 700; padding: 12px 18px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 8px;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  max-width: 90vw;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; }

/* ============================================================
   Прелоадер
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 90; background: var(--bg-deep);
  display: grid; place-items: center; transition: opacity 0.5s var(--ease);
}
.boot.is-gone { opacity: 0; pointer-events: none; }
.boot__r { width: 78px; height: 78px; position: relative; }
.boot__r::before, .boot__r::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0; animation: sweep 1.8s var(--ease-soft) infinite;
}
.boot__r::after { animation-delay: 0.9s; }
@keyframes sweep { 0% { transform: scale(0.2); opacity: 0.8; } 100% { transform: scale(1); opacity: 0; } }
.boot__dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.boot__t { position: absolute; bottom: 28%; left: 0; right: 0; text-align: center; color: var(--muted); font: 600 12px/1 'IBM Plex Mono', monospace; letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   Геолокация · прицел · добавление АЗС
   ============================================================ */
/* «Вы здесь» */
.you-blip { position: relative; width: 0; height: 0; }
.you-blip__dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); border: 3px solid var(--bg-deep); box-shadow: 0 0 12px var(--accent); }
.you-blip__pulse { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; transform: translate(-50%, -50%); border-radius: 50%; animation: youpulse 2.2s var(--ease-soft) infinite; }
@keyframes youpulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); opacity: 0.75; } 70% { box-shadow: 0 0 0 18px transparent; opacity: 0; } 100% { opacity: 0; } }

/* Прицел постановки новой АЗС (центр карты) */
.crosshair {
  position: absolute; top: 50%; left: 50%; width: 72px; height: 72px;
  transform: translate(-50%, -50%); z-index: 8; color: var(--accent);
  pointer-events: none; opacity: 0; transition: opacity 0.2s var(--ease);
  filter: drop-shadow(0 1px 4px oklch(0.1 0.02 220 / 0.7));
}
.crosshair.is-open { opacity: 1; }
.crosshair svg { width: 100%; height: 100%; }

/* Панель добавления (карта остаётся подвижной — без бэкдропа) */
.add-bar {
  position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 14px);
  z-index: var(--z-backdrop); background: var(--surface);
  border: 1px solid var(--hairline-strong); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sheet); padding: 14px;
  transform: translateY(150%); opacity: 0; visibility: hidden;
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.add-bar.is-open { transform: none; opacity: 1; visibility: visible; }
.add-bar__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 11px; }
.add-bar__head strong { font-size: 15px; }
.add-bar__hint { font-size: 11.5px; color: var(--muted); }
.add-bar__fields { display: flex; gap: 8px; margin-bottom: 10px; }
.add-bar__fields .text { flex: 1 1 58%; min-width: 0; }
.add-bar__fields .station-select { flex: 1 1 42%; min-width: 0; min-height: 46px; }
.add-bar__actions { display: flex; gap: 8px; }
.add-bar__cancel { flex: 0 0 auto; padding: 0 16px; height: 46px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-soft); font-size: 14px; font-weight: 600; }
.add-bar__confirm { flex: 1 1 auto; height: 46px; border-radius: var(--r-md); background: var(--accent); color: var(--accent-ink); font-size: 14.5px; font-weight: 700; }
.add-bar__cancel:active, .add-bar__confirm:active { transform: scale(0.98); }
.adding .actions-bar { display: none; }

/* Расстояние и метка «моя» в списке */
.st-item__meta .dist { color: var(--accent); font-size: 11px; font-weight: 600; }
.st-item__tag { font-style: normal; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-ink); background: var(--accent); padding: 1px 5px; border-radius: var(--r-pill); margin-left: 4px; vertical-align: middle; }

/* Удалить мою АЗС */
.card-remove { display: block; width: 100%; margin-top: 10px; height: 42px; border-radius: var(--r-md); background: transparent; border: 1px solid var(--red-d); color: var(--red); font-size: 13px; font-weight: 600; }
.card-remove:active { background: oklch(0.45 0.14 27 / 0.15); }

/* ============================================================
   Планшет / десктоп
   ============================================================ */
@media (min-width: 720px) {
  .chrome-top { padding: 16px; right: 348px; }
  .filters { max-width: 560px; }
  .actions-bar { left: auto; right: 364px; width: 280px; bottom: 16px; }
  .add-bar { left: auto; right: 364px; width: 340px; }
  .map-tools { bottom: 84px; right: 364px; }
  .sheet { left: auto; right: 364px; width: 420px; transform: translateY(110%); border-radius: var(--r-xl); bottom: 16px; max-height: 84dvh; border: 1px solid var(--hairline-strong); }
  .sheet.is-open { transform: translateY(0); }
  /* Док-панель списка: всегда видна, не перекрывает карту полностью */
  .stations { transform: none; width: 332px; box-shadow: -1px 0 0 var(--hairline-strong); }
  .stations__close { display: none; }
  #listTool { display: none; }
  .backdrop.for-list { display: none; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.08s !important; }
  .blip.is-live .blip__ring { animation: none; box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 35%, transparent); }
}

/* ============================================================
   Нижний остров-навигация (Контакты | Карта | Мои АЗС)
   ============================================================ */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 12px); z-index: 60;
  display: flex; gap: 4px; padding: 5px;
  background: oklch(0.20 0.02 222 / 0.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-strong); border-radius: var(--r-pill);
  box-shadow: var(--shadow-fab);
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 82px; padding: 7px 14px; border-radius: var(--r-pill);
  color: var(--muted); font-size: 11px; font-weight: 600;
  transition: color 0.16s, background 0.16s, transform 0.1s;
}
.tab svg { width: 21px; height: 21px; }
.tab.is-active { color: var(--accent-ink); background: var(--accent); }
.tab:active { transform: scale(0.95); }
/* Счётчик «помог другим» — вынесен на вкладку «Мои АЗС» */
.tab-badge {
  position: absolute; top: 3px; right: 9px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--green); color: #06210f; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px oklch(0.20 0.02 222 / 0.92);
}
.tab-badge[hidden] { display: none; }
.adding .tabbar, body.panel-open .tabbar { display: none; }

/* Карточка АЗС без свежих данных — приглашение сообщить, без серого списка */
.card-empty {
  display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 2px;
  padding: 14px 15px; background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--r-md); color: var(--ink-soft); font-size: 13.5px; line-height: 1.5;
}
.card-empty svg { width: 20px; height: 20px; flex: none; color: var(--muted); margin-top: 1px; }

/* ---- Страницы-оверлеи (Контакты / Мои АЗС) ---- */
.page {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg-deep);
  display: flex; flex-direction: column;
  padding-top: var(--safe-t);
  animation: pageIn 0.28s var(--ease);
}
.page[hidden] { display: none; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page__head { padding: 18px 18px 12px; border-bottom: 1px solid var(--hairline); flex: none; }
.page__head h2 { font-size: 21px; }
.page__scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(var(--safe-b) + 96px);
  display: flex; flex-direction: column; gap: 14px;
}

/* ---- Контакты ---- */
.page-actions { display: flex; flex-direction: column; gap: 10px; }
.page-actions .act-btn { height: 50px; font-size: 14.5px; border-radius: var(--r-md); }
.page-actions .act-btn svg { width: 18px; height: 18px; }
.contact-card {
  display: flex; align-items: center; gap: 13px; padding: 14px 15px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md);
  color: var(--ink); transition: background 0.16s, transform 0.1s;
}
.contact-card:active { transform: scale(0.99); }
.contact-card__ic { width: 26px; height: 26px; flex: none; color: #29a9eb; }
.contact-card--tg { border-color: color-mix(in oklch, #29a9eb 50%, transparent); background: color-mix(in oklch, #29a9eb 13%, var(--surface)); }
.contact-card__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-card__txt b { font-size: 14.5px; font-weight: 700; }
.contact-card__txt span { font-size: 12.5px; color: var(--muted); }
.safe-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 15px; }
.safe-card__h { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; color: var(--green); font-size: 15px; font-weight: 700; }
.safe-card__h svg { width: 22px; height: 22px; }
.safe-card p { margin: 0 0 8px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.safe-card p:last-child { margin-bottom: 0; }
.safe-card__warn { color: var(--muted); font-size: 12.5px; }

/* ---- Мои АЗС ---- */
.helped-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 20%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent); border-radius: var(--r-lg);
}
.helped-card__img { width: 54px; height: 54px; border-radius: 50%; flex: none; object-fit: cover; }
.helped-card__n { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1; }
.helped-card__t { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; }
.helped-card__t span { font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 3px; }
.section-h2 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.section-h2 .mono { font-weight: 500; text-transform: none; }
.fav-list { display: flex; flex-direction: column; gap: 6px; }
.fav-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; line-height: 1.5; }
.fav-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); text-align: left; width: 100%; color: var(--ink); transition: transform 0.1s; }
.fav-item:active { transform: scale(0.99); }
.fav-item__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fav-item__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item__area { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-item__rm { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.fav-item__rm svg { width: 15px; height: 15px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.ach__ic { font-size: 20px; line-height: 1.1; flex: none; }
.ach__txt { min-width: 0; display: flex; flex-direction: column; }
.ach__name { font-size: 13px; font-weight: 700; }
.ach__desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.ach.is-locked { opacity: 0.45; }
.ach.is-locked .ach__ic { filter: grayscale(1); }
.ach.is-done { border-color: color-mix(in oklch, var(--accent) 45%, transparent); }

/* ---- Звезда «в избранное» на карточке ---- */
.fav-toggle { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; transition: color 0.16s, background 0.16s, transform 0.1s; }
.fav-toggle svg { width: 19px; height: 19px; }
.fav-toggle:active { transform: scale(0.9); }
.fav-toggle.is-on { color: var(--accent); }
.fav-toggle.is-on svg { fill: var(--accent); }

/* ---- Кнопка «ИИ-анализ» в списке ---- */
.st-tools { display: flex; gap: 8px; margin-top: 8px; }
.ai-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--hairline-strong);
  color: var(--ink); font-size: 12px; font-weight: 700; transition: background 0.16s, color 0.16s, border-color 0.16s, transform 0.1s;
}
.ai-btn svg { width: 15px; height: 15px; }
.ai-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ai-btn:active { transform: scale(0.96); }

/* ---- Всплывашка достижения ---- */
.ach-pop {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); z-index: 75;
  display: flex; align-items: center; gap: 11px; padding: 12px 16px; max-width: 92vw;
  background: var(--surface-2); border: 1px solid color-mix(in oklch, var(--accent) 50%, transparent);
  border-radius: var(--r-pill); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(-12px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.ach-pop.is-show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.ach-pop[hidden] { display: none; }
.ach-pop__ic { font-size: 24px; flex: none; }
.ach-pop__txt b { display: block; font-size: 13.5px; }
.ach-pop__txt span { font-size: 12px; color: var(--muted); }

@media (min-width: 720px) {
  .tabbar { left: calc((100% - 332px) / 2); }
  .page { right: 332px; }            /* оверлей над картой; докнутый список виден */
  /* Фильтры/города — компактный горизонтальный ряд (как на мобиле). Прокрутка
     вбок колесом мыши включается в app.js (wheel → scrollLeft). */
  .filters { max-width: none; }
}

/* ============================================================
   Контакты: баннер, ТГ-строка, «поделиться», закреплённый низ
   ============================================================ */
#contactsPage .page__scroll { padding-bottom: 16px; }   /* низ закреплён отдельно */
.tg-banner { width: 100%; display: block; border-radius: var(--r-md); border: 1px solid var(--hairline); }
.tg-row {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px;
  background: color-mix(in oklch, #29a9eb 13%, var(--surface));
  border: 1px solid color-mix(in oklch, #29a9eb 50%, transparent); border-radius: var(--r-md);
  color: var(--ink); transition: transform 0.1s, background 0.16s;
}
.tg-row:active { transform: scale(0.99); }
.tg-row__logo { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.tg-row__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tg-row__txt b { font-size: 15px; font-weight: 700; }
.tg-row__txt span { font-size: 12.5px; color: var(--muted); }
.share-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 15px; }
.share-card__h { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--accent); font-size: 15px; font-weight: 700; }
.share-card__h svg { width: 20px; height: 20px; }
.share-card p { margin: 0 0 12px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.share-row { display: flex; gap: 8px; }
.share-btn { flex: 1; height: 42px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--hairline-strong); color: var(--ink); transition: transform 0.1s, filter 0.16s; }
.share-btn:active { transform: scale(0.98); }
.share-btn--primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.page__foot {
  flex: none; display: flex; flex-direction: column; gap: 9px;
  padding: 12px 16px calc(var(--safe-b) + 80px);
  border-top: 1px solid var(--hairline);
  background: linear-gradient(180deg, transparent, var(--bg) 28%);
}
.page__foot .act-btn { height: 48px; font-size: 14.5px; border-radius: var(--r-md); }
.page__foot .act-btn svg { width: 18px; height: 18px; }

/* ============================================================
   Значок «помог водителям» на карте (мотиватор)
   ============================================================ */
.help-badge {
  position: absolute; left: 12px; z-index: var(--z-chrome);
  bottom: calc(var(--safe-b) + 84px);
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  border-radius: var(--r-pill);
  background: oklch(0.22 0.02 222 / 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--hairline-strong); box-shadow: var(--shadow-pop);
  color: var(--ink); transition: transform 0.1s;
}
.help-badge[hidden] { display: none; }
.help-badge:active { transform: scale(0.96); }
.help-badge__img { width: 28px; height: 28px; border-radius: 50%; flex: none; object-fit: cover; }
.help-badge__txt { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.help-badge__txt svg { width: 14px; height: 14px; color: var(--red); }
.help-badge__txt b { color: var(--accent); }

/* ============================================================
   Кнопка «Построить маршрут» на карточке
   ============================================================ */
.route-btn {
  width: 100%; height: 48px; margin-top: 8px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14.5px; font-weight: 700; background: var(--surface-2);
  border: 1px solid var(--hairline-strong); color: var(--ink); transition: transform 0.1s;
}
.route-btn:active { transform: scale(0.99); }
.route-btn svg { width: 18px; height: 18px; color: var(--accent); }

/* ============================================================
   Всплывающее предложение (ТГ-канал / напоминание)
   ============================================================ */
.promo {
  position: fixed; inset: 0; z-index: 1001; display: grid; place-items: end center;
  padding: 0 14px calc(var(--safe-b) + 14px);
  background: oklch(0.06 0.02 220 / 0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.promo[hidden] { display: none; }
.promo__card {
  position: relative; width: min(94vw, 440px); background: var(--surface);
  border: 1px solid var(--hairline-strong); border-radius: 20px; padding: 20px 18px 16px;
  box-shadow: 0 24px 60px oklch(0.05 0.02 220 / 0.7); animation: promoUp 0.32s var(--ease);
}
@keyframes promoUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.promo__x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.promo__x svg { width: 16px; height: 16px; }
.promo__body { color: var(--ink-soft); font-size: 14px; line-height: 1.5; padding-right: 22px; }
.promo__body b { color: var(--ink); }
.promo__title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.promo__title img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.promo__actions { display: flex; gap: 8px; margin-top: 16px; }
.promo__cta { flex: 1; height: 46px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.promo__later { height: 46px; padding: 0 16px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13px; }
