:root {
  --bg: #f3ecdf;
  --panel: rgba(255, 251, 245, 0.74);
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --ink: #1f2a27;
  --muted: #69756f;
  --accent: #d66a31;
  --accent-strong: #b95422;
  --line: rgba(62, 71, 64, 0.1);
  --ok: #1f8a5b;
  --warn: #b7791f;
  --bad: #c53030;
  --shadow: 0 24px 60px rgba(50, 53, 46, 0.1);
  --glass: saturate(140%) blur(18px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "SF Pro Display", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(214, 106, 49, 0.14), transparent 22%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.78), transparent 20%),
    linear-gradient(180deg, #fffaf3 0%, var(--bg) 54%, #eee4d3 100%);
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0 0 34px;
}

.hero {
  display: grid;
  gap: 18px;
  align-items: start;
}

.top-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.nav-pill,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: var(--glass);
  color: var(--ink);
  text-decoration: none;
}

.nav-pill.active {
  background: linear-gradient(180deg, rgba(208, 94, 41, 0.16), rgba(208, 94, 41, 0.08));
  color: var(--accent-strong);
  font-weight: 700;
}

.top-nav .nav-pill-lottery {
  color: #c53030;
  font-weight: 800;
  border-color: rgba(197, 48, 48, 0.18);
}

.top-nav .nav-pill-lottery:visited,
.top-nav .nav-pill-lottery:hover,
.top-nav .nav-pill-lottery:active {
  color: #c53030;
}

.hero-panels {
  display: grid;
  gap: 14px;
}

.hero-panels-compact {
  align-content: start;
}

.hero-copy,
.hero-panels {
  min-width: 0;
}

.hero-copy {
  display: flex;
  flex-direction: column;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(2.4rem, 9vw, 5.1rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.stats-inline {
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.55;
  display: grid;
  gap: 4px;
}

.stats-inline strong,
.stats-inline span {
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead,
.location-hint,
.address,
.history,
.hero-panel li {
  color: var(--muted);
}

.hero-panel,
.controls,
.map-card,
.station-card,
.suggestion-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
}

.hero-panel,
.controls,
.map-card,
.station-card,
.suggestion-card {
  padding: 18px;
}

.hero-panel p,
.hero-panel ul {
  margin: 0;
}

.panel-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}

.panel-copy,
.helper-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero-panel ul {
  padding-left: 18px;
  margin-top: 10px;
  line-height: 1.6;
}

.hero-panel-emphasis {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 240, 0.72));
}

.hero-actions,
.helper-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.controls {
  margin-top: 0;
  background: rgba(255, 251, 245, 0.9);
}

.locate-button,
.actions button,
.ghost-button {
  border: 0;
  border-radius: 20px;
  min-height: 52px;
  cursor: pointer;
}

.locate-button {
  width: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(214, 106, 49, 0.22);
}

.controls-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.controls-link-button {
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  font-weight: 700;
}

.section-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.soft-link {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.92rem;
}

.filter-row {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  grid-template-columns: 1fr;
  align-items: end;
}

.quick-actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 10px;
  margin-top: 16px;
}

.icon-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  cursor: pointer;
}

.search-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.search-drawer {
  margin-top: 12px;
}

.filter-row > * {
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.field-search {
  grid-column: 1 / -1;
}

.location-hint {
  margin: 14px 0 0;
  font-size: 0.94rem;
}

.map-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.map-card {
  margin-top: 0;
  position: relative;
}

.map-workspace {
  margin-top: 0;
  display: grid;
  gap: 18px;
}

.map-sidebar-desktop {
  display: grid;
  gap: 18px;
}

.helper-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass);
  padding: 18px;
}

.trust-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.trust-list div {
  display: grid;
  gap: 2px;
}

.trust-list span {
  color: var(--muted);
  line-height: 1.5;
}

