:root {
  --bg: #07100e;
  --panel: rgba(14, 28, 24, .92);
  --panel-2: #10241e;
  --text: #f2fff8;
  --muted: #91aaa0;
  --lime: #a8ff35;
  --green: #34e58a;
  --orange: #ffad32;
  --red: #ff5b66;
  --cyan: #40d9ff;
  --border: rgba(180, 255, 217, .12);
  --shadow: 0 22px 55px rgba(0,0,0,.32);
}
* { 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:
    radial-gradient(circle at 12% 5%, rgba(77, 255, 150, .10), transparent 25rem),
    radial-gradient(circle at 90% 20%, rgba(64, 217, 255, .08), transparent 28rem),
    var(--bg);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky; top: 0; z-index: 1000;
  height: 74px; padding: 0 max(22px, calc((100vw - 1400px)/2));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 14, .85); backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  color: #07100e; background: var(--lime); font-weight: 900; box-shadow: 0 0 24px rgba(168,255,53,.3);
}
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
nav { display: flex; gap: 24px; color: var(--muted); font-weight: 650; font-size: .92rem; }
nav a:hover { color: var(--lime); }
main, footer { width: min(1400px, calc(100% - 36px)); margin-inline: auto; }
.hero {
  min-height: 360px; display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 70px 2vw 45px;
}
.eyebrow { margin: 0 0 8px; color: var(--lime); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
h1 { margin: 0; font-size: clamp(2.8rem, 7vw, 6.3rem); line-height: .92; letter-spacing: -.055em; }
h1 span { color: var(--lime); }
.lead { max-width: 730px; margin: 24px 0 0; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.65; }
.hero-badge {
  min-width: 220px; padding: 28px; border: 1px solid rgba(168,255,53,.25); border-radius: 24px;
  background: linear-gradient(145deg, rgba(168,255,53,.10), rgba(64,217,255,.04)); box-shadow: var(--shadow);
}
.hero-badge span, .hero-badge small { display: block; color: var(--muted); }
.hero-badge strong { display: block; margin: 6px 0; color: var(--lime); font-size: 3rem; }
.card { border: 1px solid var(--border); border-radius: 22px; background: var(--panel); box-shadow: var(--shadow); }
.controls { display: grid; grid-template-columns: 1.7fr .55fr .8fr .75fr auto auto auto; gap: 14px; padding: 18px; align-items: end; }
.field { display: grid; gap: 8px; }
.label { color: var(--muted); font-size: .78rem; font-weight: 760; }
select, input {
  height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px;
  color: var(--text); background: var(--panel-2); outline: none;
}
select:focus, input:focus { border-color: rgba(168,255,53,.65); }
.segmented { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel-2); }
.segmented button {
  min-height: 40px; flex: 1; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-weight: 800;
}
.segmented button.active { color: #07100e; background: var(--lime); }
.segmented.small { width: 230px; }
.segmented.small button { min-height: 34px; font-size: .78rem; }
.button {
  min-height: 48px; border-radius: 12px; padding: 0 18px; border: 1px solid var(--border); font-weight: 850;
}
.button.primary { color: #07100e; border-color: var(--lime); background: var(--lime); }
.button.secondary { color: var(--text); background: var(--panel-2); }
.button:hover { transform: translateY(-1px); }
.notice { min-height: 28px; padding: 10px 4px; color: var(--muted); font-size: .9rem; }
.notice.error { color: #ff9aa2; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 8px 0 18px; }
.stat { padding: 22px; }
.stat span, .stat small { display: block; color: var(--muted); }
.stat strong { display: block; margin: 8px 0 4px; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(330px, .7fr); gap: 18px; }
.map-wrap, .station-panel, .chart-card, .insight-card, .calculator-card { padding: 22px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.section-heading.compact { margin-bottom: 8px; }
h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 2rem); letter-spacing: -.025em; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: .77rem; }
.dot { width: 9px; height: 9px; display: inline-block; border-radius: 99px; margin-right: 4px; }
.green { background: var(--green); } .orange { background: var(--orange); } .red { background: var(--red); }
#map { height: 570px; border-radius: 16px; overflow: hidden; background: #14221e; }
.attribution, .chart-note { margin: 10px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.station-panel { max-height: 670px; overflow: hidden; }
.station-list { height: 585px; overflow-y: auto; padding-right: 4px; }
.station-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 16px 3px;
  border-bottom: 1px solid var(--border);
}
.station-item:last-child { border-bottom: 0; }
.station-name { font-weight: 850; }
.station-meta { margin-top: 5px; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.station-price { text-align: right; font-size: 1.35rem; font-weight: 900; }
.price-chip { display: inline-block; margin-top: 5px; padding: 3px 7px; border-radius: 999px; font-size: .66rem; font-weight: 900; color: #07100e; }
.price-chip.green { background: var(--green); } .price-chip.orange { background: var(--orange); } .price-chip.red { background: var(--red); }
.closed { opacity: .55; }
.analysis-grid { display: grid; grid-template-columns: 1.55fr .65fr; gap: 18px; margin-top: 18px; }
.chart-card canvas { max-height: 340px; }
.insight-card { background: linear-gradient(150deg, rgba(168,255,53,.09), rgba(14,28,24,.95)); }
.time-window { margin: 25px 0; padding: 18px; border-left: 3px solid var(--lime); background: rgba(168,255,53,.05); }
.time-window strong, .time-window span { display: block; }
.time-window strong { color: var(--lime); font-size: 2rem; }
.time-window span, .insight-card p, .trend span { color: var(--muted); }
.trend { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.trend strong { display: block; margin-top: 6px; }
.calculator-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 18px; align-items: center; }
.calculator-card p { color: var(--muted); line-height: 1.6; }
.calculator-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.input-unit { display: flex; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.input-unit input { width: 100%; border: 0; }
.input-unit span { display: grid; place-items: center; padding: 0 14px; color: var(--muted); }
.calculator-result { padding: 15px; border-radius: 12px; background: var(--panel-2); }
.calculator-result span { color: var(--muted); font-size: .76rem; }
.calculator-result strong { display: block; margin-top: 5px; color: var(--lime); font-size: 1.5rem; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 40px 0; color: var(--muted); font-size: .8rem; }
footer strong { color: var(--text); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #10241e; color: var(--text); }
.marker-pin {
  width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid #fff;
  border-radius: 50% 50% 50% 12%; transform: rotate(-45deg); box-shadow: 0 5px 16px rgba(0,0,0,.42);
}
.marker-pin span { transform: rotate(45deg); color: #07100e; font-size: 10px; font-weight: 950; }
.marker-green { background: var(--green); } .marker-orange { background: var(--orange); } .marker-red { background: var(--red); }

@media (max-width: 1050px) {
  .controls { grid-template-columns: 1fr 1fr; }
  .fuel-field { grid-column: 1 / -1; }
  .map-layout, .analysis-grid { grid-template-columns: 1fr; }
  .station-panel { max-height: none; }
  .station-list { height: auto; max-height: 500px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  nav { display: none; }
  main, footer { width: min(100% - 22px, 1400px); }
  .hero { min-height: auto; padding: 52px 3px 30px; }
  .hero-badge { display: none; }
  .controls, .calculator-card, .calculator-fields { grid-template-columns: 1fr; }
  .controls .button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .map-wrap, .station-panel, .chart-card, .insight-card, .calculator-card { padding: 15px; }
  #map { height: 470px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .segmented.small { width: 100%; }
  .legend { flex-wrap: wrap; }
  footer { flex-direction: column; }
}

.location-field { grid-column: 1 / -1; position: relative; }
.location-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.place-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 7px); z-index: 1200;
  padding: 7px; border: 1px solid var(--border); border-radius: 14px;
  background: #10241e; box-shadow: var(--shadow);
}
.place-result {
  width: 100%; border: 0; border-radius: 9px; padding: 11px 12px;
  color: var(--text); background: transparent; text-align: left;
}
.place-result:hover, .place-result:focus { background: rgba(168,255,53,.10); outline: none; }
.place-result strong, .place-result span { display: block; }
.place-result span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.station-actions { display: flex; gap: 7px; margin-top: 9px; }
.station-link {
  display: inline-flex; align-items: center; min-height: 31px; padding: 0 9px;
  border: 1px solid var(--border); border-radius: 8px; color: var(--text);
  background: rgba(255,255,255,.025); font-size: .72rem; font-weight: 800;
}
.station-link:hover { border-color: rgba(168,255,53,.5); color: var(--lime); }
@media (max-width: 720px) {
  .location-search { grid-template-columns: 1fr; }
}

.toggle-field {
  min-height: 48px; padding: 0 13px; display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2);
  color: var(--muted); font-size: .78rem; font-weight: 800;
}
.toggle-field input { width: 18px; height: 18px; accent-color: var(--lime); }
.favorite-stat strong { color: var(--lime); }
.station-item { transition: background .18s ease, transform .18s ease; }
.station-item:hover { background: rgba(168,255,53,.035); }
.station-item.active { background: rgba(168,255,53,.08); }
.favorite-button {
  width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); background: rgba(255,255,255,.025); font-size: 1rem;
}
.favorite-button.active { color: #07100e; border-color: var(--lime); background: var(--lime); }
.station-title-row { display: flex; align-items: center; gap: 8px; }
.station-title-row .station-name { flex: 1; }
.station-drawer {
  position: fixed; top: 0; right: 0; z-index: 3000; width: min(460px, 92vw); height: 100vh;
  padding: 76px 24px 30px; border-left: 1px solid var(--border);
  background: #0b1915; box-shadow: -22px 0 60px rgba(0,0,0,.45);
  transform: translateX(105%); transition: transform .24s ease; overflow-y: auto;
}
.station-drawer.open { transform: translateX(0); }
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 2990; background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
}
.drawer-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px;
  border: 1px solid var(--border); border-radius: 12px; color: var(--text);
  background: var(--panel-2); font-size: 1.8rem; line-height: 1;
}
.drawer-price {
  margin: 18px 0; padding: 18px; border-radius: 16px; background: rgba(168,255,53,.08);
}
.drawer-price strong { display: block; color: var(--lime); font-size: 2.5rem; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.drawer-info { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-2); }
.drawer-info span { display: block; color: var(--muted); font-size: .72rem; }
.drawer-info strong { display: block; margin-top: 5px; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.empty-state { padding: 34px 10px; color: var(--muted); text-align: center; line-height: 1.6; }

@media (max-width: 1200px) {
  .controls { grid-template-columns: repeat(3, 1fr); }
  .location-field, .fuel-field { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .controls { grid-template-columns: 1fr; }
  .location-field, .fuel-field { grid-column: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .favorite-stat { grid-column: 1 / -1; }
  .drawer-grid, .drawer-actions { grid-template-columns: 1fr; }
}

.calculator-advanced {
  grid-template-columns: .8fr 1.2fr;
  align-items: stretch;
}
.calculator-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.calculator-summary {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel-2);
  line-height: 1.55;
}
.calculator-summary.good {
  border-color: rgba(52, 229, 138, .35);
  color: #bdf9d8;
  background: rgba(52, 229, 138, .07);
}
.calculator-summary.bad {
  border-color: rgba(255, 91, 102, .32);
  color: #ffc3c8;
  background: rgba(255, 91, 102, .07);
}
.calculator-summary.neutral {
  border-color: rgba(255, 173, 50, .35);
  color: #ffdca7;
  background: rgba(255, 173, 50, .07);
}
.calculator-panel {
  display: grid;
  gap: 18px;
}
.calculator-input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.field-help {
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}
.calculator-breakdown {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel-2);
}
.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}
.breakdown-row:last-child {
  border-bottom: 0;
}
.breakdown-row span {
  color: var(--muted);
  font-size: .82rem;
}
.breakdown-row strong {
  text-align: right;
}
.breakdown-row.total {
  background: rgba(168, 255, 53, .06);
}
.breakdown-row.total strong {
  color: var(--lime);
  font-size: 1.45rem;
}
.comparison-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.018);
}
.comparison-card > div:not(.comparison-arrow) {
  min-width: 0;
}
.comparison-card span,
.comparison-card small {
  display: block;
  color: var(--muted);
}
.comparison-card strong {
  display: block;
  margin: 5px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comparison-arrow {
  color: var(--lime);
  font-size: 1.5rem;
  font-weight: 900;
}

@media (max-width: 1000px) {
  .calculator-advanced {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .calculator-input-grid {
    grid-template-columns: 1fr;
  }
  .comparison-card {
    grid-template-columns: 1fr;
  }
  .comparison-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }
}

.history-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.small-button {
  min-height: 38px;
  padding: 0 13px;
  font-size: .76rem;
}
.danger-button:hover {
  border-color: rgba(255, 91, 102, .55);
  color: #ff9aa2;
}
.chart-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  line-height: 1.6;
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.trend-up { color: #ff9aa2; }
.trend-down { color: #9ff5c4; }
.trend-flat { color: #ffd28b; }

.chart-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 12px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.chart-mode-badge.preview {
  color: #201505;
  background: #ffcf6e;
}
.chart-mode-badge.live {
  color: #07100e;
  background: var(--green);
}
.chart-mode-badge.hidden {
  display: none;
}
.preview-disclaimer {
  margin-top: 10px;
  color: #ffdca7;
  font-size: .74rem;
  line-height: 1.45;
}

.alert-card {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 34px;
  margin-top: 18px;
  padding: 22px;
  align-items: center;
}
.alert-card p {
  color: var(--muted);
  line-height: 1.6;
}
.alert-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 12px;
  align-items: end;
}
.alert-toggle {
  align-self: end;
}
.alert-status {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid var(--border);
  line-height: 1.5;
}
.alert-status.good {
  color: #bdf9d8;
  border-color: rgba(52,229,138,.35);
  background: rgba(52,229,138,.07);
}
.alert-status.bad {
  color: #ffc3c8;
  border-color: rgba(255,91,102,.35);
  background: rgba(255,91,102,.07);
}
.alert-status.neutral {
  color: #ffdca7;
  border-color: rgba(255,173,50,.35);
  background: rgba(255,173,50,.07);
}
@media (max-width: 1050px) {
  .alert-card {
    grid-template-columns: 1fr;
  }
  .alert-controls {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 720px) {
  .alert-controls {
    grid-template-columns: 1fr;
  }
}

.refresh-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 52px;
}
.refresh-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .78rem;
}
.cache-badge {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  font-size: .68rem;
  font-weight: 850;
}
.cache-badge.fresh {
  color: #bdf9d8;
  border-color: rgba(52,229,138,.35);
}
.cache-badge.cached {
  color: #ffdca7;
  border-color: rgba(255,173,50,.35);
}
.cache-badge.demo {
  color: #bcefff;
  border-color: rgba(64,217,255,.35);
}
.quick-picks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 4px 0 18px;
}
.quick-pick {
  position: relative;
  min-width: 0;
  padding: 20px;
}
.quick-label {
  display: block;
  color: var(--lime);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.quick-pick strong {
  display: block;
  margin: 9px 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.1rem;
}
.quick-pick small {
  display: block;
  min-height: 34px;
  color: var(--muted);
  line-height: 1.4;
}
.quick-pick .station-link {
  margin-top: 12px;
}
.quick-pick .station-link:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.station-item.favorite-item {
  border-left: 3px solid var(--lime);
  padding-left: 10px;
}
.refreshing {
  opacity: .68;
  pointer-events: none;
}
@media (max-width: 1050px) {
  .quick-picks {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .refresh-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .refresh-meta {
    justify-content: flex-start;
    padding-bottom: 10px;
  }
  .refresh-meta .button {
    width: 100%;
  }
}

.fuel-price-main {
  white-space: nowrap;
}
.fuel-price-tenth {
  position: relative;
  top: -.18em;
  margin-left: 1px;
  font-size: .58em;
  line-height: 0;
  font-weight: 950;
}
.fuel-price-unit {
  margin-left: 1px;
  font-size: .68em;
  font-weight: 800;
  color: var(--muted);
}
.station-price .fuel-price-unit,
.drawer-price .fuel-price-unit {
  color: inherit;
}

.station-total {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.station-saving {
  display: inline-block;
  margin-top: 4px;
  color: #9ff5c4;
  font-size: .7rem;
  font-weight: 850;
}
.station-saving.zero {
  color: var(--muted);
}
.drawer-total {
  margin-top: 8px;
  color: var(--muted);
  font-size: .88rem;
}
.drawer-saving {
  margin-top: 6px;
  color: #9ff5c4;
  font-weight: 850;
}
.quick-total {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-weight: 800;
}

.multi-fuel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}
.multi-fuel-item {
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}
.multi-fuel-item.active {
  border-color: rgba(168,255,53,.48);
  background: rgba(168,255,53,.07);
}
.multi-fuel-item span,
.multi-fuel-item small {
  display: block;
}
.multi-fuel-item span {
  color: var(--muted);
  font-size: .65rem;
  font-weight: 850;
  text-transform: uppercase;
}
.multi-fuel-item strong {
  display: block;
  margin: 4px 0;
  font-size: .9rem;
}
.multi-fuel-item small {
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.3;
}
.drawer-fuel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.drawer-fuel {
  padding: 13px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
}
.drawer-fuel.active {
  border-color: rgba(168,255,53,.5);
  background: rgba(168,255,53,.07);
}
.drawer-fuel span,
.drawer-fuel small {
  display: block;
}
.drawer-fuel span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
}
.drawer-fuel strong {
  display: block;
  margin: 5px 0;
}
.drawer-fuel small {
  color: var(--muted);
  font-size: .68rem;
}
.share-feedback {
  margin-top: 10px;
  color: #9ff5c4;
  font-size: .74rem;
  min-height: 18px;
}
@media (max-width: 720px) {
  .multi-fuel-grid,
  .drawer-fuel-grid {
    grid-template-columns: 1fr;
  }
}

/* Version 9.1 – kompakter Preisvergleich */
.station-list {
  display: grid;
  gap: 12px;
}
.station-item {
  display: block;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.018);
}
.station-item + .station-item {
  border-top: 1px solid var(--border);
}
.station-item.favorite-item {
  padding-left: 16px;
  border-left: 3px solid var(--lime);
}
.station-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}
.station-head-main {
  min-width: 0;
}
.station-head-price {
  min-width: 112px;
  text-align: right;
}
.station-head-price .station-price {
  font-size: 1.45rem;
  font-weight: 950;
}
.station-head-price .price-chip {
  margin-top: 7px;
}
.station-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}
.station-summary-row span {
  color: var(--muted);
  font-size: .72rem;
}
.station-summary-row strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: .86rem;
}
.station-summary-saving {
  text-align: right;
}
.station-summary-saving strong {
  color: #9ff5c4;
}
.station-fuel-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.station-fuel-table tr + tr {
  border-top: 1px solid var(--border);
}
.station-fuel-table td {
  padding: 9px 10px;
  vertical-align: middle;
}
.station-fuel-table td:first-child {
  width: 28%;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 850;
  text-transform: uppercase;
}
.station-fuel-table td:nth-child(2) {
  width: 30%;
  font-weight: 900;
}
.station-fuel-table td:last-child {
  color: var(--muted);
  font-size: .7rem;
  text-align: right;
}
.station-fuel-table tr.active-fuel {
  background: rgba(168,255,53,.07);
}
.station-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.station-actions .station-link {
  flex: 1;
  justify-content: center;
}
.multi-fuel-grid {
  display: none !important;
}
.station-total,
.station-saving {
  display: none !important;
}
@media (max-width: 720px) {
  .station-card-head {
    grid-template-columns: 1fr;
  }
  .station-head-price {
    min-width: 0;
    text-align: left;
  }
  .station-summary-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .station-summary-saving {
    text-align: left;
  }
  .station-fuel-table td {
    padding: 8px;
  }
  .station-fuel-table td:last-child {
    text-align: left;
  }
  .station-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.comparison-section {
  margin-top: 18px;
  padding: 22px;
}
.comparison-intro {
  margin: -4px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}
.comparison-empty {
  padding: 34px 20px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}
.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.comparison-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(255,255,255,.014);
}
.comparison-table th,
.comparison-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.comparison-table th:last-child,
.comparison-table td:last-child {
  border-right: 0;
}
.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
  border-bottom: 0;
}
.comparison-table thead th {
  background: rgba(168,255,53,.055);
}
.comparison-table thead th:first-child {
  width: 155px;
  color: var(--muted);
}
.comparison-table tbody th {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
}
.comparison-station-name {
  display: block;
  max-width: 210px;
  margin-bottom: 5px;
  font-weight: 900;
}
.comparison-station-meta {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.4;
}
.comparison-remove {
  display: inline-flex;
  margin-top: 9px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: .7rem;
}
.comparison-remove:hover {
  color: #ff9aa2;
  border-color: rgba(255,91,102,.45);
}
.compare-button.active {
  color: #07100e;
  border-color: var(--lime);
  background: var(--lime);
}
.comparison-best {
  color: #9ff5c4;
  font-weight: 900;
}
.comparison-worst {
  color: #ffc3c8;
}
.comparison-fuel-lines {
  display: grid;
  gap: 6px;
}
.comparison-fuel-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.comparison-fuel-line span {
  color: var(--muted);
  font-size: .72rem;
}
.comparison-fuel-line strong {
  font-size: .82rem;
}
@media (max-width: 720px) {
  .comparison-section {
    padding: 15px;
  }
}

