/*
Theme Name: Benz Monitor
Theme URI: https://example.com/benz-monitor
Author: OpenAI
Description: Лёгкая WordPress-тема для мониторинга наличия топлива, цен и ограничений на АЗС России.
Version: 3.3.17
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: benz-monitor
*/

:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --text: #17211b;
  --muted: #68756d;
  --line: #dfe8e2;
  --brand: #169451;
  --brand-strong: #0c733c;
  --brand-soft: #dcf7e8;
  --warning: #c98500;
  --restricted: #7c5cc4;
  --danger: #d94545;
  --stale: #6f7b75;
  --unknown: #a3aea8;
  --shadow: 0 16px 42px rgba(19, 56, 35, 0.08);
  --radius: 22px;
  --container: 1240px;
}

[data-theme="dark"] {
  --bg: #0d1511;
  --surface: #131e18;
  --surface-2: #19271f;
  --text: #edf7f0;
  --muted: #9eaea4;
  --line: #26372d;
  --brand: #38c879;
  --brand-strong: #56db90;
  --brand-soft: #173c27;
  --warning: #e3aa35;
  --danger: #ff7474;
  --stale: #718078;
  --unknown: #96a49c;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; }

.bm-container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }

.bm-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.bm-header__inner { min-height: 74px; display: flex; align-items: center; gap: 24px; }
.bm-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 21px; }
.bm-brand__mark { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); display: grid; place-items: center; color: white; box-shadow: 0 8px 22px rgba(22,148,81,.23); }
.bm-brand__mark svg { width: 20px; height: 20px; }
.bm-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 650; color: var(--muted); }
.bm-nav a:hover { color: var(--text); }
.bm-theme-toggle { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); display: grid; place-items: center; }

.bm-hero { padding: 64px 0 34px; }
.bm-hero__grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 34px; align-items: center; }
.bm-kicker { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); color: var(--brand-strong); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 750; }
.bm-kicker::before { content:""; width: 8px; height:8px; border-radius:50%; background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb,var(--brand) 15%,transparent); }
.bm-hero h1 { font-size: clamp(38px, 6vw, 72px); line-height: .98; letter-spacing: -0.055em; margin: 18px 0 20px; max-width: 850px; }
.bm-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(17px,2vw,20px); }
.bm-search { margin-top: 28px; display: flex; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); max-width: 760px; }
.bm-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); padding: 10px 12px; }
.bm-search button { border:0; background: var(--brand); color:white; border-radius: 13px; padding: 0 18px; font-weight: 750; }

