/* Заправимся РФ — система тем. Светлая — по умолчанию (PROMPT), тёмная — через [data-theme="dark"]. */
:root {
  /* Light (по умолчанию) */
  --bg: #F4F6FA;
  --bg-elev: #FFFFFF;          /* панели/карточки */
  --bg-elev-2: #EEF1F7;        /* вторичная поверхность (инпуты/чипсы) */
  --panel: #FFFFFFcc;          /* полупрозрачная панель поверх карты */
  --border: #E2E8F0;
  --text: #121A28;
  --text-dim: #5A6678;
  --text-mute: #7A8696;
  --accent: #FF6B00;
  --accent-dim: #CC5600;
  --green: #16A34A;
  --yellow: #EAB308;
  --red: #EF4444;
  --gray: #94A0B0;
  --map-bg: #E6EAF2;           /* фон контейнера карты до загрузки тайлов */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(17, 24, 39, .12);
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, .08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  /* Dark */
  --bg: #05070C;
  --bg-elev: #0F1520;          /* панели/карточки */
  --bg-elev-2: #1A2233;        /* вторичная поверхность */
  --panel: #0F1520cc;
  --border: #1E293B;
  --text: #F2F4F8;
  --text-dim: #8B96A8;
  --text-mute: #6B7280;
  --accent: #FF6B00;
  --accent-dim: #B84D00;
  --green: #30D56B;
  --yellow: #FACC15;
  --red: #FF4D5A;
  --gray: #6B7280;
  --map-bg: #0A0E16;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  touch-action: manipulation;              /* убираем double-tap zoom */
  overscroll-behavior-y: none;             /* выключаем pull-to-refresh браузера */
  -webkit-user-select: none; user-select: none;  /* app feel: нет выделения текста */
}
#app { height: 100vh; height: 100dvh; width: 100vw; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }

/* Layout — app shell: fixed, no scroll, flex column */
.app-shell { position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden; }
.app-header {
  display: flex; align-items: center; gap: 10px;
  padding: env(safe-area-inset-top, 0px) 14px 10px; padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  background: var(--panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); z-index: 1000;
  flex-shrink: 0; height: calc(env(safe-area-inset-top, 0px) + 54px);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand .logo { font-size: 22px; }
.brand .accent { color: var(--accent); }
.header-spacer { flex: 1; }

/* Селектор города в шапке */
.header-city-select {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  outline: none; cursor: pointer; max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-city-select:hover { border-color: var(--accent); }
.header-city-select:focus { border-color: var(--accent); }

/* Инфо-баннер-дисклеймер */
.info-banner {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px;
  background: var(--bg-elev); border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim); cursor: pointer; transition: .15s;
}
.info-banner:hover { background: var(--bg-elev-2); }
.info-banner .ib-ico { flex-shrink: 0; }
.info-banner .ib-text { flex: 1; }
.info-banner .ib-more { flex-shrink: 0; transition: transform .15s; }
.info-banner .ib-more.open { transform: rotate(180deg); }
.info-banner-full {
  padding: 10px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim); line-height: 1.5;
}
.info-banner-full a { color: var(--accent); }

