* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;                 /* без прокрутки страницы — карта на весь экран */
  overscroll-behavior: none;        /* без «оттягивания»/pull-to-refresh */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;  /* без серого блика при тапе */
  -webkit-user-select: none;
  user-select: none;
}

/* Карта на весь экран (fixed надёжнее на мобильных, чем 100vh) */
#map {
  position: fixed;
  inset: 0;
}

/* Верхняя панель */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);      /* под чёлку */
  height: calc(52px + env(safe-area-inset-top));
  background: #1B7F3B;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}
/* версия сайта — маленько справа в шапке */
.topbar-version {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.6;
}

/* --- Строка поиска АЗС (под чипами фильтра, сворачиваемая) --- */
/* Контейнер строки — на всю ширину, но прозрачен и кликов не ловит: события
   идут к карте; интерактив включают только пилюля и выпадашка. */
.searchbar {
  position: relative;
  width: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  pointer-events: none;
}
/* Пилюля/поле: свёрнута по контенту, при .expanded растягивается во всю ширину. */
.search-shell {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.18);
  color: #222;
  cursor: pointer;
  transition: width 0.24s ease;
}
.searchbar.expanded .search-shell {
  width: 100%;
  cursor: text;
}
.search-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: #6b7280;
}
.search-label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
}
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: none;
  background: none;
  color: #222;
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
}
.search-input::placeholder { color: #9aa0a6; }
/* убираем нативный крестик у type=search — свой */
.search-input::-webkit-search-cancel-button { display: none; }
.search-clear {
  flex: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #555;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
/* выпадающий список результатов — поверх карты */
.search-results {
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 6px);
  left: 10px;
  right: 10px;
  z-index: 30;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
  color: #222;
}
.search-city {
  padding: 6px 10px 4px;
  font-size: 12px;
  color: #888;
}
.search-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.search-item:hover,
.search-item:active { background: #eef4ef; }
/* элемент «Есть топливо» — оформлен как блок статуса в карточке: светло-зелёный
   фон и рамка (ring через inset box-shadow — без сдвига раскладки). */
.search-item.item-AVAILABLE {
  background: #EAF7EE;
  box-shadow: inset 0 0 0 1px #C6E8CE;
}
.search-item.item-AVAILABLE:hover,
.search-item.item-AVAILABLE:active { background: #DFF0E4; }
/* левая колонка (название + адрес) — растягивается и обрезает длинное */
.search-item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.search-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-addr {
  margin-top: 2px;
  font-size: 12.5px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* «N подтверждений · когда» — под бейджем справа, приглушённо, с переносом */
.search-item-meta {
  font-size: 12px;
  color: #555;
  text-align: right;
}
/* очередь — под адресом слева, цвет по загрузке (задаётся инлайн) */
.search-item-queue {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* правая колонка: дистанция, бейдж, строка подтверждений — стопкой, справа */
.search-item-right {
  flex: none;
  max-width: 52%;   /* не даём метаданным задавить название/адрес слева */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
/* дистанция — чёрным жирным, не переносится */
.search-item-dist {
  font-size: 12.5px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}
/* бейдж статуса топлива — цвета как у точек на карте */
.search-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-AVAILABLE { background: #e6f4ea; color: #1B7F3B; }
.badge-UNAVAILABLE { background: #fdecea; color: #c62828; }
.badge-UNKNOWN { background: #fdf3d6; color: #8a6d00; }
.search-empty {
  padding: 12px;
  font-size: 14px;
  color: #888;
  text-align: center;
}
/* Кружок «?» в шапке — открывает модалку «О сервисе» */
.topbar-help {
  margin-left: 10px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: none;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.topbar-help:hover { background: rgba(255, 255, 255, 0.15); }

/* Модалка «О сервисе» */
/* Плавность — чистым CSS по opacity (transform занят центрированием, его не трогаем).
   Элементы всегда в DOM; закрытые — прозрачные и не ловят клики (pointer-events). */
.about-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.about-backdrop.open { opacity: 1; pointer-events: auto; }
/* Панель «О сервисе» + SEO-контент — выезжающий снизу bottom-sheet.
   Закрытая уведена за нижний край через transform:translateY(100%): остаётся
   в DOM и отрендерена (в отличие от display:none/opacity:0) — чтобы поисковик
   индексировал H1/лонгрид/FAQ без дисконта «скрытого текста», но карта чистая. */
.about-sheet {
  position: fixed;
  z-index: 41;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  height: 92vh; /* фолбэк */
  height: calc(100dvh - env(safe-area-inset-top) - 24px);
  background: #fff;
  color: #1f2937;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  font-weight: 400;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-sheet.open { transform: translateY(0); }
/* Шапка панели — sticky сверху, не скроллится вместе с телом. */
.about-sheetbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid #eceff3;
  border-radius: 16px 16px 0 0;
  background: #fff;
}
.about-back {
  border: 0;
  background: none;
  color: #1B7F3B;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}
.about-sheetbar-title { margin: 0 auto; font-size: 16px; font-weight: 700; color: #1f2937; }
.about-close {
  border: 0;
  background: none;
  padding: 4px 6px;
  font-size: 18px;
  line-height: 1;
  color: #9CA3AF;
  cursor: pointer;
}
/* Тело панели — единственная скроллящаяся область. */
.about-sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom));
}

/* SEO-типографика внутри панели */
.about-h1 { margin: 4px 0 12px; font-size: 21px; font-weight: 800; line-height: 1.3; color: #111827; }
.about-h2 { margin: 22px 0 8px; font-size: 17px; font-weight: 700; color: #111827; }
.about-list { margin: 0 0 10px; padding-left: 20px; }
.about-list li { margin-bottom: 5px; font-size: 14px; line-height: 1.5; color: #374151; }
.about-quick {
  background: #f0faf3;
  border: 1px solid #cdeed8;
  border-left: 3px solid #1B7F3B;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
}
.about-quick p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #1f2937; }
.about-warn {
  background: #fff8e6;
  border: 1px solid #f5e3a8;
  border-radius: 12px;
  padding: 11px 14px;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #4b4635;
}
.about-note { margin: 12px 0; font-size: 12.5px; line-height: 1.45; color: #6b7280; }
/* Заметный блок соцсетей вверху панели (дубль контактов из низа) —
   видимость соцсетей важна, поэтому карточка с кнопками-пилюлями. */
.about-social {
  background: #f0faf3;
  border: 1px solid #cdeed8;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 16px;
}
.about-social-label { display: block; font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 9px; }
.about-social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.about-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid #1B7F3B;
  border-radius: 999px;
  background: #fff;
  color: #1B7F3B;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.about-social-btn:hover { background: #1B7F3B; color: #fff; }
.about-social-btn .soc-ico { width: 17px; height: 17px; margin: 0; vertical-align: 0; }
.about-faq { border-top: 1px solid #eceff3; padding: 10px 2px; }
.about-faq > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.about-faq > summary::-webkit-details-marker { display: none; }
.about-faq > summary::after { content: '▾'; font-size: 11px; opacity: 0.6; }
.about-faq[open] > summary::after { content: '▴'; }
.about-faq > p { margin: 8px 0 2px; font-size: 14px; line-height: 1.55; color: #374151; }
/* Футер панели: разделитель + продублированные правовые ссылки. */
.about-hr { border: 0; border-top: 1px solid #eceff3; margin: 18px 0 12px; }
.about-footer { margin: 0; font-size: 13px; line-height: 1.7; color: #6b7280; }
.about-footer .about-link { white-space: nowrap; }
.about-subtitle { margin: 16px 0 6px; font-size: 14px; font-weight: 700; }
.about-text { margin: 0; font-size: 14px; line-height: 1.5; color: #374151; }
.about-link { color: #1B7F3B; font-weight: 600; text-decoration: none; }
.about-link:hover { text-decoration: underline; }
/* Иконка соцсети перед названием в «Контактах» */
.soc-ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

/* Фильтр по топливу — плавающие чипы под шапкой */
/* Стек плавающих контролов над картой (фильтр + поиск), закреплён под шапкой.
   Прозрачен и кликов не ловит — события идут карте; интерактив включают дети. */
.topstack {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* свёрнутая пилюля жмётся влево */
  gap: 8px;
  pointer-events: none;
}

.filterbar {
  width: 100%;
  box-sizing: border-box;
  pointer-events: none;      /* пустые места между чипами пропускают тап к карте */
  display: flex;
  flex-wrap: wrap;           /* не влезло — переносим на след. строку слева */
  gap: 7px;
  padding: 8px 10px;
}
/* чипы кликабельны, сам бар — нет */
.filterbar .fchip { pointer-events: auto; }

.fchip {
  flex: 0 0 auto;
  padding: 11px 14px;       /* повыше — удобнее попадать пальцем */
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}
.fchip.on {
  background: #1B7F3B;
  color: #fff;
  border-color: #1B7F3B;
}
/* «Все» — чуть отделяем от чипов видов топлива */
.fchip-all {
  margin-right: 4px;
}

/* Контролы MapLibre — ниже шапки и фильтра, над home-indicator */
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-top-left {
  margin-top: calc(116px + env(safe-area-inset-top));
}
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left {
  margin-bottom: calc(6px + env(safe-area-inset-bottom));
}
/* когда баннер включён — поднимаем копирайт над ним */
body.ads-on .maplibregl-ctrl-bottom-right,
body.ads-on .maplibregl-ctrl-bottom-left {
  margin-bottom: calc(70px + env(safe-area-inset-bottom));
}

/* Заглушка рекламного баннера (низ экрана). По умолчанию скрыт —
   показывается только при body.ads-on (флаг из /v1/info) и закрытой карточке. */
#adbanner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 22; /* всегда виден снизу, выше затемнения (backdrop=20) */
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: none;
  align-items: center;
  justify-content: center;
  background: #eceff1;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  color: #607d8b;
  font-size: 14px;
  font-weight: 600;
}
#adbanner .ad-tag {
  position: absolute;
  top: 3px;
  right: 7px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #b0bec5;
}
/* баннер виден всегда, когда включён (карточка выезжает НАД ним) */
body.ads-on #adbanner { display: flex; }
/* карточка садится над баннером (её низ на высоте баннера) */
body.ads-on .sheet { bottom: calc(64px + env(safe-area-inset-bottom)); padding-bottom: 16px; }

/* Крупнее контролы под палец на тач-устройствах */
@media (pointer: coarse) {
  .maplibregl-ctrl-group button {
    width: 40px;
    height: 40px;
  }
}

[x-cloak] { display: none !important; }

/* --- карточка заправки (bottom sheet) --- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.28s ease;
}
.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #d0d0d0;
  margin: 6px auto 10px;
  cursor: pointer;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.sheet-headings { flex: 1; min-width: 0; }
.sheet-title {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
}
.sheet-address {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.4;
  color: #888;
}
.close-btn {
  border: 0;
  background: none;
  font-size: 18px;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
}

/* --- стартовый выбор города (bottom sheet, поверх всего) --- */
.city-backdrop { z-index: 30; }
.city-sheet {
  z-index: 31;
  text-align: center;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}
/* рекламный баннер не должен смещать модалку выбора города */
body.ads-on .city-sheet { bottom: 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
.city-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
}
.city-pin {
  width: 56px;
  height: 56px;
  margin: 6px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #E6F4EA;
  color: #1B7F3B;
}
.city-title {
  font-size: 21px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.city-body { max-width: 420px; margin: 0 auto; }
.city-btn-primary {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #1B7F3B;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 16px;
  cursor: pointer;
}
.city-btn-primary:disabled { opacity: 0.7; cursor: default; }
.city-note {
  font-size: 13px;
  line-height: 1.4;
  color: #888;
  margin: 12px 4px 16px;
}
/* Вторичная кнопка — обводка (ручной выбор города равноценен гео, часто
   основной путь: гео-попап нередко отклоняют). Основную ведёт заливка. */
.city-btn-secondary {
  width: 100%;
  border: 1.5px solid #1B7F3B;
  border-radius: 12px;
  background: transparent;
  color: #1B7F3B;
  font-size: 16px;
  font-weight: 600;
  padding: 13.5px 16px;
  cursor: pointer;
}
.city-btn-secondary:hover,
.city-btn-secondary:active { background: #EAF4EC; }
.city-hint {
  font-size: 13px;
  color: #b26a00;
  margin-bottom: 10px;
}
.city-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dbe0;
  border-radius: 12px;
  font-size: 16px;
  padding: 13px 14px;
  outline: none;
  -webkit-appearance: none;
}
.city-input:focus { border-color: #1B7F3B; }
.city-input::-webkit-search-cancel-button { display: none; }
.city-list {
  margin-top: 8px;
  max-height: 42vh;
  overflow-y: auto;
  text-align: left;
}
.city-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  font-size: 16px;
  color: #1a1a1a;
  padding: 13px 6px;
  border-bottom: 1px solid #f0f1f3;
  cursor: pointer;
}
.city-item:hover,
.city-item:active { background: #eef4ef; }
/* строка населённого пункта: топоним + регион под ним */
.city-place { display: flex; flex-direction: column; gap: 2px; }
.city-place-name { color: #1a1a1a; }
.city-region { font-size: 13px; color: #888; }
.city-empty {
  padding: 18px 6px;
  color: #888;
  font-size: 14px;
  text-align: center;
}
/* Ссылка «В карты» после адреса — маршрут «от меня» в Яндекс.Картах.
   Иконка inline-SVG красится через currentColor в цвет ссылки. */
/* «В карты» — неразрывная связка (nowrap), перетекает как одно слово в конец адреса,
   не разрываясь между иконкой и текстом даже при длинном многострочном адресе. */
.addr-maps {
  margin-left: 6px;
  color: #1a1a1a; /* текст — контрастный чёрный */
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.addr-maps:active { opacity: 0.7; }
/* иконка жёлтая (через currentColor), выровнена inline по тексту */
.addr-maps-ico {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 2px;
  color: #f4b731;
}

/* --- верхний блок: общий статус АЗС (вердикт-first) --- */
.status-section { margin-top: 14px; }
.status-caption {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

/* Цвет статуса задаёт всю палитру блока через CSS-переменные. */
.status-card {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--sc-bd);
  background: var(--sc-bg);
}
.status-card.is-available   { --sc: #2E9E4F; --sc-bg: #EAF7EE; --sc-bd: #C6E8CE; --sc-ic: #D6EFDC; }
.status-card.is-unavailable { --sc: #E53935; --sc-bg: #FDECEA; --sc-bd: #F5C6C2; --sc-ic: #FAD9D6; }
.status-card.is-unknown     { --sc: #E0A800; --sc-bg: #FBF4E0; --sc-bd: #EFDFA8; --sc-ic: #F7EDCB; }

.status-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.status-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--sc-ic);
  color: var(--sc);
  display: flex;
  align-items: center;
  justify-content: center;
}
.status-info { flex: 1; min-width: 0; }
.status-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--sc);
}
.status-sub {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 14px;
  background: var(--sc-ic);
  color: var(--sc);
  font-size: 13px;
  font-weight: 700;
}
.status-badge-i { opacity: 0.7; font-weight: 400; }

/* Предупреждение «данные устаревают» — янтарным, когда возраст близок к краю окна свежести */
.status-stale {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #B7791F; /* янтарный, читаемо на светлом */
}
.status-stale-i { font-size: 12px; }

/* Бейдж «по данным оплат» — статус держится только на данных платёжного сервиса (косвенный сигнал) */
.status-paid {
  position: relative; /* якорь для всплывающей плашки .status-paid-tip */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280; /* нейтрально-серый: сигнал вторичный, не отвлекает от статуса */
}
.status-paid-i { font-size: 12px; }
/* Кружок с «?» — кликабельная подсказка у бейджа */
.status-paid-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 1px solid #9CA3AF;
  border-radius: 50%;
  background: none;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #9CA3AF;
  cursor: pointer;
}
.status-paid-q:hover { border-color: #6B7280; color: #6B7280; }
/* Всплывающая плашка «Кто-то оплатил 95 картой» — над бейджем, авто-скрытие через 2 сек */
.status-paid-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 5;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  background: #374151;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.status-divider {
  height: 1px;
  background: var(--sc-bd);
  margin: 16px 0 12px;
}
.status-actual {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}
/* Мягкая подсказка-мотивация справа от «Ещё актуально?» — приглушённая и легче,
   чтобы не спорить с основным текстом, но всегда напоминать о пользе отметки. */
.status-actual-hint {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  color: #6b7280;
  font-size: 13px;
}
/* Внимание к НЕЙТРАЛЬНОМУ вопросу «Ещё актуально?» (а не к кнопке «Да») — ведём
   взгляд к блоку отметок, не подталкивая к конкретному ответу: иначе получили бы
   confirmation bias и подпортили достоверность. Shimmer-волна (как у skeleton-
   плейсхолдеров): светлый блик в цвет статуса пробегает по фону-плашке слева
   направо. 3 прохода и замирает — заметно, но не назойливо. */
.status-actual-q {
  display: inline-block; /* блик рисуется по прямоугольнику плашки */
  padding: 4px 10px;
  margin: 0 -10px; /* компенсируем горизонтальный padding — текст остаётся на месте */
  border-radius: 8px;
}
.status-actual-q.pulse-hint {
  /* фолбэк для Android Chrome < 111 / iOS Safari < 16.2 (нет color-mix): нейтральный
     блик; поддерживающие браузеры перекроют его адаптивным цветом статуса ниже. */
  background-image: linear-gradient(
    100deg,
    transparent 38%,
    rgba(0, 0, 0, 0.08) 50%,
    transparent 62%
  );
  background-image: linear-gradient(
    100deg,
    transparent 38%,
    color-mix(in srgb, var(--sc) 30%, transparent) 50%,
    transparent 62%
  );
  background-size: 300% 100%; /* цветная полоса узкая, поля прозрачные — на краях окна блика нет */
  background-repeat: no-repeat;
  animation: actualShimmer 2.1s ease-in-out 2;
}
/* 0% и 100% — окно на прозрачной зоне (блик за кадром), цвет проходит в середине.
   Поэтому в конце анимации фон гарантированно прозрачный, без «залипшего» градиента. */
@keyframes actualShimmer {
  from { background-position: 100% 0; }
  to   { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status-actual-q.pulse-hint { animation: none; }
}
.status-actions {
  display: flex;
  gap: 10px;
}
.confirm-btn {
  flex: 1;
  padding: 10px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--sc);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.changed-btn {
  flex: 1;
  padding: 10px 10px;
  border: 1px solid #d8dde1;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.changed-icon { font-weight: 700; font-size: 1.4em; line-height: 1; vertical-align: -0.15em; }

/* «Ситуация изменилась» внутри формы подтверждения — во всю ширину */
.changed-inline {
  width: 100%;
  margin-bottom: 14px;
  padding: 11px;
  border: 1px solid #d8dde1;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Плашка «В наличии: 92, 95 …» */
.avail-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 4px 0 0;
}
.avail-label {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}
.avail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.avail-chip {
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid #2E9E4F;
  background: #2E9E4F;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* --- форма заведения данных (состояние «Нет данных») --- */
/* Вердикт: две карточки-переключателя с чекбоксом в углу */
.verdict-cards {
  display: flex;
  gap: 10px;
}
.verdict-card {
  position: relative;
  flex: 1;
  padding: 16px 12px;
  border: 1.5px solid #d8dde1;
  border-radius: 14px;
  background: #fff;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.verdict-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #cbd2d8;
  background: #fff;
}
.verdict-card.on .verdict-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.verdict-card.yes.on { border-color: #2E9E4F; background: #EAF7EE; color: #2E9E4F; }
.verdict-card.yes.on .verdict-check { border-color: #2E9E4F; background: #2E9E4F; }
.verdict-card.no.on { border-color: #E53935; background: #FDECEA; color: #E53935; }
.verdict-card.no.on .verdict-check { border-color: #E53935; background: #E53935; }

.which-fuel { margin-top: 16px; }
.draft-queue { margin-top: 16px; }
.draft-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.draft-chip {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #d8dde1;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.draft-chip.on {
  border-color: #2E9E4F;
  background: #2E9E4F;
  color: #fff;
}
/* «Нет топлива» — выделенный чип красный */
.draft-chips.deny .draft-chip.on {
  border-color: #E53935;
  background: #E53935;
}

.submit-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: #1B7F3B;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

/* Блок очереди под карточкой статуса (виден только когда есть топливо) */
.queue-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #f6f7f8;
  font-size: 15px;
  transition: background 0.25s ease;
}
.queue-line-label { color: #111; font-weight: 600; }
.queue-line-val { font-weight: 700; color: #333; }

/* --- Последние отметки (лента активности) --- */
.recent { margin-top: 22px; }
/* Скелет ленты: серые плейсхолдеры (shimmer) держат высоту карточки, пока грузятся
   отметки, затем заменяются реальными строками — без скачка высоты (рывка). */
.recent-skel { pointer-events: none; }
.skel-box,
.skel-line {
  background: #e9ebee;
  animation: skel-shimmer 1.2s ease-in-out infinite;
}
.skel-box { width: 100%; height: 100%; border-radius: 12px; }
.skel-line { height: 12px; border-radius: 6px; margin: 5px 0; }
.skel-line.skel-short { width: 55%; }
@keyframes skel-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.recent-title {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 10px;
}
/* Лента — в скруглённом блоке с рамкой */
.recent-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  overflow: hidden;
}
.recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}
.recent-item:first-child { border-top: 0; }
.recent-ico {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.recent-body { flex: 1; min-width: 0; }
.recent-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.recent-kind { font-size: 15px; font-weight: 700; }
.recent-time { font-size: 13px; color: #9ca3af; white-space: nowrap; }
.recent-detail {
  margin-top: 2px;
  font-size: 14px;
  color: #4b5563;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* «Смотреть все ›» — последней строкой внутри блока ленты */
.recent-more {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid #f0f0f0;
  background: transparent;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.recent-more-chev { font-size: 18px; line-height: 1; }

/* кнопки выбора бакета очереди (в форме заведения) */
.queue-actions { display: flex; gap: 6px; }
.qbtn {
  flex: 1;
  min-width: 0;
  padding: 9px 2px;
  border: 1px solid #d8dde1;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
}
.qbtn.on {
  border-color: #1B7F3B;
  background: #1B7F3B;
  color: #fff;
}

/* --- тост --- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  z-index: 30;
  background: rgba(30, 30, 30, 0.94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Праздничный «наградной» тост cheerToast() — микронаграда за отметку.
   Карточка по центру с pop-анимацией + залп конфетти из-за неё. */
.cheer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0; /* вместо inset:0 — совместимость с iOS Safari < 14.5 */
  z-index: 40; /* выше обычного toast (30) */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* не перехватываем тапы по карте/карточке */
}
.cheer-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 18px 24px;
  text-align: center;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.18, 0.9, 0.32, 1.4), opacity 0.2s;
}
.cheer.show .cheer-card {
  transform: scale(1);
  opacity: 1;
}
.cheer-emoji {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
}
.cheer.show .cheer-emoji {
  animation: cheerPop 0.5s ease both;
}
.cheer-title {
  font-size: 19px;
  font-weight: 800;
  color: #1f2937;
}
.cheer-sub {
  font-size: 13px;
  color: #6b7280;
  margin-top: 3px;
}
/* Контейнер-точка в центре экрана — из неё разлетаются частицы. */
.cheer-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}
.cheer-burst i {
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.cheer.show .cheer-burst i {
  animation: confettiBurst var(--dur, 1.1s) ease-out forwards;
}
@keyframes confettiBurst {
  0% {
    transform: translate(-50%, -50%) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--r));
    opacity: 0;
  }
}
@keyframes cheerPop {
  0% { transform: scale(0.4); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cheer-card { transition: opacity 0.2s; transform: none; }
  .cheer.show .cheer-card { transform: none; }
  .cheer.show .cheer-emoji { animation: none; }
}