.map-filters {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.map-filters-primary {
  grid-template-columns: 1fr;
}

.fuel-filter-label {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.map-filter-button {
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: var(--glass);
}

.map-filters-primary .map-filter-button {
  min-height: 56px;
  border-radius: 20px;
  font-size: 1.04rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: none;
}

.map-filters-secondary .map-filter-button {
  min-height: 42px;
  border-radius: 16px;
  font-size: 0.96rem;
}

.map-filter-button.active {
  background: linear-gradient(180deg, var(--ok) 0%, #166946 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 138, 91, 0.22);
}

.map-filters-primary .map-filter-button.active {
  box-shadow: 0 18px 32px rgba(31, 138, 91, 0.22);
}

.map-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.map-refresh-button {
  flex: 0 0 auto;
}

.map {
  min-height: 50vh;
  border-radius: 22px;
  overflow: hidden;
}

.map-hero {
  min-height: 72vh;
}

.map-card-desktop {
  padding: 18px;
}

.map-top-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.map-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.map-bottom-actions {
  display: grid;
  gap: 10px;
}

.suggestion-card {
  margin-top: 18px;
}

.suggestion-card-inline,
.selected-station-card {
  margin-top: 0;
}

.selected-station-card {
  position: relative;
  scroll-margin-top: 18px;
  transition: box-shadow 0.24s ease, border-color 0.24s ease, transform 0.24s ease;
}

.selected-station-card.selected-station-spotlight {
  border-color: rgba(208, 94, 41, 0.5);
  box-shadow: 0 0 0 3px rgba(214, 106, 49, 0.18), 0 22px 40px rgba(214, 106, 49, 0.16);
  transform: translateY(-2px);
}

.selected-station-guide {
  margin: 2px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.selected-station-actions {
  display: grid;
  gap: 10px;
  width: 100%;
}

.selected-station-actions-row.actions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.selected-station-actions-row-top.actions button {
  grid-column: span 2;
}

.selected-station-actions-row-bottom.actions button {
  grid-column: span 3;
}

.selected-station-actions-row.actions button {
  width: 100%;
  min-width: 0;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  padding: 12px;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(214, 106, 49, 0.1);
}

.tops {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.top-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.top-card h2 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.top-list {
  display: grid;
  gap: 10px;
}

.top-item {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.top-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.top-item span,
.top-item small,
.top-empty {
  color: var(--muted);
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.results-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--ink);
  backdrop-filter: var(--glass);
}

.head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small-lead {
  margin: 0 0 14px;
  font-size: 0.96rem;
}

.helper-button {
  width: 100%;
}

.helper-message,
.helper-coords {
  min-height: 1.2rem;
}

.pagination {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.page-button {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  cursor: pointer;
}

.page-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.suggestion-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.suggestion-actions {
  display: grid;
  gap: 10px;
}

.hidden {
  display: none;
}

.page-button.active {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  border-color: transparent;
}

.station-list {
  display: grid;
  gap: 12px;
}

.brand {
  margin: 0 0 4px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
}

.name {
  margin: 0;
  font-size: 1.06rem;
}

.address {
  margin: 0;
  font-size: 0.95rem;
}

.station-list-card {
  display: grid;
  gap: 12px;
}

.station-list-compact {
  gap: 10px;
}

.station-teaser {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.station-teaser:hover {
  transform: translateY(-1px);
  border-color: rgba(208, 94, 41, 0.26);
}

.station-teaser.active {
  border-color: rgba(208, 94, 41, 0.45);
  box-shadow: 0 14px 24px rgba(208, 94, 41, 0.12);
}

.station-teaser-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.station-teaser .name {
  font-size: 1rem;
}

.station-teaser .address {
  font-size: 0.9rem;
  line-height: 1.45;
}

.station-teaser-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(102, 116, 109, 0.14);
  color: #5e6b65;
  white-space: nowrap;
}

.badge.ok {
  background: rgba(31, 138, 91, 0.12);
  color: var(--ok);
}

.badge.warn {
  background: rgba(183, 121, 31, 0.12);
  color: var(--warn);
}

.badge.bad {
  background: rgba(197, 48, 48, 0.12);
  color: var(--bad);
}

.fuel-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#selectedStationSummary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.selected-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 88px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.selected-summary-row strong,
.selected-summary-row span,
.selected-summary-row small {
  display: block;
}

.selected-summary-row strong {
  font-size: 0.92rem;
}

.selected-summary-row span,
.selected-summary-row small {
  color: var(--muted);
}

.selected-summary-row small {
  text-align: right;
  white-space: nowrap;
}

.summary-chip {
  padding: 10px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}

.summary-chip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.summary-chip span,
.summary-chip small {
  display: block;
  color: var(--muted);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.actions button {
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  font-weight: 700;
  color: var(--ink);
}

.actions button.primary {
  background: linear-gradient(180deg, rgba(208, 94, 41, 0.13), rgba(208, 94, 41, 0.05));
}

.history {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
}

.message {
  min-height: 1.1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.station-marker {
  background: transparent;
  border: 0;
}

.station-marker-core {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--marker-color);
  opacity: var(--marker-opacity);
  border: 4px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.station-marker-glyph {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.map-popup {
  min-width: 240px;
  display: grid;
  gap: 8px;
}

.map-popup-brand {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 800;
}

.map-popup-name {
  font-size: 1rem;
}

.map-popup-address,
.map-popup-foot {
  color: var(--muted);
}

.map-popup-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(102, 116, 109, 0.14);
}

.map-popup-likely_available {
  background: rgba(31, 138, 91, 0.12);
  color: var(--ok);
}

.map-popup-likely_empty {
  background: rgba(197, 48, 48, 0.12);
  color: var(--bad);
}

.map-popup-mixed {
  background: rgba(183, 121, 31, 0.12);
  color: var(--warn);
}

.map-popup-stats {
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
}

.map-popup-foot {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
}

.reports-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.reports-controls {
  display: grid;
  gap: 12px;
}

.reports-title {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 7vw, 3.3rem);
  line-height: 0.98;
}

.time-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.time-filter {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.time-filter.active {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(208, 94, 41, 0.22);
}

.reports-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.accent-card h2 {
  color: var(--ok);
}

.danger-card h2 {
  color: var(--bad);
}

.table-card {
  margin-top: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.table-wrap {
  overflow-x: auto;
}

.reports-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
}

.reports-table th,
.reports-table td {
  padding: 12px 10px;
  text-align: left;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

.report-row-available {
  background: rgba(31, 138, 91, 0.08);
}

.report-row-empty {
  background: rgba(197, 48, 48, 0.08);
}

.reports-table thead th {
  color: var(--accent-strong);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 0;
}

@media (min-width: 760px) {
  .app-shell {
    width: 100%;
    max-width: none;
    padding: 0 0 42px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: end;
    padding: 0 24px;
  }

  .reports-hero {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panels {
    grid-template-rows: unset;
  }

  .hero-copy,
  .hero-panels {
    height: 100%;
  }

  .hero-actions,
  .helper-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-workspace {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: 100vh;
    display: block;
  }

  .map-sidebar-desktop {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 4;
    width: 390px;
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding-right: 6px;
  }

  .map-card-desktop {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 0;
    border: 0;
    padding: 0;
  }

  .map-bottom-actions {
    grid-template-columns: repeat(2, max-content);
  }

  .reports-controls {
    justify-items: end;
  }

  .map-desktop {
    min-height: 100vh;
    border-radius: 0;
  }

  .actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .reports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  .map-desktop {
    min-height: 48vh;
  }

  .map-bottom-actions {
    grid-template-columns: 1fr;
  }
}