.bm-summary-card { background: linear-gradient(145deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: var(--shadow); }
.bm-summary-card h2 { margin: 0 0 4px; font-size: 18px; }
.bm-summary-card > p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.bm-stats { display:grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.bm-stat { padding: 16px; background: var(--surface); border:1px solid var(--line); border-radius: 17px; }
.bm-stat strong { display:block; font-size: 26px; line-height:1; }
.bm-stat span { display:block; margin-top:7px; color: var(--muted); font-size: 12px; }
.bm-stat__dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }

.bm-section { padding: 34px 0 70px; }
.bm-section__head { display:flex; justify-content:space-between; gap:20px; align-items:end; margin-bottom:18px; }
.bm-section__head h2 { margin:0; font-size: clamp(26px,4vw,42px); letter-spacing:-.035em; }
.bm-section__head p { margin:0; color:var(--muted); max-width:580px; }

.bm-toolbar { background: var(--surface); border:1px solid var(--line); border-radius:20px; padding:12px; display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.bm-filter-label { color:var(--muted); font-size:13px; font-weight:700; padding-left:4px; }
.bm-fuel-filters { display:flex; flex-wrap:wrap; gap:7px; }
.bm-filter-btn { border:1px solid var(--line); background:var(--surface-2); color:var(--text); padding:9px 13px; border-radius:12px; font-size:13px; font-weight:750; }
.bm-filter-btn.is-active { background:var(--text); color:var(--surface); border-color:var(--text); }
.bm-status-filter { margin-left:auto; border:1px solid var(--line); background:var(--surface); color:var(--text); padding:9px 12px; border-radius:12px; }
.bm-locate-btn { border:1px solid var(--line); background:var(--brand-soft); color:var(--brand-strong); padding:9px 13px; border-radius:12px; font-size:13px; font-weight:800; white-space:nowrap; }
.bm-locate-btn:hover { border-color:color-mix(in srgb,var(--brand) 45%,var(--line)); }
.bm-locate-btn[disabled] { opacity:.65; cursor:wait; }

.bm-map-layout { display:grid; grid-template-columns: minmax(0,1.6fr) minmax(300px,.7fr); gap:14px; min-height:610px; }
.bm-map-wrap, .bm-panel { background:var(--surface); border:1px solid var(--line); border-radius:24px; overflow:hidden; box-shadow: var(--shadow); }
#benz-map { min-height:610px; height:100%; width:100%; background:var(--surface-2); }
.bm-panel { display:flex; flex-direction:column; min-height:610px; }
.bm-panel__head { padding:18px 18px 12px; border-bottom:1px solid var(--line); }
.bm-panel__head strong { display:block; font-size:16px; }
.bm-panel__head span { color:var(--muted); font-size:12px; }
.bm-station-list { padding:10px; overflow:auto; max-height: 540px; }
.bm-station-card { display:block; padding:14px; border:1px solid transparent; border-radius:16px; transition:.16s ease; }
.bm-station-card + .bm-station-card { margin-top:5px; }
.bm-station-card:hover, .bm-station-card.is-selected { background:var(--surface-2); border-color:var(--line); }
.bm-station-card__top { display:flex; align-items:flex-start; gap:10px; justify-content:space-between; }
.bm-station-card h3 { margin:0; font-size:15px; }
.bm-station-card p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.bm-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.bm-badge::before { content:""; width:7px; height:7px; border-radius:50%; background: currentColor; }
.bm-badge--available { color:var(--brand-strong); background:var(--brand-soft); }
.bm-badge--limited { color:var(--warning); background:color-mix(in srgb,var(--warning) 14%,transparent); }
.bm-badge--unavailable { color:var(--danger); background:color-mix(in srgb,var(--danger) 12%,transparent); }
.bm-badge--unknown { color:#68756d; background:color-mix(in srgb,var(--unknown) 18%,transparent); }
.bm-badge--stale { color:var(--stale); background:color-mix(in srgb,var(--stale) 14%,transparent); }
.bm-fuel-row { margin-top:11px; display:flex; gap:6px; flex-wrap:wrap; }
.bm-fuel-chip { padding:5px 7px; border-radius:8px; background:var(--surface); border:1px solid var(--line); font-size:11px; font-weight:750; }
.bm-empty { padding:28px 18px; color:var(--muted); text-align:center; }

.bm-marker { width:22px; height:22px; border-radius:50% 50% 50% 8px; transform:rotate(-45deg); border:3px solid white; box-shadow:0 5px 14px rgba(0,0,0,.28); }
.bm-marker--available { background:#169451; }
.bm-marker--limited { background:#d79a14; }
.bm-marker--unavailable { background:#d94545; }
.bm-marker--stale { background:#8e9a93; }
.leaflet-popup-content-wrapper { border-radius:16px !important; }
.bm-popup { min-width:220px; }
.bm-popup h3 { margin:0 0 3px; font-size:15px; }
.bm-popup p { margin:0 0 10px; color:#67736c; font-size:12px; }
.bm-popup__fuel { display:grid; grid-template-columns: 1fr auto; gap:5px 12px; font-size:12px; }
.bm-popup__link { display:inline-block; margin-top:10px; font-weight:800; color:#0c733c; }

.bm-info-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:14px; }
.bm-info-card { background:var(--surface); border:1px solid var(--line); border-radius:22px; padding:22px; }
.bm-info-card__icon { width:42px; height:42px; border-radius:14px; display:grid; place-items:center; background:var(--brand-soft); color:var(--brand-strong); margin-bottom:16px; font-size:20px; }
.bm-info-card h3 { margin:0 0 7px; font-size:18px; }
.bm-info-card p { margin:0; color:var(--muted); font-size:14px; }

.bm-demo-note { margin-top:14px; padding:13px 15px; border-radius:14px; background: color-mix(in srgb,var(--warning) 10%,var(--surface)); border:1px solid color-mix(in srgb,var(--warning) 25%,var(--line)); color:var(--muted); font-size:12px; }

.bm-page { padding:46px 0 72px; }
.bm-page__header { margin-bottom:24px; }
.bm-page__header h1 { margin:0 0 8px; font-size:clamp(30px,5vw,54px); letter-spacing:-.045em; }
.bm-page__header p { color:var(--muted); margin:0; }
.bm-content-card { background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:24px; box-shadow:var(--shadow); }
.bm-detail-grid { display:grid; grid-template-columns: minmax(0,1fr) 340px; gap:18px; }
.bm-table { width:100%; border-collapse:collapse; }
.bm-table th,.bm-table td { padding:13px 10px; border-bottom:1px solid var(--line); text-align:left; }
.bm-table th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.bm-meta-list { display:grid; gap:10px; }
.bm-meta-item { background:var(--surface-2); border-radius:14px; padding:13px; }
.bm-meta-item span { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
.bm-meta-item strong { display:block; margin-top:3px; }

.bm-footer { border-top:1px solid var(--line); padding:28px 0 36px; color:var(--muted); font-size:12px; }
.bm-footer__inner { display:flex; justify-content:space-between; gap:20px; }

@media (max-width: 1120px) {
  .bm-nav { display:none; }
  .bm-theme-toggle { margin-left:auto; }
  .bm-hero { padding-top:42px; }
  .bm-hero__grid, .bm-map-layout, .bm-detail-grid { grid-template-columns:1fr; }
  .bm-hero__grid { gap:22px; }
  .bm-hero h1 { font-size:clamp(46px,7vw,62px); max-width:760px; }
  .bm-summary-card { padding:20px; }
  .bm-summary-card .bm-stats { grid-template-columns:repeat(5,1fr); }
  .bm-map-layout { min-height:0; }
  #benz-map { height:520px; min-height:520px; }
  .bm-panel { min-height:auto; }
  .bm-station-list { max-height:480px; }
  .bm-info-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 620px) {
  .bm-container { width:min(calc(100% - 20px),var(--container)); }
  .bm-header__inner { min-height:64px; }
  .bm-brand { font-size:18px; }
  .bm-hero { padding:32px 0 24px; }
  .bm-hero h1 { font-size:38px; line-height:1.02; }
  .bm-search { display:grid; grid-template-columns:1fr; border-radius:16px; }
  .bm-search button { min-height:44px; }
  .bm-section { padding:26px 0 48px; }
  .bm-section__head { display:block; }
  .bm-section__head p { margin-top:8px; }
  .bm-toolbar { align-items:stretch; }
  .bm-status-filter { margin-left:0; width:100%; }
  .bm-locate-btn { width:100%; min-height:42px; }
  #benz-map { height:400px; min-height:400px; }
  .bm-summary-card .bm-stats { grid-template-columns:1fr 1fr; }
  .bm-info-grid { grid-template-columns:1fr; }
  .bm-station-list { max-height:none; overflow:visible; }
  .bm-footer__inner { display:block; }
}


/* v1.2 — карта как главный интерфейс */
.bm-map-wrap { position:relative; }
.bm-map-actions { position:absolute; z-index:650; top:12px; right:12px; display:flex; gap:8px; }
.bm-map-action { width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(23,33,27,.12); border-radius:12px; background:rgba(255,255,255,.94); color:#17211b; font-weight:900; font-size:18px; box-shadow:0 5px 18px rgba(20,40,29,.12); backdrop-filter:blur(10px); }
.bm-map-action:hover { transform:translateY(-1px); }
.bm-map-legend { position:absolute; z-index:640; left:12px; bottom:12px; display:flex; gap:8px; flex-wrap:wrap; max-width:calc(100% - 24px); padding:8px 10px; border-radius:12px; background:rgba(255,255,255,.93); border:1px solid rgba(23,33,27,.1); box-shadow:0 5px 18px rgba(20,40,29,.1); backdrop-filter:blur(10px); color:#435047; font-size:10px; font-weight:750; }
.bm-map-legend span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.bm-map-legend i { width:8px; height:8px; border-radius:50%; }
.bm-map-legend .is-available { background:#169451; }
.bm-map-legend .is-limited { background:#d79a14; }
.bm-map-legend .is-unavailable { background:#d94545; }
.bm-map-legend .is-unknown { background:#a3aea8; }
.bm-map-legend .is-stale { background:#6f7b75; }
.bm-map-location-note { position:absolute; z-index:645; top:62px; right:12px; max-width:240px; padding:9px 11px; border-radius:12px; background:rgba(23,33,27,.9); color:#fff; font-size:11px; box-shadow:0 8px 24px rgba(0,0,0,.18); }

.bm-user-marker { position:relative; width:16px; height:16px; border-radius:50%; background:#2b79ff; border:3px solid #fff; box-shadow:0 0 0 5px rgba(43,121,255,.2),0 4px 14px rgba(0,0,0,.25); }
.bm-user-marker::after { content:""; position:absolute; inset:-8px; border:2px solid rgba(43,121,255,.35); border-radius:50%; animation:bm-pulse 1.8s ease-out infinite; }
@keyframes bm-pulse { 0%{transform:scale(.55);opacity:1} 100%{transform:scale(1.5);opacity:0} }

.bm-cluster { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; color:#fff; border:3px solid rgba(255,255,255,.94); box-shadow:0 7px 20px rgba(0,0,0,.24); font-size:12px; font-weight:900; }
.bm-cluster--available { background:#169451; }
.bm-cluster--limited { background:#d79a14; }
.bm-cluster--unavailable { background:#d94545; }
.bm-cluster--unknown { background:#a3aea8; }
.bm-cluster--stale { background:#6f7b75; }

.bm-distance { color:var(--brand-strong); font-weight:800; }
.bm-popup__status { display:inline-flex; align-items:center; gap:6px; margin:5px 0 10px; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:850; }
.bm-popup__status::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.bm-popup__status--available { color:#0c733c; background:#dcf7e8; }
.bm-popup__status--limited { color:#956600; background:#fff1cd; }
.bm-popup__status--unavailable { color:#b72f2f; background:#ffe4e4; }
.bm-popup__status--stale { color:#67736c; background:#edf0ee; }

body.bm-map-is-fullscreen { overflow:hidden; }
body.bm-map-is-fullscreen .bm-header { display:none; }
body.bm-map-is-fullscreen .bm-map-wrap { position:fixed; inset:0; z-index:99999; border:0; border-radius:0; box-shadow:none; }
body.bm-map-is-fullscreen #benz-map { height:100dvh !important; min-height:100dvh !important; border-radius:0; }
body.bm-map-is-fullscreen .bm-map-action { width:44px; height:44px; }

@media (max-width: 620px) {
  .bm-toolbar { display:grid; grid-template-columns:1fr 1fr; gap:9px; padding:10px; }
  .bm-filter-label { grid-column:1 / -1; padding:0; }
  .bm-fuel-filters { grid-column:1 / -1; width:100%; display:flex; flex-wrap:nowrap; overflow-x:auto; gap:7px; padding-bottom:2px; scrollbar-width:none; }
  .bm-fuel-filters::-webkit-scrollbar { display:none; }
  .bm-filter-btn { flex:0 0 auto; padding:9px 12px; }
  .bm-status-filter { width:100%; margin:0; min-width:0; }
  .bm-locate-btn { width:100%; min-width:0; }
  #benz-map { height:58dvh; min-height:460px; max-height:650px; }
  .bm-map-actions { top:10px; right:10px; }
  .bm-map-action { width:38px; height:38px; border-radius:11px; }
  .bm-map-legend { left:10px; right:10px; bottom:10px; max-width:none; justify-content:center; gap:7px 10px; }
  .bm-map-location-note { top:58px; right:10px; left:10px; max-width:none; text-align:center; }
  .leaflet-control-zoom { margin-top:10px !important; margin-left:10px !important; }
  .leaflet-popup-content { margin:13px 14px !important; }
}

[data-theme="dark"] .bm-map-action,
[data-theme="dark"] .bm-map-legend { background:rgba(19,30,24,.94); color:#edf7f0; border-color:rgba(255,255,255,.1); }

/* v1.3 — фирменные маркеры и полноценная карточка на карте */
.bm-marker-icon { background:transparent !important; border:0 !important; }
.bm-map-pin { position:relative; width:34px; height:34px; border-radius:12px 12px 12px 4px; transform:rotate(-45deg); border:3px solid #fff; box-shadow:0 8px 20px rgba(24,39,30,.26); display:grid; place-items:center; transition:transform .16s ease,filter .16s ease; }
.bm-map-pin::after { content:""; position:absolute; inset:3px; border:1px solid rgba(255,255,255,.28); border-radius:8px 8px 8px 2px; }
.bm-map-pin span { width:17px; height:17px; display:grid; place-items:center; transform:rotate(45deg); position:relative; z-index:1; }
.bm-map-pin svg { width:17px; height:17px; fill:#fff; display:block; }
.bm-marker-icon:hover .bm-map-pin { transform:rotate(-45deg) translate(1px,-1px) scale(1.06); filter:brightness(1.03); }
.bm-map-pin--available { background:#169451; }
.bm-map-pin--limited { background:#d79a14; }
.bm-map-pin--unavailable { background:#d94545; }
.bm-map-pin--unknown { background:#a3aea8; }
.bm-map-pin--stale { background:#6f7b75; }

.bm-map-context { position:absolute; z-index:645; top:12px; left:64px; min-height:40px; display:flex; align-items:center; padding:0 12px; border-radius:12px; background:rgba(255,255,255,.94); border:1px solid rgba(23,33,27,.1); box-shadow:0 5px 18px rgba(20,40,29,.1); backdrop-filter:blur(10px); color:#25352b; font-size:11px; font-weight:850; pointer-events:none; }
.bm-map-float-filters { display:none; }

.bm-marker-tooltip { border:0 !important; border-radius:10px !important; background:rgba(23,33,27,.93) !important; color:#fff !important; box-shadow:0 6px 20px rgba(0,0,0,.18) !important; padding:7px 9px !important; font:750 11px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important; }
.bm-marker-tooltip::before { border-top-color:rgba(23,33,27,.93) !important; }

.bm-leaflet-popup .leaflet-popup-content-wrapper { border-radius:18px; box-shadow:0 16px 45px rgba(16,31,22,.22); border:1px solid rgba(23,33,27,.08); padding:0; overflow:hidden; }
.bm-leaflet-popup .leaflet-popup-content { margin:0 !important; width:auto !important; }
.bm-leaflet-popup .leaflet-popup-tip { box-shadow:none; }
.bm-leaflet-popup .leaflet-popup-close-button { width:30px !important; height:30px !important; top:7px !important; right:7px !important; border-radius:10px; background:rgba(244,247,245,.94); color:#536158 !important; font-size:19px !important; line-height:28px !important; z-index:2; }
.bm-popup { width:292px; min-width:0; padding:16px; color:#17211b; }
.bm-popup__eyebrow { padding-right:30px; margin-bottom:5px; color:#7a877f; font-size:10px; font-weight:750; }
.bm-popup h3 { margin:0 0 3px; font-size:17px; line-height:1.18; letter-spacing:-.02em; }
.bm-popup__address { margin:0 0 9px !important; color:#66736b !important; font-size:11px !important; line-height:1.4; }
.bm-popup__distance { display:inline-flex; margin:0 0 10px; padding:5px 8px; border-radius:9px; background:#eef7f2; color:#0c733c; font-size:10px; font-weight:850; }
.bm-popup-primary { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:1px 0 10px; padding:11px 12px; border-radius:13px; }
.bm-popup-primary > div { display:flex; flex-direction:column; gap:1px; }
.bm-popup-primary span { font-size:9px; font-weight:800; opacity:.72; text-transform:uppercase; letter-spacing:.03em; }
.bm-popup-primary strong { font-size:13px; }
.bm-popup-primary > b { font-size:13px; white-space:nowrap; }
.bm-popup-primary--available { background:#dcf7e8; color:#0b6e39; }
.bm-popup-primary--limited { background:#fff1cd; color:#8a5e00; }
.bm-popup-primary--unavailable { background:#ffe4e4; color:#ad3030; }
.bm-popup-primary--unknown { background:#f0f3f1; color:#68756d; }
.bm-popup-primary--stale { background:#e7ebe8; color:#56615b; }
.bm-popup-fuels { display:flex; flex-wrap:wrap; gap:5px; margin:0 0 10px; }
.bm-popup-fuel { display:inline-flex; align-items:center; gap:4px; min-height:25px; padding:4px 7px; border:1px solid #e2e9e4; border-radius:8px; background:#fff; color:#536158; font-size:9px; font-weight:750; }
.bm-popup-fuel i { width:6px; height:6px; border-radius:50%; flex:0 0 auto; }
.bm-popup-fuel b { margin-left:2px; font-size:9px; color:#28362d; }
.bm-popup-fuel--available i { background:#169451; }
.bm-popup-fuel--limited i { background:#d79a14; }
.bm-popup-fuel--unavailable i { background:#d94545; }
.bm-popup-fuel--unknown i { background:#a3aea8; }
.bm-popup-fuel--stale i { background:#6f7b75; }
.bm-popup-meta { display:grid; grid-template-columns:1fr; gap:4px; margin:0 0 9px; color:#66736b; font-size:10px; }
.bm-popup-meta span { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 8px; border-radius:8px; background:#f6f8f7; }
.bm-popup-meta b { color:#26342b; }
.bm-popup__source { margin:0 0 10px; color:#7a877f; font-size:9px; line-height:1.35; }
.bm-popup__source a { color:#0c733c; font-weight:750; text-decoration:none; }
.bm-popup__link { display:flex; align-items:center; justify-content:space-between; margin:0; padding:10px 11px; border-radius:11px; background:#17211b; color:#fff !important; font-size:11px; font-weight:850; text-decoration:none; }
.bm-popup__link span { font-size:15px; line-height:1; }

.leaflet-control-scale { margin-right:10px !important; margin-bottom:44px !important; }
.leaflet-control-scale-line { border:0 !important; border-radius:7px !important; background:rgba(255,255,255,.88) !important; box-shadow:0 3px 12px rgba(20,40,29,.08); color:#526058 !important; padding:2px 6px !important; font-size:9px !important; line-height:14px !important; }

body.bm-map-is-fullscreen .bm-map-context { top:62px; left:10px; }
body.bm-map-is-fullscreen .bm-map-float-filters { position:absolute; z-index:660; top:10px; left:58px; right:108px; display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }
body.bm-map-is-fullscreen .bm-map-float-filters::-webkit-scrollbar { display:none; }
body.bm-map-is-fullscreen .bm-map-float-filters button { flex:0 0 auto; min-height:38px; padding:0 11px; border:1px solid rgba(23,33,27,.1); border-radius:11px; background:rgba(255,255,255,.94); color:#445148; box-shadow:0 5px 18px rgba(20,40,29,.1); backdrop-filter:blur(10px); font-size:10px; font-weight:850; }
body.bm-map-is-fullscreen .bm-map-float-filters button.is-active { background:#17211b; color:#fff; border-color:#17211b; }

[data-theme="dark"] .bm-map-context { background:rgba(19,30,24,.94); color:#edf7f0; border-color:rgba(255,255,255,.1); }
[data-theme="dark"] .bm-leaflet-popup .leaflet-popup-content-wrapper { background:#131e18; color:#edf7f0; border-color:#26372d; }
[data-theme="dark"] .bm-leaflet-popup .leaflet-popup-tip { background:#131e18; }
[data-theme="dark"] .bm-popup { color:#edf7f0; }
[data-theme="dark"] .bm-popup__address,[data-theme="dark"] .bm-popup__eyebrow,[data-theme="dark"] .bm-popup__source { color:#9eaea4 !important; }
[data-theme="dark"] .bm-popup-fuel { background:#19271f; border-color:#2b3d32; color:#c4d1c9; }
[data-theme="dark"] .bm-popup-fuel b,[data-theme="dark"] .bm-popup-meta b { color:#edf7f0; }
[data-theme="dark"] .bm-popup-meta span { background:#19271f; color:#a9b8af; }
[data-theme="dark"] .bm-popup__link { background:#edf7f0; color:#132019 !important; }
[data-theme="dark"] .bm-popup__distance { background:#173c27; color:#56db90; }
[data-theme="dark"] .bm-leaflet-popup .leaflet-popup-close-button { background:#1c2b22; color:#b8c7be !important; }
[data-theme="dark"] body.bm-map-is-fullscreen .bm-map-float-filters button { background:rgba(19,30,24,.94); color:#dce9e1; border-color:rgba(255,255,255,.1); }
[data-theme="dark"] body.bm-map-is-fullscreen .bm-map-float-filters button.is-active { background:#edf7f0; color:#132019; }

@media (max-width:620px) {
  .bm-map-context { top:10px; left:58px; min-height:38px; padding:0 10px; font-size:10px; }
  .bm-map-pin { width:32px; height:32px; }
  .bm-map-pin span,.bm-map-pin svg { width:16px; height:16px; }
  .bm-popup { width:min(276px,calc(100vw - 64px)); padding:14px; }
  .bm-leaflet-popup .leaflet-popup-content-wrapper { border-radius:16px; }
  .leaflet-control-scale { margin-bottom:48px !important; }
  body.bm-map-is-fullscreen .bm-map-context { top:57px; left:10px; }
  body.bm-map-is-fullscreen .bm-map-float-filters { left:56px; right:104px; }
}

/* v1.5: Russia-first map */
.bm-country-chip { display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:800; color:var(--brand-strong); background:var(--brand-soft); border:1px solid color-mix(in srgb,var(--brand) 18%,var(--line)); padding:7px 10px; border-radius:999px; }
.bm-country-chip::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 12%,transparent); }
.bm-auto-location-chip { display:inline-flex; align-items:center; min-height:30px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:var(--surface); color:var(--text); font-size:12px; font-weight:800; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bm-map-action--russia { width:auto !important; padding:0 12px !important; font-size:12px !important; font-weight:800 !important; }
@media(max-width:620px){
  .bm-map-action--russia { padding:0 10px !important; }
  #benz-map { height:54dvh; min-height:410px; max-height:560px; }
}

/* v1.8 — компактная строка источников карты */
.bm-map-credit {
  position:absolute; z-index:651; right:8px; bottom:5px;
  max-width:calc(100% - 16px); padding:2px 6px; border-radius:7px;
  background:rgba(255,255,255,.90); color:#66736b;
  box-shadow:0 2px 10px rgba(20,40,29,.07);
  font-size:7.5px; line-height:1.25;
  white-space:normal; text-align:right;
  backdrop-filter:blur(8px);
}
.bm-map-credit a { color:#526058; text-decoration:none; font-weight:650; }
.bm-map-credit a:hover { text-decoration:underline; }
[data-theme="dark"] .bm-map-credit { background:rgba(19,30,24,.90); color:#9eaea4; }
[data-theme="dark"] .bm-map-credit a { color:#c4d1c9; }
@media(max-width:620px){
  .bm-map-legend { bottom:27px; }
  .leaflet-control-scale { margin-bottom:61px !important; }
  .bm-map-credit { right:7px; bottom:4px; max-width:58%; font-size:6.8px; }
}

/* v1.9 — русская карта без двойных подписей + защита от горизонтального скролла */
html, body { max-width:100%; overflow-x:hidden; }
main, .bm-section, .bm-container, .bm-map-layout, .bm-map-wrap, .bm-panel,
.bm-toolbar, .bm-content-card, .bm-detail-grid { min-width:0; }
.bm-station-card__top > div { min-width:0; }
.bm-station-card h3, .bm-station-card p, .bm-page__header p { overflow-wrap:anywhere; }
.bm-badge { flex:0 0 auto; }
.bm-table { table-layout:fixed; }
.bm-table th, .bm-table td { overflow-wrap:anywhere; }

/* На части Android-браузеров CSS-viewport получается шире 620px.
   Поэтому мобильную компоновку карты включаем раньше. */
@media (max-width: 860px) {
  .bm-section__head { display:block; }
  .bm-section__head .bm-country-chip { margin-top:11px; }

  .bm-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:9px;
    align-items:stretch;
    width:100%;
  }
  .bm-filter-label { grid-column:1 / -1; padding:0; }
  .bm-fuel-filters {
    grid-column:1 / -1;
    min-width:0;
    width:100%;
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    gap:7px;
    padding-bottom:2px;
    scrollbar-width:none;
  }
  .bm-fuel-filters::-webkit-scrollbar { display:none; }
  .bm-filter-btn { flex:0 0 auto; }
  .bm-status-filter, .bm-locate-btn { width:100%; min-width:0; margin:0; }

  .bm-map-layout { grid-template-columns:minmax(0,1fr); width:100%; }
  .bm-map-wrap, .bm-panel { width:100%; max-width:100%; }
  .bm-station-list { max-height:none; overflow:visible; }
}

@media (max-width: 430px) {
  .bm-container { width:calc(100% - 20px); }
  .bm-toolbar { grid-template-columns:minmax(0,1fr); }
  .bm-status-filter, .bm-locate-btn { grid-column:1 / -1; }
  .bm-station-card__top { gap:8px; }
  .bm-badge { padding:5px 7px; font-size:10px; }
  .bm-table th, .bm-table td { padding:11px 7px; font-size:12px; }
}


/* Benz Monitor 2.0: обзор регионов и ценовые маркеры */
.bm-map-head-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.bm-region-reset { border:1px solid var(--line); background:var(--surface); color:var(--text); border-radius:999px; padding:7px 11px; font-size:11px; font-weight:800; box-shadow:0 5px 16px rgba(20,40,29,.06); }
.bm-region-reset:hover { border-color:color-mix(in srgb,var(--brand) 45%,var(--line)); color:var(--brand-strong); }
.bm-region-locate-btn { border:1px solid color-mix(in srgb,var(--brand) 24%,var(--line)); background:var(--surface); color:var(--brand-strong); border-radius:13px; min-height:42px; padding:0 13px; font-size:12px; font-weight:800; white-space:nowrap; }
.bm-region-locate-btn:hover { background:var(--brand-soft); }
.bm-region-locate-btn:disabled { opacity:.65; cursor:wait; }

.bm-region-marker { background:transparent !important; border:0 !important; }
.bm-region-bubble { --region-color:#169451; display:flex; align-items:center; gap:7px; min-width:82px; max-width:170px; padding:7px 10px 7px 8px; border:2px solid #fff; border-radius:999px; background:color-mix(in srgb,var(--region-color) 92%,#fff); color:#fff; box-shadow:0 8px 22px rgba(22,46,31,.24); font-size:10px; font-weight:850; line-height:1.15; transform:translate(-50%,-50%); cursor:pointer; }
.bm-region-bubble--available { --region-color:#169451; }
.bm-region-bubble--limited { --region-color:#d79a14; }
.bm-region-bubble--unavailable { --region-color:#d94545; }
.bm-region-bubble--stale { --region-color:#8e9a93; }
.bm-region-bubble__count { flex:0 0 auto; min-width:25px; height:25px; padding:0 6px; border-radius:999px; display:grid; place-items:center; background:rgba(255,255,255,.2); border:1px solid rgba(255,255,255,.28); font-size:11px; }
.bm-region-bubble__text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bm-region-bubble__text small { display:block; margin-top:2px; font-size:8px; opacity:.9; font-weight:700; }
.bm-region-bubble:hover { filter:brightness(1.04); transform:translate(-50%,-50%) scale(1.03); }

.bm-marker-icon--price { width:auto !important; overflow:visible !important; }
.bm-price-marker { position:relative; width:34px; height:42px; }
.bm-price-tag { position:absolute; left:27px; top:3px; min-width:64px; padding:5px 7px; border:1px solid rgba(23,33,27,.12); border-radius:9px; background:rgba(255,255,255,.96); color:#17211b; box-shadow:0 6px 16px rgba(20,40,29,.15); font-size:10px; line-height:1; font-weight:900; white-space:nowrap; }
.bm-price-tag small { margin-left:2px; color:#657168; font-size:8px; font-weight:750; }
[data-theme="dark"] .bm-price-tag { background:rgba(19,30,24,.96); color:#edf7f0; border-color:rgba(255,255,255,.1); }
[data-theme="dark"] .bm-price-tag small { color:#9eaea4; }

.bm-map-context.is-region-mode::before { content:"Регионы"; display:inline-flex; margin-right:6px; padding:3px 6px; border-radius:999px; background:var(--brand-soft); color:var(--brand-strong); font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.bm-map-context.is-station-mode::before { content:"АЗС"; display:inline-flex; margin-right:6px; padding:3px 6px; border-radius:999px; background:#eef2ef; color:#4e5d54; font-size:8px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }

@media (max-width: 900px) {
  .bm-region-locate-btn, .bm-locate-btn { min-width:0; }
}
@media (max-width: 620px) {
  .bm-map-head-actions { justify-content:flex-start; }
  .bm-region-bubble { max-width:132px; padding:6px 8px 6px 7px; font-size:9px; }
  .bm-region-bubble__count { min-width:23px; height:23px; font-size:10px; }
  .bm-region-bubble__text small { font-size:7px; }
  .bm-price-tag { left:25px; min-width:58px; padding:5px 6px; font-size:9px; }
}


/* v2.1 — обзор по субъектам РФ */
.bm-region-marker { background:transparent!important; border:0!important; }
.bm-region-count { width:46px; height:34px; display:flex; align-items:center; justify-content:center; gap:3px; border:2px solid #fff; border-radius:999px; box-shadow:0 7px 18px rgba(20,46,30,.22); color:#fff; font-weight:900; line-height:1; transform:translateZ(0); }
.bm-region-count b { font-size:12px; }
.bm-region-count span { font-size:7px; opacity:.9; letter-spacing:.02em; }
.bm-region-count--available { background:#169451; }
.bm-region-count--limited { background:#d79a14; }
.bm-region-count--unavailable { background:#d94545; }
.bm-region-count--unknown { background:#a3aea8; }
.bm-region-count--stale { background:#6f7b75; }
.bm-region-leaflet-tooltip { border:0!important; border-radius:13px!important; box-shadow:0 10px 28px rgba(20,46,30,.18)!important; padding:0!important; overflow:hidden; }
.bm-region-leaflet-tooltip::before { display:none!important; }
.bm-region-tooltip { min-width:180px; padding:10px 12px; background:rgba(255,255,255,.97); color:#17211b; }
.bm-region-tooltip strong { display:block; margin-bottom:3px; font-size:12px; }
.bm-region-tooltip span { display:block; color:#66736b; font-size:10px; line-height:1.4; }
[data-theme="dark"] .bm-region-tooltip { background:rgba(19,30,24,.98); color:#edf7f0; }
[data-theme="dark"] .bm-region-tooltip span { color:#9eaea4; }

.bm-region-card { width:100%; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--text); display:grid; grid-template-columns:10px minmax(0,1fr) auto 18px; gap:10px; align-items:center; padding:14px 16px; text-align:left; transition:.16s ease; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.bm-region-card:last-child { border-bottom:0; }
.bm-region-card:hover { background:var(--surface-2); }
.bm-region-card__status { width:8px; height:34px; border-radius:999px; background:var(--stale); }
.bm-region-card__status--available { background:var(--brand); }
.bm-region-card__status--limited { background:var(--warning); }
.bm-region-card__status--unavailable { background:var(--danger); }
.bm-region-card__status--unknown { background:var(--unknown); }
.bm-region-card__status--stale { background:var(--stale); }
.bm-region-card__body { min-width:0; }
.bm-region-card__body strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.bm-region-card__body small { display:block; margin-top:3px; color:var(--muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bm-region-card__count { display:flex; flex-direction:column; align-items:flex-end; line-height:1; }
.bm-region-card__count b { font-size:14px; }
.bm-region-card__count small { margin-top:3px; color:var(--muted); font-size:8px; }
.bm-region-card__arrow { color:var(--muted); font-size:15px; }

@media (max-width:620px){
  .bm-region-count { width:42px; height:31px; }
  .bm-region-card { padding:13px 14px; gap:9px; }
  .bm-region-card__body strong { font-size:12px; }
  .bm-region-card__body small { font-size:9px; }
}


/* v2.2 — кликабельные контуры регионов на мобильных */
.leaflet-bmRegionPane-pane { pointer-events:auto !important; }
.leaflet-bmRegionPane-pane svg { pointer-events:auto; }
.leaflet-bmRegionPane-pane .leaflet-interactive { pointer-events:auto; cursor:pointer; touch-action:manipulation; }
.bm-region-tooltip__tap { margin-top:5px; color:var(--brand-strong) !important; font-weight:800; }

/* v2.3 — стабильная карточка АЗС для desktop/mobile/WebView */
.bm-map-wrap { isolation:isolate; }
.bm-station-sheet {
  position:absolute;
  z-index:720;
  left:14px;
  bottom:14px;
  width:min(370px, calc(100% - 28px));
  max-height:calc(100% - 86px);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  background:rgba(255,255,255,.98);
  color:var(--text);
  border:1px solid rgba(23,33,27,.12);
  border-radius:20px;
  box-shadow:0 18px 55px rgba(15,31,21,.24);
  transform:translateY(calc(100% + 28px));
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:transform .18s ease, opacity .16s ease, visibility 0s linear .18s;
  contain:layout paint;
}
.bm-station-sheet.is-open {
  transform:translateY(0);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:transform .18s ease, opacity .16s ease;
}
.bm-station-sheet__handle { display:none; }
.bm-station-sheet__close {
  position:sticky;
  float:right;
  top:8px;
  right:8px;
  z-index:3;
  width:34px;
  height:34px;
  margin:8px 8px -42px 0;
  border:1px solid var(--line);
  border-radius:11px;
  background:var(--surface-2);
  color:var(--text);
  font-size:22px;
  line-height:1;
  display:grid;
  place-items:center;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.bm-station-sheet__content { min-width:0; }
.bm-station-sheet .bm-popup { padding:18px 18px 16px; }
.bm-station-sheet .bm-popup h3 { padding-right:38px; }
.bm-map-wrap.is-map-transitioning .leaflet-marker-icon,
.bm-map-wrap.is-map-transitioning .leaflet-interactive { pointer-events:none !important; }
.bm-map-wrap .leaflet-marker-icon,
.bm-map-wrap button,
.bm-map-wrap a { -webkit-tap-highlight-color:transparent; }

[data-theme="dark"] .bm-station-sheet {
  background:rgba(19,30,24,.98);
  border-color:rgba(255,255,255,.11);
  box-shadow:0 18px 55px rgba(0,0,0,.42);
}

@media (max-width: 760px) {
  .bm-station-sheet {
    left:8px;
    right:8px;
    bottom:8px;
    width:auto;
    max-height:min(58%, 430px);
    border-radius:20px;
    transform:translateY(calc(100% + 18px));
  }
  .bm-station-sheet__handle {
    display:block;
    width:42px;
    height:4px;
    margin:7px auto -2px;
    border-radius:999px;
    background:var(--line);
  }
  .bm-station-sheet .bm-popup { padding:13px 15px 15px; }
  .bm-station-sheet__close {
    top:6px;
    right:6px;
    margin:6px 6px -40px 0;
  }
  body.bm-map-is-fullscreen .bm-station-sheet {
    bottom:max(8px, env(safe-area-inset-bottom));
    max-height:min(62dvh, 520px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bm-station-sheet,
  .bm-station-sheet.is-open { transition:none; }
}

/* v2.4 — provenance / trust layer */
.bm-evidence {
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-soft) 48%, var(--surface));
}
.bm-evidence.is-expired { background: var(--surface-2); }
.bm-evidence__top { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; }
.bm-evidence__top strong { font-size:12px; }
.bm-evidence__top span { font-weight:800; color:var(--brand-strong); }
.bm-evidence.is-expired .bm-evidence__top span { color:var(--stale); }
.bm-evidence__source { margin-top:5px; font-size:12px; line-height:1.35; overflow-wrap:anywhere; }
.bm-evidence__source a { text-decoration:underline; text-decoration-color:color-mix(in srgb, var(--text) 25%, transparent); text-underline-offset:2px; }
.bm-evidence__meta { margin-top:7px; display:flex; flex-wrap:wrap; gap:6px 10px; color:var(--muted); font-size:11px; }
.bm-evidence__meta span { display:inline-flex; align-items:center; }
.bm-card-evidence { margin-top:9px; display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; }
.bm-card-evidence span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bm-card-evidence b { flex:none; color:var(--brand-strong); font-size:11px; }
@media (max-width: 640px) {
  .bm-evidence { padding: 11px 12px; }
  .bm-evidence__meta { gap:5px 8px; }
}


/* v2.5 — стабильная отдельная страница АЗС на мобильных */
.bm-page--station .bm-page__header { max-width:980px; }
.bm-page--station .bm-page__header p { line-height:1.45; }
.bm-page--station .bm-content-card { min-width:0; overflow:visible; }

.bm-fuel-board,
.bm-history-board { width:100%; min-width:0; }
.bm-board-head,
.bm-fuel-board__row,
.bm-history-board__row { display:grid; align-items:center; min-width:0; }
.bm-board-head { color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.04em; font-weight:800; border-bottom:1px solid var(--line); }
.bm-board-head--fuel,
.bm-fuel-board__row { grid-template-columns:minmax(88px,.7fr) minmax(150px,1fr) minmax(92px,.6fr) minmax(210px,1.45fr); gap:14px; }
.bm-board-head--history,
.bm-history-board__row { grid-template-columns:minmax(130px,.9fr) minmax(82px,.6fr) minmax(120px,.8fr) minmax(190px,1.35fr) minmax(82px,.55fr) minmax(150px,1fr); gap:14px; }
.bm-board-head > div { padding:0 0 11px; min-width:0; }
.bm-fuel-board__row,
.bm-history-board__row { padding:15px 0; border-bottom:1px solid var(--line); }
.bm-fuel-board__row:last-child,
.bm-history-board__row:last-child { border-bottom:0; }
.bm-board-cell { min-width:0; overflow-wrap:break-word; word-break:normal; }
.bm-board-label { display:none; color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.04em; font-weight:800; margin-bottom:5px; }
.bm-board-source strong { display:block; font-size:13px; line-height:1.3; }
.bm-board-source small { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.4; }
.bm-board-source a { text-decoration:underline; text-decoration-color:color-mix(in srgb,var(--text) 25%,transparent); text-underline-offset:2px; }
.bm-board-price { white-space:nowrap; }
.bm-history-board__row .bm-board-cell { font-size:13px; line-height:1.4; }
.bm-history-intro { margin:0 0 16px; color:var(--muted); max-width:780px; }

@media (max-width: 760px) {
  .bm-page--station { padding-top:28px; padding-bottom:max(58px, calc(env(safe-area-inset-bottom) + 28px)); }
  .bm-page--station .bm-container { width:min(calc(100% - 20px), var(--container)); }
  .bm-page--station .bm-page__header { margin-bottom:18px; }
  .bm-page--station .bm-page__header h1 { font-size:clamp(31px,8.6vw,44px); line-height:1.04; overflow-wrap:normal; word-break:normal; }
  .bm-page--station .bm-page__header p { font-size:15px; overflow-wrap:normal; word-break:normal; }
  .bm-page--station .bm-content-card { border-radius:20px; padding:16px; }
  .bm-page--station .bm-content-card > h2 { font-size:24px; line-height:1.12; margin-bottom:16px !important; }

  .bm-board-head { display:none; }
  .bm-fuel-board,
  .bm-history-board { display:grid; gap:10px; }
  .bm-fuel-board__row,
  .bm-history-board__row {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px 14px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:16px;
    background:var(--surface-2);
  }
  .bm-fuel-board__row:last-child,
  .bm-history-board__row:last-child { border-bottom:1px solid var(--line); }
  .bm-board-label { display:block; }
  .bm-fuel-board__row .bm-board-name { grid-column:1; grid-row:1; align-self:center; }
  .bm-fuel-board__row .bm-board-status { grid-column:2; grid-row:1; justify-self:end; align-self:center; }
  .bm-fuel-board__row .bm-board-price { grid-column:1 / -1; grid-row:2; }
  .bm-fuel-board__row .bm-board-source { grid-column:1 / -1; grid-row:3; padding-top:10px; border-top:1px solid var(--line); }
  .bm-fuel-board__row .bm-board-name .bm-board-label,
  .bm-fuel-board__row .bm-board-status .bm-board-label { display:none; }
  .bm-fuel-board__row .bm-board-name strong { font-size:16px; }
  .bm-fuel-board__row .bm-badge { max-width:100%; white-space:normal; text-align:left; line-height:1.15; }

  .bm-history-board__row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; }
  .bm-history-board__row .bm-board-cell { min-width:0; font-size:13px; overflow-wrap:normal; word-break:normal; }
  .bm-history-board__row .bm-history-fuel { grid-column:1; grid-row:1; }
  .bm-history-board__row .bm-history-status { grid-column:2; grid-row:1; }
  .bm-history-board__row .bm-history-time { grid-column:1; grid-row:2; }
  .bm-history-board__row .bm-history-confidence { grid-column:2; grid-row:2; }
  .bm-history-board__row .bm-history-source { grid-column:1 / -1; grid-row:3; padding-top:9px; border-top:1px solid var(--line); }
  .bm-history-board__row .bm-history-expiry { grid-column:1 / -1; grid-row:4; }
  .bm-history-board__row .bm-history-fuel strong,
  .bm-history-board__row .bm-history-status strong { font-size:14px; }

  .bm-detail-grid { gap:12px; }
  .bm-meta-list { gap:8px; }
  .bm-meta-item { padding:12px; }
}

@media (max-width: 380px) {
  .bm-page--station .bm-content-card { padding:14px; }
  .bm-fuel-board__row,
  .bm-history-board__row { padding:12px; gap:9px 10px; }
  .bm-fuel-board__row { grid-template-columns:minmax(0,1fr); }
  .bm-fuel-board__row .bm-board-name,
  .bm-fuel-board__row .bm-board-status,
  .bm-fuel-board__row .bm-board-price,
  .bm-fuel-board__row .bm-board-source { grid-column:1; justify-self:stretch; }
  .bm-fuel-board__row .bm-board-name { grid-row:1; }
  .bm-fuel-board__row .bm-board-status { grid-row:2; }
  .bm-fuel-board__row .bm-board-price { grid-row:3; }
  .bm-fuel-board__row .bm-board-source { grid-row:4; }
}

/* v2.6.1 — дополнительный отступ перед CTA в карточке АЗС */
.bm-station-sheet .bm-popup__link {
  margin-top: 14px;
}
@media (max-width: 760px) {
  .bm-station-sheet .bm-popup__link {
    margin-top: 18px;
  }
}

/* v2.8.0 — hidden elements must never occupy space after responsive reflow. */
[hidden] { display:none !important; }
.bm-auto-location-chip[hidden],
.bm-region-reset[hidden],
.bm-map-location-note[hidden] { display:none !important; }

/* v3.0.1 — operational restriction details */
.bm-card-note{display:block;margin-top:5px;color:var(--muted);line-height:1.35}.bm-popup-note{margin:8px 0;padding:8px 10px;border-radius:10px;background:var(--surface-2);font-size:12px;color:var(--muted)}.bm-board-source small{display:block;margin-top:4px;line-height:1.35}

.bm-badge--restricted{color:var(--restricted);background:color-mix(in srgb,var(--restricted) 13%,transparent)}
.bm-map-legend .is-restricted,.bm-marker--restricted,.bm-cluster--restricted,.bm-map-pin--restricted,.bm-region-count--restricted{background:var(--restricted)}
.bm-popup-primary--restricted{background:color-mix(in srgb,var(--restricted) 12%,#fff);color:#5d429d}.bm-popup-fuel--restricted i{background:var(--restricted)}
.bm-region-bubble--restricted{--region-color:var(--restricted)}.bm-region-card__status--restricted{background:var(--restricted)}
@media(min-width:900px){.bm-summary-card .bm-stats{grid-template-columns:repeat(3,1fr)}}