.saved-places-bar {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
}
.saved-places-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.saved-places-heading small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
}
.saved-places-list {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 3px;
}
.saved-places-empty {
  color: var(--muted);
  font-size: .8rem;
}
.saved-place-chip {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel-2);
}
.saved-place-open {
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}
.saved-place-open strong,
.saved-place-open small {
  display: block;
}
.saved-place-open small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .64rem;
}
.saved-place-open:hover {
  color: var(--lime);
}
.saved-place-remove {
  align-self: stretch;
  width: 34px;
  border: 0;
  border-left: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}
.saved-place-remove:hover {
  color: #ff9aa2;
  background: rgba(255,91,102,.06);
}
.save-place-dialog {
  position: fixed;
  inset: 0;
  z-index: 4100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(5px);
}
.save-place-dialog[hidden] {
  display: none;
}
.save-place-card {
  position: relative;
  width: min(500px, 100%);
  padding: 28px;
}
.save-place-card .drawer-close {
  top: 14px;
  right: 14px;
}
.save-place-card h2 {
  margin-bottom: 22px;
}
.place-name-presets {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.save-place-summary {
  margin: 16px 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: .78rem;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .saved-places-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .saved-places-heading .button {
    width: 100%;
  }
  .save-place-card {
    padding: 22px 16px;
  }
}

.saved-place-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cache-badge.offline {
  color: #ffc3c8;
  border-color: rgba(255,91,102,.4);
  background: rgba(255,91,102,.07);
}
.cache-badge.online {
  color: #bdf9d8;
  border-color: rgba(52,229,138,.35);
}
.install-hint {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3200;
  width: min(370px, calc(100% - 36px));
  padding: 16px;
  border: 1px solid rgba(168,255,53,.38);
  border-radius: 15px;
  background: #0d1b1d;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.install-hint strong,
.install-hint span {
  display: block;
}
.install-hint span {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}
.install-hint-actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 720px) {
  .saved-place-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Version 13 – UX-Überarbeitung */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 9999;
  padding: 10px 14px; border-radius: 9px;
  color: #07100e; background: var(--lime); font-weight: 900;
}
.skip-link:focus { top: 12px; }
.results-summary { margin: 5px 0 0; color: var(--muted); font-size: .78rem; }

.advanced-filter-toggle {
  grid-column: 1 / -1; min-height: 38px; padding: 0; border: 0;
  color: var(--cyan); background: transparent; font-size: .78rem;
  font-weight: 850; text-align: left;
}
.advanced-filter-toggle::after { content: "  ↓"; }
.advanced-filter-toggle[aria-expanded="true"]::after { content: "  ↑"; }
.advanced-filters {
  grid-column: 1 / -1; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: inherit;
}
.advanced-filters[hidden] { display: none; }

.station-item { content-visibility: auto; contain-intrinsic-size: 340px; }
.station-item:focus-within { outline: 2px solid rgba(64,217,255,.55); outline-offset: 2px; }

.back-to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 3000;
  width: 44px; height: 44px; border: 1px solid var(--border);
  border-radius: 50%; color: var(--text); background: var(--panel);
  box-shadow: 0 12px 35px rgba(0,0,0,.32);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-action-bar { display: none; }

@media (max-width: 1050px) {
  .advanced-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { padding-bottom: 74px; }
  main { width: min(100% - 22px, var(--container)); }
  .hero { padding-top: 30px; padding-bottom: 24px; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3.2rem); line-height: .98; }
  .controls { gap: 11px; }
  .advanced-filters { grid-template-columns: 1fr; }
  .station-item { padding: 14px; border-radius: 14px; }
  .quick-pick { padding: 16px; }

  .mobile-action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 3500;
    display: grid; grid-template-columns: repeat(4, 1fr); min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--border);
    background: rgba(8,18,20,.96); backdrop-filter: blur(14px);
  }
  .mobile-action-bar button {
    display: grid; place-items: center; align-content: center; gap: 2px;
    border: 0; color: var(--muted); background: transparent;
  }
  .mobile-action-bar button span { color: var(--text); font-size: 1.05rem; font-weight: 900; }
  .mobile-action-bar button small { font-size: .62rem; }
  .mobile-action-bar button.active,
  .mobile-action-bar button.active span { color: var(--lime); }
  .back-to-top { right: 12px; bottom: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Version 14 – Routensuche */
.route-section {
  margin-top: 18px;
  padding: 22px;
}
.route-intro {
  margin: -3px 0 18px;
  color: var(--muted);
  line-height: 1.55;
}
.route-controls {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr .85fr .9fr auto;
  gap: 12px;
  align-items: end;
}
.route-notice {
  margin: 16px 0;
  padding: 12px 14px;
  border: 1px solid rgba(64,217,255,.28);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(64,217,255,.045);
  font-size: .78rem;
  line-height: 1.5;
}
.route-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  gap: 18px;
}
.route-map {
  min-height: 480px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel-2);
}
.route-summary {
  margin-bottom: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  background: var(--panel-2);
  line-height: 1.5;
}
.route-summary strong {
  color: var(--text);
}
.route-results {
  display: grid;
  gap: 10px;
}
.route-station {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}
.route-station-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.route-station h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}
.route-station-meta {
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.route-station-price {
  text-align: right;
  white-space: nowrap;
}
.route-station-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.route-value {
  padding: 9px;
  border-radius: 10px;
  background: var(--panel-2);
}
.route-value span,
.route-value strong {
  display: block;
}
.route-value span {
  color: var(--muted);
  font-size: .65rem;
}
.route-value strong {
  margin-top: 3px;
  font-size: .82rem;
}
.route-value.good strong {
  color: #9ff5c4;
}
@media (max-width: 1180px) {
  .route-controls {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .route-controls .button {
    width: 100%;
  }
}
@media (max-width: 900px) {
  .route-layout {
    grid-template-columns: 1fr;
  }
  .route-map {
    min-height: 360px;
  }
}
@media (max-width: 720px) {
  .route-section {
    padding: 15px;
  }
  .route-controls {
    grid-template-columns: 1fr;
  }
  .route-station-values {
    grid-template-columns: 1fr;
  }
}

/* Finale Version 15 – Rechtliches, Consent und SEO */
.site-footer {
  display: grid;
  gap: 16px;
  margin-top: 36px;
  padding: 26px max(22px, calc((100vw - var(--container)) / 2));
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: #071012;
}
.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}
.footer-main strong,
.footer-main span {
  display: block;
}
.footer-main strong {
  color: var(--text);
}
.footer-main span {
  margin-top: 5px;
  font-size: .78rem;
}
.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 10px 16px;
  flex-wrap: wrap;
}
.footer-links a,
.footer-links button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: .76rem;
  text-decoration: none;
  cursor: pointer;
}
.footer-links a:hover,
.footer-links button:hover {
  color: var(--lime);
}
.footer-disclaimer,
.footer-source {
  font-size: .7rem;
  line-height: 1.55;
}
.footer-disclaimer {
  padding-top: 13px;
  border-top: 1px solid var(--border);
}
.privacy-banner {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 6000;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(1050px, calc(100% - 36px));
  margin: auto;
  padding: 18px;
  border: 1px solid rgba(168,255,53,.38);
  border-radius: 16px;
  background: #0d1b1d;
  box-shadow: 0 25px 80px rgba(0,0,0,.55);
}
.privacy-banner[hidden] {
  display: none;
}
.privacy-banner strong,
.privacy-banner p {
  display: block;
}
.privacy-banner p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
}
.privacy-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.privacy-dialog {
  position: fixed;
  inset: 0;
  z-index: 6200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
}
.privacy-dialog[hidden] {
  display: none;
}
.privacy-dialog-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 27px;
}
.privacy-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 12px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--panel-2);
}
.privacy-option strong,
.privacy-option p {
  display: block;
}
.privacy-option p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.45;
}
.privacy-option.required span {
  color: #9ff5c4;
  font-size: .72rem;
  font-weight: 850;
}
.privacy-option input {
  width: 22px;
  height: 22px;
}
.privacy-dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 720px) {
  .footer-main,
  .privacy-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .footer-links {
    justify-content: flex-start;
  }
  .privacy-banner {
    bottom: 76px;
  }
  .privacy-banner-actions,
  .privacy-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Finale Version 15.1 – Footer-Projekte und Aufrufzähler */
.footer-navigation {
  display: grid;
  gap: 12px;
  justify-items: end;
}
.footer-project-links {
  display: flex;
  justify-content: flex-end;
  gap: 8px 14px;
  flex-wrap: wrap;
}
.footer-project-links span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}
.footer-project-links a {
  color: var(--cyan);
  font-size: .72rem;
  text-decoration: none;
}
.footer-project-links a:hover {
  color: var(--lime);
}
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.footer-counter {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .72rem;
}
.footer-counter strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .footer-navigation {
    justify-items: start;
  }
  .footer-project-links {
    justify-content: flex-start;
  }
  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