/* Онбординг pre-permission */
.onboarding-overlay {
  position: fixed; inset: 0; z-index: 1800; background: rgba(5,7,12,.78);
  backdrop-filter: blur(8px); display: flex; align-items: flex-end; justify-content: center;
  padding: 0 14px calc(20px + env(safe-area-inset-bottom, 0px));
}
.onboarding-card {
  width: 100%; max-width: 440px; background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 -10px 40px rgba(0,0,0,.5);
}
.onboarding-ic { font-size: 40px; margin-bottom: 14px; }
.onboarding-card h3 { margin: 0 0 8px; font-size: 21px; }
.onboarding-card p { font-size: 14px; color: var(--text-dim); line-height: 1.5; margin: 0 0 20px; }
.onboarding-allow { background: var(--green); border-color: var(--green); box-shadow: 0 6px 18px rgba(22,163,74,.28); }
.onboarding-allow:hover { background: var(--green); filter: brightness(1.1); }
.onboarding-skip {
  width: 100%; height: 44px; margin-top: 8px; border: none; background: none;
  color: var(--text-dim); font-family: inherit; font-size: 14px; cursor: pointer;
}
.header-btn {
  background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: .15s;
  cursor: pointer; position: relative; z-index: 1;
}
.header-btn:hover { border-color: var(--accent); color: var(--accent); }
.header-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.header-btn.primary:hover { background: var(--accent-dim); color: #fff; }
.header-btn.donate { background: #ff4d6d20; border-color: #ff4d6d60; color: #ff4d6d; }
.header-btn.donate:hover { background: #ff4d6d35; border-color: #ff4d6d; }
.header-btn .pts { color: var(--accent); font-weight: 700; }
.header-btn.primary .pts { color: #fff; }
.header-filters-toggle { display: none; }

.map-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
#map { position: relative; flex: 1; min-height: 0; background: var(--map-bg); }

/* Filters panel */
.filters-panel {
  position: absolute; top: 56px; left: 12px; z-index: 900;
  background: var(--panel); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; width: 300px; max-width: calc(100vw - 24px);
  box-shadow: var(--shadow); max-height: calc(100vh - 180px); overflow-y: auto;
}
.filters-panel.collapsed { width: auto; padding: 8px 12px; }
.fp-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.fp-title .collapse-btn { background: none; border: none; color: var(--text-dim); font-size: 16px; padding: 0 4px; }
.fp-section { margin-bottom: 12px; }
.fp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); margin-bottom: 6px; font-weight: 600; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; transition: .12s;
  display: inline-flex; align-items: center; gap: 4px;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.net-active { border-color: var(--accent); color: var(--accent); background: #ff6b0020; }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row .val { font-size: 12px; color: var(--text-dim); min-width: 52px; text-align: right; }
.search-box { position: relative; }
.search-box input {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px 9px 30px; border-radius: var(--radius-sm); font-size: 13px; outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-box .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-mute); font-size: 14px; }
.city-select {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13px; outline: none;
}
.city-select:focus { border-color: var(--accent); }
.coord-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.coord-val { flex: 1; font-family: monospace; font-size: 13px; color: var(--text-dim); background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; }
.search-results {
  margin-top: 6px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  max-height: 200px; overflow-y: auto;
}
.search-results .item { padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 13px; }
.search-results .item:last-child { border-bottom: none; }
.search-results .item:hover { background: #ff6b0015; }
.search-results .item .name { font-weight: 600; }
.search-results .item .meta { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.locate-btn {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; margin-top: 8px;
}
.locate-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Legend */
.legend {
  position: absolute; bottom: 12px; left: 12px; z-index: 900;
  background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 11px; box-shadow: var(--shadow);
}
.legend .row { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-compact { display: none; }

/* Stats banner */
.stats-banner {
  position: absolute; top: 56px; right: 12px; z-index: 900;
  background: var(--panel); backdrop-filter: blur(12px); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 12px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center;
}
.stats-banner .num { font-weight: 800; color: var(--accent); }
.stats-banner .lbl { color: var(--text-dim); }
.stats-banner .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }

/* Map markers — премиальные SVG-пины (как gdebenz) */
.zp-marker-wrap { background: none !important; border: none !important; }
.mk2 { position: relative; filter: drop-shadow(0 4px 8px rgba(0,0,0,.45)) drop-shadow(0 0 9px var(--marker-color));
  animation: mkIn .2s cubic-bezier(.34,1.3,.64,1) both; transition: filter .18s ease; cursor: pointer; }
.mk-inner { position: relative; transform-origin: 50% 100%; transition: transform .18s ease; }
.mk2 svg { display: block; position: relative; z-index: 1; }
.mk-pulse { position: absolute; left: 6px; top: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--marker-color); display: none; pointer-events: none; }
.mk-check { display: none; position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  color: #fff; font-size: 11px; font-weight: 700; z-index: 2; }
.mk2.voted .mk-check { display: block; }
.mk2.sel { z-index: 9; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)) drop-shadow(0 0 16px var(--marker-color)); }
.mk2.sel .mk-inner { transform: scale(1.18) translateY(-3px); }
.mk2.sel .mk-pulse { display: block; animation: mkPulse 1.8s ease-out infinite; }
@keyframes mkIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes mkPulse { 0% { opacity: .5; transform: scale(.9); } 70%,100% { opacity: 0; transform: scale(1.7); } }

/* Кластеры: кольцевая диаграмма по соотношению статусов */
.zp-cluster-wrap { background: none !important; border: none !important; }
.mcl-ring {
  position: relative; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev);
  box-shadow: 0 4px 12px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,0.25);
  animation: mkIn .2s ease-out both; cursor: pointer;
}
.mcl-ring svg { display: block; border-radius: 50%; }
.mcl-ring span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; font-weight: 800; color: var(--text); line-height: 1;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Bottom sheet (station card) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1100; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 560px; max-width: 100vw; max-height: 82vh; overflow-y: auto;
  background: var(--bg-elev); border: 1px solid var(--border); border-bottom: none;
  border-radius: 18px 18px 0 0; z-index: 1200; box-shadow: var(--shadow);
  animation: sheet-up .25s ease;
}
@keyframes sheet-up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet-head { position: sticky; top: 0; background: var(--bg-elev); padding: 14px 18px 10px; border-bottom: 1px solid var(--border); z-index: 2; }
.sheet-head .grab { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 10px; }
/* Drag-ручка для bottom sheet карточки АЗС */
.sheet-grab-handle { width: 42px; height: 5px; background: var(--text-mute); border-radius: 999px; margin: 10px auto 4px; cursor: grab; touch-action: none; opacity: .5; transition: opacity .15s; }
.sheet-grab-handle:hover { opacity: .9; }
.sheet-grab-handle:active { cursor: grabbing; }
.zp-drag-sheet { transition: max-height .2s ease; }
.zp-drag-sheet * { touch-action: pan-y; }
.sheet-head .title { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sheet-head .brand-line { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.sheet-head .close { position: absolute; top: 14px; right: 14px; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text-dim); width: 30px; height: 30px; border-radius: 50%; font-size: 16px; }
.sheet-body { padding: 14px 18px 24px; }

.status-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: none; }
.status-row .fuel { flex: 1; }
.status-row .fuel .name { font-weight: 600; font-size: 14px; }
.status-row .fuel .sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.status-row .price { font-weight: 800; font-size: 16px; color: var(--accent); }
.status-row .price .unit { font-size: 11px; color: var(--text-mute); font-weight: 500; }
.status-row .badge { font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.badge.fresh { background: #22c55e20; color: var(--green); }
.badge.verified { background: #22c55e30; color: var(--green); }
.badge.disputed { background: #eab30820; color: var(--yellow); }
.badge.stale { background: #6b728020; color: var(--text-mute); }
.queue-bar { display: flex; gap: 3px; margin-top: 4px; }
.queue-bar .seg { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-elev-2); }
.queue-bar .seg.on { background: var(--accent); }
.queue-bar .seg.on.red { background: var(--red); }

.empty-state { text-align: center; color: var(--text-mute); padding: 24px 12px; font-size: 13px; }

/* Buttons */
.btn { background: var(--accent); color: #fff; border: none; padding: 11px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; transition: .15s; }
.btn:hover { background: var(--accent-dim); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--bg-elev-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-elev-2); }
.btn.ghost.fav-on { border-color: #FFB300; color: #FFB300; background: #ffb30018; }
.btn.sm { padding: 7px 12px; font-size: 12px; }

/* Route dropdown (выбор навигатора) */
.route-dropdown { position: relative; }
.route-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 10;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 6px; min-width: 180px; display: flex; flex-direction: column; gap: 2px;
}
.route-menu a {
  padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text);
  text-decoration: none; transition: .12s; display: flex; justify-content: space-between; align-items: center;
}
.route-menu a:hover { background: var(--bg-elev-2); color: var(--accent); }

/* Best nearby */
.best-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; transition: .12s; }
.best-item:hover { border-color: var(--accent); background: #ff6b0010; }
.best-rank { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.best-info { flex: 1; min-width: 0; }
.best-name { font-weight: 700; font-size: 14px; }
.best-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

/* History */
.history-list { margin-top: 10px; }
.history-list .h-item { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.history-list .h-item .l { color: var(--text-dim); }
.history-list .h-item .r { font-weight: 600; }
.history-toggle { background: none; border: none; color: var(--accent); font-size: 12px; font-weight: 600; padding: 6px 0; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); width: 400px; max-width: 100%; padding: 22px; box-shadow: var(--shadow); animation: modal-in .2s; }
@keyframes modal-in { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; font-weight: 600; }
.field input, .field select {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 14px; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.field textarea {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 14px; outline: none; resize: vertical; font-family: inherit;
}
.field textarea:focus { border-color: var(--accent); }
.fb-form { margin-top: 8px; }

/* Ad slots */
.ad-top { padding: 6px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--border); text-align: center; }
.ad-card { margin-top: 16px; padding: 8px; background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; }
.show-desktop { display: block; }
.show-mobile { display: none; }
@media (max-width: 640px) {
  .show-desktop { display: none; }
  .show-mobile { display: block; }
}
.code-hint { background: var(--bg-elev-2); border: 1px dashed var(--accent); color: var(--accent); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 12px; margin: 10px 0; font-family: monospace; }
.error-msg { color: var(--red); font-size: 12px; margin-top: 8px; }
.help-link { font-size: 12px; color: var(--text-dim); margin-top: 10px; text-align: center; }

/* Report form */
.rform .section { margin-bottom: 14px; }
.rform .section > label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.toggle-group { display: flex; gap: 6px; }
.toggle-group .t { flex: 1; text-align: center; padding: 9px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev-2); font-weight: 600; font-size: 13px; color: var(--text-dim); transition: .12s; }
.toggle-group .t:hover { border-color: var(--accent); }
.toggle-group .t.yes.active { background: var(--green); color: #06210f; border-color: var(--green); }
.toggle-group .t.no.active { background: var(--red); color: #fff; border-color: var(--red); }
.toggle-group .t.unknown.active { background: var(--bg-elev-2); color: var(--text); border-color: var(--text-dim); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.opt-grid .o { padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev-2); font-size: 12px; font-weight: 600; color: var(--text-dim); text-align: center; transition: .12s; }
.opt-grid .o:hover { border-color: var(--accent); }
.opt-grid .o.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.opt-grid .o .d { display: block; font-size: 10px; font-weight: 500; color: inherit; opacity: .8; margin-top: 2px; }
.price-input { display: flex; align-items: center; gap: 6px; }
.price-input input { width: 110px; }
.price-input .unit { color: var(--text-mute); font-size: 13px; }
.price-input .avg { font-size: 11px; color: var(--text-mute); margin-left: 8px; }

/* Leaderboard / profile views */
/* Views — full-screen app panels (не страницы со скроллом, а экраны приложения) */
.view {
  position: fixed; inset: 0; top: calc(env(safe-area-inset-top, 0px) + 54px);
  background: var(--bg); z-index: 1050; overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 16px; max-width: 640px; margin: 0 auto;
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  animation: view-in .22s cubic-bezier(.4,0,.2,1);
}
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.view-head h2 { margin: 0; font-size: 22px; }
.view-head .back { background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text); width: 38px; height: 38px; border-radius: 50%; font-size: 18px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.lb-row .rank { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-elev-2); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.lb-row .rank.r1 { background: #ffd70030; color: #ffd700; }
.lb-row .rank.r2 { background: #c0c0c030; color: #d4d4d4; }
.lb-row .rank.r3 { background: #cd7f3230; color: #cd7f32; }
.lb-row .info { flex: 1; }
.lb-row .info .name { font-weight: 700; }
.lb-row .info .meta { font-size: 11px; color: var(--text-mute); }
.lb-row .pts { font-weight: 800; color: var(--accent); }
.lb-tabs { display: flex; gap: 6px; margin-bottom: 14px; }

.profile-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.profile-card .top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-dim)); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; }
.profile-card .name { font-size: 18px; font-weight: 800; }
.profile-card .level { color: var(--accent); font-weight: 700; font-size: 13px; }
.progress { height: 8px; background: var(--bg-elev-2); border-radius: 4px; margin: 12px 0 6px; overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--accent), #ff9540); border-radius: 4px; transition: width .4s; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat-cell { background: var(--bg-elev-2); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.stat-cell .v { font-size: 20px; font-weight: 800; color: var(--accent); }
.stat-cell .l { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ach-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.ach-card.earned { border-color: var(--accent); background: #ff6b0010; }
.ach-card .ic { font-size: 26px; }
.ach-card .n { font-weight: 700; font-size: 13px; margin-top: 4px; }
.ach-card .d { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.ach-card.locked .ic { filter: grayscale(1); opacity: .4; }
.ach-card.locked .n, .ach-card.locked .d { opacity: .5; }
.section-title { font-size: 14px; font-weight: 700; margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }

.rform-simple label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 7px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.rform-simple .fuel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.rform-simple .section-label { margin-top: 6px; }
.big-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-buttons .bb {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 18px 10px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-elev-2); color: var(--text); font-family: inherit; transition: .12s;
}
.big-buttons .bb:disabled { opacity: .6; cursor: wait; }
.big-buttons .bb .ico { font-size: 24px; }
.big-buttons .bb .tt { font-size: 15px; font-weight: 700; }
.big-buttons .bb .dd { font-size: 11px; color: var(--text-mute); text-align: center; line-height: 1.25; }
.big-buttons .bb.green { border-color: #22c55e50; background: #22c55e12; }
.big-buttons .bb.green:hover { background: #22c55e25; }
.big-buttons .bb.orange { border-color: #f9731650; background: #f9731612; }
.big-buttons .bb.orange:hover { background: #f9731625; }
.big-buttons .bb.yellow { border-color: #eab30850; background: #eab30812; }
.big-buttons .bb.yellow:hover { background: #eab30825; }
.big-buttons .bb.red { border-color: #ef444450; background: #ef444412; }
.big-buttons .bb.red:hover { background: #ef444425; }
.thanks { text-align: center; padding: 10px 6px 16px; }
.thanks .heart { font-size: 52px; margin-bottom: 10px; }
.thanks .title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.thanks .sub { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.donate-link { display: block; text-align: center; margin-top: 14px; color: #ff4d6d; font-size: 13px; font-weight: 600; }
.donate-link:hover { color: #ff758f; }

/* Toast */
.toast-wrap { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--bg-elev); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 18px; box-shadow: var(--shadow); max-width: 90vw; font-size: 14px; animation: toast-in .25s; }
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast .t { font-weight: 700; }
.toast .m { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Leaflet tweaks */
.leaflet-container { background: var(--map-bg); }
.leaflet-attribution-flag { display: none !important; }

/* Тёмная тема карты: те же OSM-тайлы + CSS-фильтр (без смены провайдера, атрибуция не меняется).
   Значения фильтра — community-протестированные (gist BrendonKoz/leaflet-darkmode):
   дают настоящий «night mode» (тёмный фон, приглушённые дороги) вместо грубой инверсии.
   Маркеры/попапы НЕ под фильтром (они в overlay-pane). */
.zp-dark-tiles .leaflet-tile-pane {
  filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}
.leaflet-bottom.leaflet-left {
  /* На десктопе attribution слева, но справа от панели фильтров (300px), чтобы не заезжал за неё */
  left: 320px !important; right: auto !important; bottom: 10px !important;
  transform: none !important;
}
/* Контролы атрибуции — читаемы в обеих темах (через var уже), но фиксим фон плашки под фильтром */
.leaflet-control-attribution {
  background: var(--panel) !important;
  color: var(--text-dim) !important;
  backdrop-filter: blur(6px);
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 2px 6px !important;
  font-size: 10px !important;
  white-space: nowrap !important;
  max-width: 260px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  z-index: 1000 !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }

/* Мобильные чипсы-фильтры (горизонтальный скролл под шапкой) */
.mobile-filter-bar { display: none; }
@media (max-width: 640px) {
  .mobile-filter-bar {
    display: flex; align-items: center; gap: 6px;
    position: relative; top: auto; left: auto; right: auto; z-index: 900;
    flex-shrink: 0; padding: 8px 10px 16px; margin-top: 12px;
  }
  .mf-chips { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
  .mf-chips::-webkit-scrollbar { height: 4px; display: block; }
  .mf-chips::-webkit-scrollbar-track { background: transparent; }
  .mf-chips::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
  .mf-chip {
    flex-shrink: 0; background: transparent;
    border: 1px solid var(--text-mute); color: var(--text-dim); padding: 7px 13px;
    border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .12s;
  }
  .mf-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .mf-filters-btn {
    flex-shrink: 0;
    background: var(--accent); border: 1px solid var(--accent); color: #fff;
    padding: 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 600;
    white-space: nowrap; cursor: pointer; transition: .12s;
    align-self: flex-end; transform: translateY(8px);
  }
  /* Скрываем десктоп-панель фильтров на мобайл */
  .filters-panel { display: none !important; }
}

/* Bottom sheet полных фильтров */
.filter-sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1150; }
.filter-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200;
  background: var(--bg-elev); border-radius: 22px 22px 0 0; border-top: 1px solid var(--border);
  padding: 8px 18px 24px; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 -12px 40px rgba(0,0,0,.5); padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.filter-sheet-grab { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 8px auto 12px; cursor: grab; }
.filter-sheet h3 { margin: 0 0 16px; font-size: 18px; }
.fs-section { margin-bottom: 16px; }
.fs-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mute); margin-bottom: 8px; font-weight: 600; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-select {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 12px; border-radius: var(--radius-sm); font-size: 14px; outline: none;
}
.fs-range { width: 100%; accent-color: var(--accent); }
.filter-sheet .btn { margin-top: 8px; }
@media (min-width: 641px) {
  .filter-sheet {
    left: 50%; right: auto; transform: translateX(-50%);
    width: 420px; max-width: calc(100vw - 32px);
    border-radius: 22px 22px 0 0;
  }
}

/* Единый стиль range-слайдеров (светлая/тёмная) */
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: var(--bg-elev-2);
  border-radius: 999px; outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-elev);
  box-shadow: var(--shadow-sm); margin-top: -6px;
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-elev);
  box-shadow: var(--shadow-sm);
}
input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px; background: var(--bg-elev-2);
}
input[type=range]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--bg-elev-2);
}

/* Список городов в bottom sheet */
.city-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.city-list-item {
  text-align: left; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; cursor: pointer; transition: .12s;
}
.city-list-item:hover, .city-list-item.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* Анимация bottom sheet */
.sheet-up-enter-active, .sheet-up-leave-active { transition: transform .3s cubic-bezier(.4,0,.2,1); }
.sheet-up-enter-from, .sheet-up-leave-to { transform: translateY(100%); }
.leaflet-control-zoom,
.leaflet-control-locate {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.leaflet-control-zoom {
  display: flex; flex-direction: column; gap: 8px;
}
.leaflet-control-zoom a,
.leaflet-control-locate,
.leaflet-bar a.leaflet-control-zoom-in,
.leaflet-bar a.leaflet-control-zoom-out {
  background: var(--bg-elev) !important; color: var(--text) !important;
  border: none !important; border-radius: 10px !important;
  width: 38px !important; height: 38px !important;
  font-size: 18px !important; font-weight: 700; line-height: 1 !important;
  display: flex !important; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s; padding: 0 !important;
}
.leaflet-control-zoom a:hover,
.leaflet-control-locate:hover { background: var(--bg-elev-2) !important; color: var(--accent) !important; }
.leaflet-control-zoom a:active,
.leaflet-control-locate:active { transform: scale(.96); }
.leaflet-control-zoom-in {
  border-bottom: none !important;
}
.leaflet-control-zoom-out {
  border-top: none !important;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--bg-elev); color: var(--text); border: 1px solid var(--border); }
.leaflet-popup-content { margin: 10px 12px; font-family: var(--font); }
.leaflet-bar { border: none !important; }

/* Кнопка геолокации на карте */
.leaflet-control-locate {
  color: var(--accent) !important;
  margin-top: 8px !important;
}
.leaflet-control-locate:focus { outline: none; }

/* Mobile — app feel */
@media (max-width: 640px) {
  .app-header { gap: 7px; height: calc(env(safe-area-inset-top, 0px) + 50px); padding: env(safe-area-inset-top, 0px) 10px 0; padding-top: calc(env(safe-area-inset-top, 0px) + 8px); }
  .brand { font-size: 14px; }
  .brand .logo { font-size: 17px; }
  .brand-text { display: inline; }
  .brand .brand-text .accent { display: none; }
  .header-city-select {
    display: inline-flex; align-items: center; gap: 6px;
    max-width: 150px; font-size: 12px; font-weight: 700;
    padding: 7px 12px;
    background: var(--panel);
    border: 1px solid var(--accent);
    color: var(--text);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
  }
  .header-city-select .hc-arrow { font-size: 10px; color: var(--accent); line-height: 1; }
  .header-btn { padding: 6px 7px; font-size: 10px; }
  .header-btn.donate { padding: 6px 7px; }
  .header-filters-toggle { display: inline-flex; padding: 6px 8px; font-size: 13px; }

  /* Карта — flex-колонка: баннер → чипсы → сама карта.
     Низ карты привязан к реальной высоте bottom-nav (JS выставляет --bottom-nav-height),
     чтобы легенда и attribution не уходили под навигацию на Android/Telegram. */
  .map-wrap {
    position: fixed; left: 0; right: 0;
    top: calc(env(safe-area-inset-top, 0px) + 50px);
    bottom: var(--bottom-nav-height, 70px);
    display: flex; flex-direction: column;
  }
  #map { position: relative; flex: 1; min-height: 0; }
  .filters-panel { display: none !important; }

  .info-banner {
    flex-shrink: 0; padding: 6px 12px; font-size: 11px; gap: 6px;
    background: var(--bg-elev); border-bottom: 1px solid var(--border);
  }
  .info-banner-full { padding: 8px 12px; font-size: 11px; }

  .stats-banner {
    position: relative; top: auto; right: auto; align-self: flex-end;
    margin: 2px 10px 0 0; padding: 4px 8px; gap: 8px;
    font-size: 10px; border-radius: 999px;
    background: transparent !important; backdrop-filter: none !important;
    box-shadow: none !important; border: none !important;
  }
  .stats-banner .lbl { display: inline; font-size: 10px; }

  /* Легенда — сворачиваемая, справа внизу над bottom-nav.
     Расстояние от низа берётся от дна .map-wrap, который уже заканчивается
     у верхнего края bottom-nav благодаря --bottom-nav-height. */
  .legend {
    display: block; position: absolute; right: 10px; bottom: 12px; left: auto; top: auto; z-index: 900;
    padding: 6px 8px; font-size: 10px; max-width: calc(50vw - 20px);
    cursor: pointer; user-select: none;
  }
  .legend .legend-rows { display: none; }
  .legend.open .legend-rows { display: block; }
  .legend .legend-compact { display: flex; align-items: center; }
  .legend.open .legend-compact { display: none; }
  .legend .row { gap: 5px; margin: 2px 0; }
  .legend .dot { width: 8px; height: 8px; }
  .legend-dots { display: flex; align-items: center; gap: 4px; }
  .legend-hint {
    margin-left: 5px; font-size: 10px; font-weight: 700; color: var(--text-dim);
  }

  /* Leaflet controls — справа, на уровне середины карты, раздвинуты */
  .leaflet-bottom.leaflet-right {
    right: 10px !important; top: 40% !important; bottom: auto !important;
    transform: none !important;
    display: flex; flex-direction: column; gap: 14px; align-items: flex-end;
  }
  .leaflet-control-zoom { display: flex; flex-direction: column; gap: 14px; }
  .leaflet-control-zoom a { line-height: 1; padding: 0; }
  .leaflet-control-locate { margin-top: 0 !important; }

  /* Attribution — слева внизу, мелкий и не бросается в глаза.
     Низ привязан к дну .map-wrap через --bottom-nav-height. */
  .leaflet-bottom.leaflet-left {
    left: 10px !important; right: auto !important; bottom: 10px !important;
    transform: none !important;
  }
  .leaflet-control-attribution {
    white-space: nowrap !important;
    background: var(--bg-elev) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    padding: 2px 6px !important;
    font-size: 8px !important;
    color: var(--text-dim) !important;
    box-shadow: none !important;
    max-width: 32vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .leaflet-control-attribution a { color: var(--text-dim) !important; text-decoration: underline !important; }

  /* Bottom sheet карточки АЗС — выезжает снизу, backdrop dim, safe-area */
  .sheet { width: 100vw; max-height: 85vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .sheet-backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
  .sheet-head { padding: 12px 16px 10px; }
  .sheet-head .title { font-size: 17px; }
  .sheet-body { padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .btn { padding: 13px 16px; font-size: 15px; }

  .big-buttons { grid-template-columns: 1fr; }
  .big-buttons .bb { padding: 16px 12px; }
  .big-buttons .bb .tt { font-size: 16px; }
  .big-buttons .bb .dd { font-size: 12px; }

  .status-row { padding: 12px 0; }
  .status-row .fuel .name { font-size: 15px; }
  .status-row .price { font-size: 17px; }

  /* Bottom nav — плавающий glass bar с safe-area.
     Safe-area учитывается только в .nav-row, чтобы не дублировать отступ
     и чтобы JS мог корректно измерить реальную высоту панели. */
  .bottom-nav {
    background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
  }
  .bottom-nav .nav-row { padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px)); }
  .nav-fab { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .nav-fab-plus { width: 46px; height: 46px; font-size: 22px; }
  .nav-fab-label { display: none; }
}

@media (max-width: 380px) {
  .brand { font-size: 13px; }
  .brand .logo { font-size: 16px; }
  .header-city-select { max-width: 110px; font-size: 10px; padding: 6px 10px; gap: 4px; }
  .header-btn { padding: 6px 7px; font-size: 10px; }
  .stats-banner { font-size: 10px; padding: 4px 7px; gap: 6px; margin-right: 6px; }
  .stats-banner .lbl { font-size: 9px; }
  .legend { font-size: 8px; padding: 5px 6px; max-width: calc(50vw - 16px); }
}

/* Desktop — app feel (правки только десктопной версии, не смешиваются с мобильной) */
@media (min-width: 641px) {
  /* Фильтры и легенда — не слипаются: ограничиваем высоту панели фильтров,
     чтобы она не доходила до легенды внизу слева */
  .filters-panel { max-height: calc(100vh - 280px); }

  /* Кнопки приближения/отдаления и местоположения — повыше на правой стороне */
  .leaflet-bottom.leaflet-right {
    right: 12px !important; bottom: auto !important; top: 90px !important;
    transform: none !important;
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  }
  .leaflet-control-zoom { display: flex; flex-direction: column; gap: 10px; }
  .leaflet-control-locate { margin-top: 0 !important; }

  /* Лицензия (attribution) — справа снизу */
  .leaflet-bottom.leaflet-left {
    left: auto !important; right: 12px !important; bottom: 10px !important;
    transform: none !important;
  }
}
.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* Static pages (about/privacy/terms) */
.static-article h3 { margin: 0 0 8px; font-size: 18px; }
.static-article p { margin: 0 0 12px; color: var(--text); }
.static-article ul { margin: 0 0 14px; padding-left: 20px; }
.static-article ul li { margin: 4px 0; color: var(--text-dim); }
.static-article .text-mute { color: var(--text-mute); font-size: 12px; margin-top: -4px; }
.static-article code { background: var(--bg-elev-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.static-article a { color: var(--accent); }
.disclaimer {
  background: #eab30812; border: 1px solid #eab30850; border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-size: 13px; color: var(--text);
}
.site-footer {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: center;
  padding: 24px 12px 16px; margin-top: 8px; font-size: 13px;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }
.hide-sm { display: inline; }
/* Bottom navigation (как у мини-приложений / gdebenz) */
.bottom-nav {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1150;
  background: var(--panel); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  /* safe-area учитывается в .nav-row, чтобы не дублировать высоту панели */
}
.bottom-nav .nav-row {
  display: flex; align-items: center; justify-content: space-around;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; color: var(--text-dim); font-size: 10px; font-weight: 600;
  background: none; border: none; transition: .15s; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav .nav-item:active { transform: scale(.92); }
.bottom-nav .nav-item .ico { font-size: 20px; line-height: 1; }
.bottom-nav .nav-item.active { color: var(--accent); }
.bottom-nav .nav-item.add { color: var(--accent); }

/* Центральная FAB «Добавить АЗС» — приподнята над nav-bar, как у мини-приложений */
.nav-fab {
  position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; cursor: pointer; z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.nav-fab:active { transform: translateX(-50%) scale(.94); }
.nav-fab-plus {
  width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(255,107,0,.45), 0 0 0 4px var(--bg);
  line-height: 1; transition: box-shadow .15s;
}
.nav-fab:active .nav-fab-plus { box-shadow: 0 4px 14px rgba(255,107,0,.5), 0 0 0 4px var(--bg); }
.nav-fab-label { font-size: 10px; font-weight: 700; color: var(--accent); }

/* Экран «Ситуация» — список ближайших АЗС */
.zp-list-view { padding: 16px 14px 110px; }
.zp-list-view .view-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.zp-list-view .view-head h2 { margin: 0; font-size: 22px; }
.zp-list-summary { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-dim); margin-bottom: 14px; }
.zp-list-summary .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; }
.zp-list-cards { display: flex; flex-direction: column; gap: 8px; }
.zp-list-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: .12s;
}
.zp-list-card:hover { border-color: var(--accent); }
.zp-list-card:active { transform: scale(.99); }
.zp-list-status { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px; }
.zp-list-status.green { background: color-mix(in srgb, var(--green) 15%, transparent); }
.zp-list-status.yellow { background: color-mix(in srgb, var(--yellow) 15%, transparent); }
.zp-list-status.red { background: color-mix(in srgb, var(--red) 15%, transparent); }
.zp-list-status.gray { background: color-mix(in srgb, var(--gray) 15%, transparent); }
.zp-list-body { flex: 1; min-width: 0; }
.zp-list-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zp-list-meta { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.zp-list-sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; }
.zp-list-chev { color: var(--text-mute); font-size: 20px; flex-shrink: 0; }

@media (max-width: 640px) {
  .hide-sm { display: none; }
  .static-article h3 { font-size: 17px; }
  .bottom-nav { display: block; }
  /* View-экраны (about/favorites/list/admin) заканчиваются у верхнего края bottom-nav,
     чтобы навигация оставалась видна и не перекрывала контент. */
  .view { bottom: var(--bottom-nav-height, 70px); padding-bottom: 16px; }
  .sheet { bottom: 0; }
}

/* Админка /admin */
.zp-admin-view { padding: 0; max-width: 900px; }
.admin-page { min-height: 100vh; background: var(--bg); }
.admin-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.admin-login-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 440px; width: 100%; box-shadow: var(--shadow); }
.admin-login-card h2 { margin: 0 0 12px; font-size: 20px; }
.admin-login-card p { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.admin-login-card ol { margin: 0 0 16px; padding-left: 20px; color: var(--text); font-size: 14px; line-height: 1.7; }
.admin-login-card ol li { margin: 4px 0; }
.admin-login-card code { background: var(--bg-elev-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 4px; font-size: 13px; }
.admin-login-card a { color: var(--accent); }
.admin-code-input {
  width: 100%; background: var(--bg-elev-2); border: 1px solid var(--border); color: var(--text);
  padding: 14px; border-radius: var(--radius-sm); font-size: 20px; text-align: center; letter-spacing: .3em;
  outline: none; margin-bottom: 12px; font-family: monospace;
}
.admin-code-input:focus { border-color: var(--accent); }
.admin-panel { padding: 20px; max-width: 900px; margin: 0 auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-head h2 { margin: 0; font-size: 22px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-dim); }
.admin-table { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-name { font-weight: 700; font-size: 16px; }
.admin-row-meta { font-size: 13px; color: var(--text-dim); margin-top: 4px; }
.admin-row-meta a { color: var(--accent); text-decoration: none; }
.admin-row-date { font-size: 11px; color: var(--text-mute); margin-top: 4px; }
.admin-row-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
@media (max-width: 640px) {
  .admin-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-row-actions { flex-direction: row; }
  .admin-row-actions .btn { flex: 1; }
}
