:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: #0d1b2a;
  --panel-2: #12263a;
  --text: #f5f8fb;
  --muted: #96a9ba;
  --accent: #43d17d;
  --accent-2: #2aae66;
  --danger: #ff7b7b;
  --line: #21384c;
  --shadow: 0 16px 40px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
.topbar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: calc(13px + env(safe-area-inset-top)) 16px 13px; background: rgba(7,17,28,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 850; letter-spacing: -.03em; font-size: 1.2rem; }
.subtitle { color: var(--muted); font-size: .78rem; margin-top: 2px; }
main { width: min(900px, 100%); margin: 0 auto; padding: 14px 12px 30px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.controls { padding: 15px; }
.fuel-row { display: grid; grid-template-columns: 1fr 150px; gap: 12px; align-items: center; }
label { font-size: .88rem; color: var(--muted); }
select, input[type="search"] { width: 100%; color: var(--text); background: var(--panel-2); border: 1px solid #2b465d; border-radius: 12px; padding: 11px 12px; font: inherit; outline: none; }
select:focus, input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67,209,125,.12); }
.tabs { margin: 14px 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: #081522; }
.tab { border: 0; border-radius: 10px; padding: 10px 12px; color: var(--muted); background: transparent; font-weight: 750; }
.tab.active { color: var(--text); background: var(--panel-2); }
.mode-controls { display: grid; gap: 12px; }
.slider-line { display: grid; gap: 7px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.primary, .icon-btn { border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; }
.primary { padding: 13px 16px; color: #052112; background: var(--accent); }
.primary:active { background: var(--accent-2); transform: translateY(1px); }
.primary:disabled { opacity: .55; cursor: progress; }
.icon-btn { padding: 9px 12px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.status { min-height: 1.2em; font-size: .82rem; color: var(--muted); }
.status.error { color: var(--danger); }
.summary { margin-top: 12px; padding: 13px 15px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.summary strong { font-size: .92rem; }
.summary .meta { color: var(--muted); font-size: .8rem; text-align: right; }
.map { height: 39vh; min-height: 300px; max-height: 460px; margin-top: 12px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #091a29; box-shadow: var(--shadow); }
.results-head { display: flex; align-items: end; justify-content: space-between; padding: 18px 3px 8px; }
.results-head h1 { margin: 0; font-size: 1.05rem; }
.results-head select { width: 130px; padding: 8px 10px; }
.muted { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.results { display: grid; gap: 9px; }
.station { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 13px; display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; }
.station h2 { margin: 0 0 4px; font-size: .95rem; line-height: 1.3; }
.station .address { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.station .price { text-align: right; font-size: 1.35rem; font-weight: 900; letter-spacing: -.04em; }
.station .price small { display: block; font-size: .68rem; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.station .bottom { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { padding: 4px 7px; border-radius: 999px; background: #102b22; color: #a9f6c9; font-size: .7rem; font-weight: 700; }
.nav { color: var(--accent); text-decoration: none; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }
footer { padding: 24px 8px 6px; color: #71879a; font-size: .68rem; text-align: center; line-height: 1.45; }
.leaflet-container { background: #0d1b2a; font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0d1b2a; color: var(--text); }
.price-marker { background: var(--accent); color: #052112; border: 2px solid #fff; border-radius: 999px; font-size: 11px; font-weight: 900; text-align: center; line-height: 30px; width: 34px !important; height: 34px !important; box-shadow: 0 3px 9px rgba(0,0,0,.35); }
@media (min-width: 700px) {
  main { padding-top: 22px; }
  .controls { padding: 18px; }
  .results { grid-template-columns: 1fr 1fr; }
  .station { min-height: 150px; }
}
