/* Station cards — tube frame: dark gold · light gold · dark gold */
.station-card {
  background: linear-gradient(145deg, rgba(10, 26, 18, 0.95) 0%, rgba(3, 16, 10, 0.98) 100%);
  border: 1px solid rgba(74, 58, 12, 0.95);
  border-radius: var(--r-box);
  padding: 10px 12px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 0 0 3px rgba(58, 46, 10, 0.98),
    inset 0 1px 0 rgba(243, 229, 171, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  /* Phone: no long-press text select / callout on location cards */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.station-card:hover {
  border-color: rgba(90, 72, 16, 1);
  box-shadow:
    0 0 0 2px rgba(230, 200, 90, 0.55),
    0 0 0 3px rgba(58, 46, 10, 1),
    inset 0 1px 0 rgba(243, 229, 171, 0.14),
    0 8px 20px rgba(0, 0, 0, 0.45);
}
.station-card:active { transform: scale(0.99); }
.station-card.selected {
  border-color: rgba(58, 46, 10, 1);
  box-shadow:
    0 0 0 2px rgba(243, 229, 171, 0.65),
    0 0 0 3px rgba(58, 46, 10, 1),
    0 0 12px rgba(212, 175, 55, 0.22),
    inset 0 1px 0 rgba(243, 229, 171, 0.18);
}
.station-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.station-card .card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.station-card .card-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.card-type-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(10, 26, 18, 0.9);
  color: var(--accent);
}
.card-type-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
.card-type-liquid { color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
.card-type-diesel { color: #e5e5e5; border-color: rgba(120, 120, 120, 0.5); }
.card-type-bio { color: #bef264; border-color: rgba(132, 204, 22, 0.45); }
.card-type-ev { color: #c084fc; border-color: rgba(168, 85, 247, 0.45); }
.card-type-lpg { color: #a78bfa; border-color: rgba(139, 92, 246, 0.45); }
.card-type-gas { color: #5eead4; border-color: rgba(20, 184, 166, 0.45); }
.card-type-solid { color: #fbbf24; border-color: rgba(245, 158, 11, 0.45); }
.card-type-oil { color: #fb923c; border-color: rgba(234, 88, 12, 0.45); }
.fav-btn {
  border: 1px solid transparent;
  background: rgba(212, 175, 55, 0.08);
  color: rgba(212, 175, 55, 0.55);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}
.fav-btn:hover {
  color: var(--accent);
  background: rgba(212, 175, 55, 0.16);
}
.fav-btn:active {
  transform: scale(0.92);
}
.fav-btn.on {
  color: #1a1508;
  background: var(--gold-grad);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}
.station-card.is-fav {
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.12);
}
/* Detail action chips — 2×2 grid so Fav matches the others (no full-width wrap) */
#detail .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}
#detail .actions button,
#detail .btn-dir,
#detail .btn-calc,
#detail .btn-update,
#detail .btn-fav {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  border: 1px solid var(--border-gold-soft);
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
#detail .actions button:active {
  transform: scale(0.96);
}
/* Primary / active only — not every action gold */
#detail .btn-calc:not(:disabled),
#detail .btn-fav.on {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
#detail .btn-calc:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
}
#detail .btn-fav:not(.on) {
  background: var(--panel-2);
  color: var(--muted);
  box-shadow: none;
}
.station-card .brand {
  font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-cheapest {
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.station-card .name { font-size: 13px; font-weight: 600; margin: 3px 0 2px; color: var(--text); }
.station-card .row {
  display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px;
}
.station-card .price {
  font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text);
  line-height: 1.1;
}
.station-card .meta { font-size: 11px; color: var(--muted); }
/* Save vs area official average */
.station-card .save-line {
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.station-card .save-line.is-save {
  color: var(--emerald);
  text-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}
.station-card .save-line.is-more {
  color: var(--muted);
  font-weight: 600;
}
.station-card .save-line.is-flat {
  color: var(--muted);
  font-weight: 600;
}
/* Calc annual vs area average */
.calc-save-line {
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.calc-save-line.is-save { color: var(--emerald); }
.calc-save-line.is-more { color: var(--muted); font-weight: 600; }
.calc-save-line.is-flat { color: var(--muted); font-weight: 600; }
.calc-save-line.hidden { display: none; }

/* Map markers */
/* User / pinned location — distinct from station dots */
.map-user-pin {
  width: 28px;
  height: 36px;
  cursor: default;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.55));
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.map-user-pin svg {
  display: block;
  width: 28px;
  height: 36px;
}

/* Icon badge pins — compact for dense WM maps */
.map-marker {
  width: 18px;
  height: 18px;
  background: linear-gradient(145deg, #2a1a08 0%, #120c04 100%);
  border: 1.5px solid var(--accent-bright);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(5, 13, 8, 0.85),
    0 2px 5px rgba(0, 0, 0, 0.45);
  color: #ff9a3c;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  /* Phone: no long-press text select / callout on map markers */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.map-marker svg {
  width: 10px;
  height: 10px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.map-marker:hover {
  transform: scale(1.12);
  border-color: var(--accent);
}
/* Favourited stations — star pin, gold ring, stands out from standard pumps */
.map-marker.is-fav {
  width: 22px;
  height: 22px;
  background: linear-gradient(145deg, #3a2a0a 0%, #1a1204 100%);
  border: 2px solid #e8c84a;
  color: #f0d35a;
  z-index: 4;
  box-shadow:
    0 0 0 1px rgba(5, 13, 8, 0.9),
    0 0 12px rgba(212, 175, 55, 0.55);
}
.map-marker.is-fav svg {
  width: 12px;
  height: 12px;
}
.map-marker.selected {
  width: 22px;
  height: 22px;
  background: var(--gold-grad);
  border: 2px solid #01160a;
  color: #01160a;
  z-index: 5;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.5),
    0 0 8px rgba(16, 185, 129, 0.35);
  animation: marker-pulse 1.4s ease-in-out infinite;
}
.map-marker.selected.svg,
.map-marker.selected svg {
  width: 12px;
  height: 12px;
}
/* Selected + favourite keeps gold fill, star icon still readable */
.map-marker.selected.is-fav {
  border-color: #01160a;
  color: #01160a;
}
@keyframes marker-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(212, 175, 55, 0.45),
      0 0 6px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(212, 175, 55, 0.2),
      0 0 10px rgba(16, 185, 129, 0.45);
  }
}

/* Detail card */
#detail {
  position: absolute; left: 12px; right: 12px;
  /* Above nav + home indicator; room for selected pin */
  bottom: calc(var(--nav-total) + 28px);
  max-width: 420px; margin: 0 auto;
  max-height: calc(100dvh - var(--nav-total) - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(5, 13, 8, 0.94);
  border: 1px solid var(--border-gold-soft); border-radius: var(--r-box);
  padding: 16px; z-index: 30;
  transform: translateY(120%); transition: transform 0.28s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 -12px 40px rgba(0,0,0,0.65), inset 0 1px 0 rgba(243, 229, 171, 0.08);
}
#detail.open { transform: translateY(0); }

/* Visible scrollbar on dark panels (phones especially) */
#detail,
#calc-panel,
#about-panel,
.drawer-body {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #1a2e22;
}
#detail::-webkit-scrollbar,
#calc-panel::-webkit-scrollbar,
#about-panel::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
  width: 8px;
}
#detail::-webkit-scrollbar-track,
#calc-panel::-webkit-scrollbar-track,
#about-panel::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
  background: #1a2e22;
  border-radius: var(--r-box);
}
#detail::-webkit-scrollbar-thumb,
#calc-panel::-webkit-scrollbar-thumb,
#about-panel::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: var(--r-box);
  border: 2px solid #1a2e22;
}

@media (max-width: 640px) {
  #detail {
    left: 8px; right: 8px;
    bottom: calc(var(--nav-total) + 12px);
    max-height: calc(100dvh - var(--nav-total) - 24px);
    padding: 14px 12px 16px;
  }
  #detail .actions button {
    padding: 10px 8px;
    font-size: 12px;
    min-height: 42px;
  }
  #detail .detail-x {
    width: 40px; height: 40px;
    top: 8px; right: 8px;
  }
}
#detail .detail-x {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: var(--r-box);
  border: 1px solid var(--border-dim);
  background: var(--panel-2); color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
#detail .detail-x:hover { color: var(--text); border-color: var(--border); }
#detail .brand {
  font-size: 11px; color: var(--accent); font-weight: 700; text-transform: uppercase;
}
#detail .name { font-size: 17px; font-weight: 700; margin: 2px 0 6px; color: var(--text); }
#detail .addr { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
#detail .drive-cost {
  font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 10px;
}
#detail .fuels { margin-bottom: 12px; }
#detail .fuel-block {
  padding: 8px 10px;
  margin: 0 -10px;
  border-bottom: 1px solid #1a2e22;
  border-radius: 8px;
  transition: background 0.12s ease, opacity 0.12s ease;
}
#detail .fuel-block:last-child { border-bottom: none; }
#detail .fuel-block.is-available {
  cursor: pointer;
}
#detail .fuel-block.is-available:hover {
  background: rgba(212, 175, 55, 0.08);
}
#detail .fuel-block.is-selected {
  background: rgba(212, 175, 55, 0.14);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
#detail .fuel-block.is-unavailable {
  opacity: 0.45;
  cursor: default;
}
#detail .fuel-block-head {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#detail .fuel-type-name {
  font-size: 13px; font-weight: 700; color: var(--text);
}
#detail .fuel-selected-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0c1410;
  background: var(--accent, #d4af37);
  padding: 1px 6px;
  border-radius: 999px;
}
#detail .fuel-na-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid #2a3d30;
  padding: 1px 6px;
  border-radius: 999px;
}
#detail .fuel-na-msg {
  font-size: 11px;
  color: var(--muted);
}
#detail .fuel-cols {
  display: grid;
  gap: 8px 12px;
  align-items: start;
}
#detail .fuel-cols.dual {
  grid-template-columns: 1fr 1fr;
}
#detail .fuel-cols.single {
  grid-template-columns: 1fr;
}
#detail .fuel-cell {
  min-width: 0;
}
#detail .fuel-meta {
  font-size: 10px;
  line-height: 1.3;
  margin-bottom: 2px;
}
#detail .fuel-price {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
#detail .src-official .fuel-price { color: var(--text); }
#detail .src-official .fuel-meta { color: var(--muted); }
#detail .src-user .fuel-price { color: #f0b429; } /* amber — community */
#detail .src-user .fuel-meta { color: #c4a035; }
#detail .user-history {
  font-size: 10px;
  color: #c4a035;
  line-height: 1.35;
  margin-top: 2px;
  opacity: 0.9;
}

.station-card .price-user { color: var(--amber-user); }
.station-card .src-note {
  font-size: 10px; margin-top: 3px; font-weight: 600;
}
.station-card .src-note.user { color: var(--amber-user); }
/* Opening times on station detail */
#detail .hours-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 6px 0 4px;
  font-size: 12px;
}
#detail .hours-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
#detail .hours-badge.is-open {
  background: rgba(16, 185, 129, 0.18);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.45);
}
#detail .hours-badge.is-closed {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
#detail .hours-badge.is-unknown {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--border-dim);
}
#detail .hours-text {
  color: var(--muted);
  font-weight: 600;
}
#detail .hours-text .hours-source {
  font-weight: 500;
  opacity: 0.85;
  font-size: 11px;
}

#update-price-form .up-hours-daily {
  margin-bottom: 10px;
}
#update-price-form .up-hours-daily.hidden {
  display: none;
}
#update-price-form .up-hours-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
#update-price-form .up-hours-pickers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 6px;
}
#update-price-form .up-hours-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
#update-price-form .up-hours-selects {
  display: flex;
  align-items: center;
  gap: 4px;
}
#update-price-form .up-hours-colon {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
#update-price-form .up-hours-select {
  background: var(--input-bg);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--r-box);
  color: var(--text);
  padding: 8px 6px;
  font-size: 14px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  color-scheme: dark;
}
#update-price-form .up-hours-select:focus {
  outline: none;
  border-color: var(--accent);
}
#update-price-form .up-hours-mode.sort-pill.active {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
}

/* Update price form (inside detail) */
#update-price-form {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1a2e22;
}
#update-price-form.visible { display: block; }
#update-price-form .section-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 0 0 8px; font-weight: 600;
}
#update-price-form .up-row {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-bottom: 10px;
}
#update-price-form .up-fuel,
#update-price-form .up-unit {
  padding: 6px 11px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border-dim);
  background: var(--panel-2); color: var(--muted);
}
#update-price-form .up-unit.active {
  background: var(--gold-grad); border-color: var(--accent); color: #01160a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
#update-price-form .up-fuel[data-fuel="E10"],
#update-price-form .up-fuel[data-fuel="E5"] {
  background: linear-gradient(145deg, #1f6b42 0%, #154d30 100%);
  color: #bbf7d0; border-color: #2d6a4f;
}
#update-price-form .up-fuel[data-fuel="B7S"],
#update-price-form .up-fuel[data-fuel="B7P"] {
  background: linear-gradient(145deg, #2a2a2a 0%, #141414 100%);
  color: #e5e5e5; border-color: #505050;
}
#update-price-form .up-fuel[data-fuel="B10"],
#update-price-form .up-fuel[data-fuel="HVO"] {
  background: linear-gradient(145deg, #5c4030 0%, #3a281c 100%);
  color: #f0dcc8; border-color: #8b6914;
}
#update-price-form .up-fuel.active {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
#update-price-form #up-amount {
  width: 100px; background: var(--input-bg);
  border: 1px solid var(--border-dim); border-radius: var(--r-box);
  color: var(--text); padding: 8px 10px; font-size: 14px; font-weight: 600;
}
#update-price-form #up-amount:focus {
  outline: none; border-color: var(--accent);
}
#update-price-form .up-disclaimer {
  font-size: 11px; color: var(--muted); line-height: 1.4;
  margin: 12px 0 0; padding: 8px 10px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--border-dim);
  border-radius: var(--r-box);
}
#update-price-form .up-hint {
  font-size: 11px; color: var(--muted); margin-bottom: 10px;
}
#update-price-form .up-status {
  font-size: 12px; margin-bottom: 8px; min-height: 1.2em;
}
#update-price-form .up-status.ok { color: #4ade80; }
#update-price-form .up-status.err { color: #f87171; }
#update-price-form .up-actions { display: flex; gap: 8px; }
#update-price-form .up-actions button {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
#update-price-form .up-actions button:active { transform: scale(0.97); }
#update-price-form .btn-save {
  border: 1px solid #ffe28a;
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%);
  color: #0d1f14;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(138, 98, 8, 0.4),
    0 4px 14px rgba(229, 184, 66, 0.35);
}
#update-price-form .btn-cancel {
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: #0a1810;
  color: #a3b8aa;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Calc panel */
#calc-panel {
  position: absolute; top: 0; left: 0; right: 0; bottom: var(--nav-total);
  background: var(--bg); z-index: 25;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + var(--safe-top)) 14px 28px;
  display: none;
}
#calc-panel.visible { display: block; }
#calc-panel .calc-inner { max-width: 380px; margin: 0 auto; }
#calc-panel h2 {
  font-size: 17px; font-weight: 800; margin-bottom: 2px;
  letter-spacing: -0.02em;
}
#calc-panel h2 span {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
#calc-panel .sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
#calc-panel input:not([type="range"]) {
  font-size: 16px; /* prevent iOS zoom */
  min-height: 40px;
}
#calc-panel input[type="range"] {
  min-height: 0;
  height: 6px;
  font-size: inherit;
}

/* About panel — contact, trust, version */
#about-panel {
  position: absolute; top: 0; left: 0; right: 0; bottom: var(--nav-total);
  background: var(--bg); z-index: 25;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(12px + var(--safe-top)) 14px 28px;
  display: none;
}
#about-panel.visible { display: block; }
.about-inner { max-width: 380px; margin: 0 auto; }
#about-panel h2 {
  font-size: 17px; font-weight: 800; margin-bottom: 2px;
  letter-spacing: -0.02em;
}
#about-panel h2 span {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
#about-panel .sub {
  font-size: 12px; color: var(--muted); margin-bottom: 14px; line-height: 1.4;
}
.about-card {
  background: linear-gradient(145deg, rgba(10, 26, 18, 0.95) 0%, rgba(3, 16, 10, 0.98) 100%);
  border: 1px solid rgba(74, 58, 12, 0.95);
  border-radius: var(--r-box);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 0 0 3px rgba(58, 46, 10, 0.98),
    inset 0 1px 0 rgba(243, 229, 171, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.3);
}
.about-card-quiet {
  box-shadow: none;
  border: 1px solid var(--border-gold-soft);
}
.about-card h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}
.about-card p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 8px;
}
.about-card p:last-child { margin-bottom: 0; }
.about-list {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.45;
}
.about-list li { margin-bottom: 4px; }
.about-meta {
  font-size: 12px !important;
  color: var(--muted) !important;
  font-variant-numeric: tabular-nums;
}
.about-hint {
  font-size: 11px !important;
  color: var(--muted) !important;
  line-height: 1.4 !important;
}
.about-contact-line a {
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 600;
}
.about-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.about-social {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-gold-soft);
  background: var(--panel-2);
  color: var(--accent-bright);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.about-social:active {
  transform: scale(0.97);
}
.about-social-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}
/* Brand-tinted pills */
.about-social-x {
  color: #e8eef2;
  border-color: rgba(232, 238, 242, 0.28);
  background: linear-gradient(180deg, #1a2228 0%, #12181d 100%);
}
.about-social-x:hover {
  border-color: rgba(232, 238, 242, 0.5);
  color: #fff;
}
.about-social-github {
  color: #e6edf3;
  border-color: rgba(88, 166, 255, 0.28);
  background: linear-gradient(180deg, #1b2430 0%, #121820 100%);
}
.about-social-github:hover {
  border-color: rgba(88, 166, 255, 0.55);
  color: #fff;
}
.about-social-patreon {
  color: #ff424d;
  border-color: rgba(255, 66, 77, 0.4);
  background: linear-gradient(180deg, #2a1518 0%, #1a0e10 100%);
}
.about-social-patreon:hover {
  border-color: rgba(255, 66, 77, 0.7);
  color: #ff6b73;
}
.about-social.is-missing {
  opacity: 0.45;
  pointer-events: none;
}
.about-btn {
  width: 100%;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: var(--r-box);
  border: 1px solid var(--border-gold-soft);
  background: var(--panel-2);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.about-btn:active { transform: scale(0.98); }
.about-btn-primary {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%);
  border-color: #ffe28a;
  color: #0d1f14;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 12px rgba(212, 175, 55, 0.28);
}
.about-btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}
#about-update-status.is-behind {
  color: #fbbf24 !important;
  font-weight: 700;
}
#about-update-status.is-current {
  color: #34d399 !important;
}


/* Preferences stubs — roadmap cards */
.about-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.about-card-head h3 {
  margin-bottom: 0;
}
.about-soon {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(212, 175, 55, 0.12);
  color: var(--accent-bright);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.about-card-stub {
  opacity: 0.92;
}
.about-stub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.about-stub-btn {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-dim);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.75;
}
.about-social.is-missing {
  opacity: 0.45;
  pointer-events: none;
}
.about-hint code {
  font-size: 10px;
  color: var(--accent-bright);
}

/* Share QR card */
.about-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.about-qr-wrap {
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.about-qr-img {
  display: block;
  width: 148px;
  height: 148px;
  image-rendering: pixelated;
}
.about-share-copy {
  flex: 1 1 140px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#about-share-url {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 11px !important;
  line-height: 1.35 !important;
}
.about-share-row {
  max-width: 100%;
}
.about-share-copy .about-btn {
  margin: 0;
  width: 100%;
}
.about-btn-pill {
  border-radius: var(--r-pill) !important;
  padding: 9px 14px;
}
#about-copy-status,
#about-install-status {
  margin-top: 2px;
  color: var(--accent-bright) !important;
}
#about-install-app:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Compact L ↔ UK gal strip (not a full calc card) */
.unit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(10, 26, 18, 0.95) 0%, rgba(3, 16, 10, 0.98) 100%);
  border: 1px solid rgba(74, 58, 12, 0.95);
  border-radius: var(--r-box);
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 0 0 3px rgba(58, 46, 10, 0.98),
    inset 0 1px 0 rgba(243, 229, 171, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.3);
}
.unit-strip .unit-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.unit-strip input {
  width: 80px;
  min-height: 36px;
  background: var(--input-bg);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--r-box);
  color: var(--text);
  padding: 6px 10px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.unit-strip input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}
.unit-strip input::-webkit-outer-spin-button,
.unit-strip input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.unit-strip .unit-swap {
  color: var(--accent-bright);
  font-size: 14px;
  font-weight: 700;
  padding: 0 2px;
}
.unit-strip .unit-note {
  flex: 1 1 100%;
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
@media (min-width: 400px) {
  .unit-strip .unit-note {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

.calc-box {
  background: linear-gradient(145deg, rgba(10, 26, 18, 0.95) 0%, rgba(3, 16, 10, 0.98) 100%);
  border: 1px solid rgba(74, 58, 12, 0.95);
  border-radius: var(--r-box);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 0 0 3px rgba(58, 46, 10, 0.98),
    inset 0 1px 0 rgba(243, 229, 171, 0.1),
    0 6px 16px rgba(0, 0, 0, 0.3);
}
.calc-box h3 {
  font-size: 12px; color: var(--accent); margin-bottom: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* List section cards — light frame like fuel-track (not heavy calc-box / station rings) */
.list-ticket {
  background: linear-gradient(180deg, rgba(20, 39, 28, 0.55) 0%, rgba(12, 24, 17, 0.7) 100%);
  border: 1px solid rgba(229, 184, 75, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.list-ticket-title {
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.list-ticket .section-label {
  margin-top: 10px;
}
.list-ticket .section-label-row:first-child .section-label,
.list-ticket > .section-label:first-child {
  margin-top: 0;
}
#shared-area-controls.list-ticket .section-label-row:first-child {
  margin-top: 0;
}

.calc-fields { display: flex; gap: 8px; margin-bottom: 6px; }
.calc-fields .field { flex: 1; min-width: 0; }
.calc-fields label {
  display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px;
}
.calc-fields input, .calc-box input {
  width: 100%; background: var(--input-bg);
  border: 1px solid var(--border-gold-soft); border-radius: var(--r-box);
  color: var(--text); padding: 8px; font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
.calc-fields input:focus, .calc-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}
.calc-result {
  font-size: 15px; font-weight: 800; color: var(--emerald); margin-top: 6px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}
.calc-box .calc-result {
  padding: 8px 10px;
  border-radius: var(--r-box);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
}
.calc-estimate-note {
  font-size: 10px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.35;
}
.annual-miles-block {
  margin: 6px 0 4px;
}
.annual-miles-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.annual-miles-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
/* Match radius slider: gold → emerald track, gold thumb (all calc annual-miles) */
#annual-miles,
#ev-annual-miles,
#lpg-annual-miles {
  width: 100%;
  height: 6px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border-radius: var(--r-pill);
  outline: none;
}
#annual-miles::-webkit-slider-runnable-track,
#ev-annual-miles::-webkit-slider-runnable-track,
#lpg-annual-miles::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0%, var(--emerald) 100%);
}
#annual-miles::-webkit-slider-thumb,
#ev-annual-miles::-webkit-slider-thumb,
#lpg-annual-miles::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  border: 2px solid var(--panel);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
#annual-miles::-moz-range-track,
#ev-annual-miles::-moz-range-track,
#lpg-annual-miles::-moz-range-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0%, var(--emerald) 100%);
}
#annual-miles::-moz-range-thumb,
#ev-annual-miles::-moz-range-thumb,
#lpg-annual-miles::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
}
/* 10k at (10000-2000)/(25000-2000) ≈ 34.8% — not visual centre */
.annual-scale {
  position: relative;
  height: 14px;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}
.annual-scale span {
  position: absolute;
  top: 0;
}
.annual-scale .at-0 { left: 0; }
.annual-scale .at-10k {
  left: 34.78%;
  transform: translateX(-50%);
}
.annual-scale .at-end {
  right: 0;
}

/* Module / WIP tabs */
.mod-row {
  display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px;
  align-items: center;
}
.mod-row-domain {
  margin-bottom: 8px;
  flex-wrap: nowrap; /* keep Vehicle · Home · Commercial on one line in narrow drawer */
  gap: 6px;
}
.mod-row-domain .mod-gap {
  width: 6px;
  flex: 0 0 6px;
}
.mod-row-domain .domain-pill {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 6px;
  font-size: 10.5px;
}
.mod-row-sub { margin-bottom: 12px; min-height: 32px; }
.mod-gap {
  width: 14px;
  flex: 0 0 14px;
  height: 1px;
}
.mod-pill {
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a1810;
  color: #a3b8aa;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.mod-pill.hidden { display: none; }
.mod-pill.active {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%) !important;
  border-color: #ffe28a !important;
  color: #0d1f14 !important;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(138, 98, 8, 0.4),
    0 4px 14px rgba(229, 184, 66, 0.35) !important;
  transform: translateY(-1px);
}
#calc-panel .mod-pill.active {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%) !important;
  border-color: #ffe28a !important;
  color: #0d1f14 !important;
}
.domain-pill {
  min-width: 0;
  text-align: center;
}
.mod-pill .wip-tag {
  font-size: 9px; font-weight: 600; opacity: 0.85; margin-left: 3px;
}
.wip-panel {
  display: none;
  background: var(--panel);
  border: 1px dashed var(--border-dim);
  border-radius: var(--r-box);
  padding: 16px 14px;
  margin-top: 8px;
}
.wip-panel.visible { display: block; }
.wip-panel h3 {
  font-size: 14px; color: var(--accent); margin-bottom: 6px; font-weight: 700;
}
.wip-panel p {
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
/* Global hide — any panel/control with class "hidden" stays off */
.hidden { display: none !important; }

#vehicle-controls { display: block; }
#calc-journey { display: block; }
#calc-ev { display: block; }
#calc-lpg { display: block; }
#calc-gas { display: block; }
#calc-solid { display: block; }
#calc-oil { display: block; }
#calc-red { display: block; }

.solid-type-pill,
.solid-qty-preset {
  padding: 5px 9px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-dim);
  background: var(--panel-2);
  color: var(--muted);
}
.solid-type-pill.active,
.solid-qty-preset.active {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.solid-unit-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-dim);
  border-radius: var(--r-box);
  color: var(--text);
  padding: 8px;
  font-size: 14px;
}

.gas-type-pill,
.gas-mode-pill,
.gas-size-preset {
  padding: 5px 9px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-dim);
  background: var(--panel-2);
  color: var(--muted);
}
.gas-type-pill.active,
.gas-mode-pill.active,
.gas-size-preset.active {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Shared size/rate chips (Gas / Solid calc still use these) */
.ev-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px;
}
.ev-preset {
  padding: 5px 9px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-dim);
  background: var(--panel-2);
  color: var(--muted);
}
.ev-preset.active {
  background: var(--gold-grad);
  border-color: var(--accent);
  color: #01160a;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* EV adjustable rates — name pill + value box (match mod-pill / calc inputs) */
.ev-rate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 10px 0 8px;
  align-items: center;
}
.ev-rate-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
/* Same language as .mod-pill */
.ev-rate-name {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border-gold-soft);
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.ev-rate-row.active .ev-rate-name {
  background: var(--gold-grad) !important;
  border-color: var(--accent) !important;
  color: #01160a !important;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
/* Value chip container — sits beside the name, not a second pill */
.ev-rate-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
}
/* Match .calc-box / Liquid field inputs (box, not pill) */
.calc-box .ev-rate-input,
#calc-panel .ev-rate-input,
.ev-rate-input {
  width: 3.4em !important;
  min-width: 3.4em;
  max-width: 4em;
  min-height: 36px !important;
  height: 36px;
  border: 1px solid var(--border-gold-soft) !important;
  border-radius: var(--r-box) !important;
  background: var(--input-bg) !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 14px !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 6px 4px !important;
  margin: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.ev-rate-input::-webkit-outer-spin-button,
.ev-rate-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc-box .ev-rate-input:focus,
#calc-panel .ev-rate-input:focus,
.ev-rate-input:focus {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25) !important;
}
.ev-rate-unit {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

/* EV list controls */
#ev-controls { display: block; }
#ev-controls.hidden { display: none; }
.ev-intro {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.4;
}
.btn-add-ev {
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--r-box);
  border: 1px solid var(--accent);
  background: var(--panel-2);
  color: var(--accent-bright);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(243, 229, 171, 0.08);
}
.btn-add-ev:active {
  background: var(--gold-grad);
  color: #01160a;
}

.map-marker-ev {
  color: #c084fc;
  border-color: #c084fc;
  background: linear-gradient(145deg, #1a0f24 0%, #0c0812 100%);
}
.map-marker-ev.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(168, 85, 247, 0.4),
    0 0 12px rgba(132, 204, 22, 0.35);
}
.map-marker-add {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

.station-card-ev .brand { color: #c084fc; }

/* EV add panel */
/* Community add panels — same floating card language as liquid #detail */
#ev-add-panel,
#gas-add-panel,
#solid-add-panel,
#lpg-add-panel,
#oil-add-panel,
#red-add-panel {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-total) + 12px);
  max-width: 420px;
  margin: 0 auto;
  max-height: min(70vh, calc(100dvh - var(--nav-total) - 24px));
  overflow-y: auto;
  background: rgba(5, 13, 8, 0.94);
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--r-box);
  z-index: 40;
  padding: 16px 14px 16px;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 -12px 40px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(243, 229, 171, 0.08);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #1a2e22;
}
#ev-add-panel.hidden,
#gas-add-panel.hidden,
#solid-add-panel.hidden,
#lpg-add-panel.hidden,
#oil-add-panel.hidden,
#red-add-panel.hidden { display: none; }
.ev-add-inner { max-width: 100%; margin: 0 auto; }
.ev-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ev-add-header h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
@media (max-width: 640px) {
  #ev-add-panel,
  #gas-add-panel,
  #solid-add-panel,
  #lpg-add-panel,
  #oil-add-panel,
  #red-add-panel {
    left: 8px;
    right: 8px;
    bottom: calc(var(--nav-total) + 8px);
    padding: 14px 12px 16px;
  }
}
.ev-add-banner {
  font-size: 11px;
  color: #c4a035;
  margin-bottom: 10px;
}
.ev-add-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.35;
}
.ev-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
/* Match sort-pill / loc-btn: recessed idle, raised gold when selected */
.ev-conn-pill,
.ev-access-pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a1810;
  color: #a3b8aa;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.ev-conn-pill:active,
.ev-access-pill:active {
  transform: scale(0.97);
}
.ev-conn-pill.active,
.ev-access-pill.active {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%);
  border-color: #ffe28a;
  color: #0d1f14;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(138, 98, 8, 0.4),
    0 4px 14px rgba(229, 184, 66, 0.35);
  transform: translateY(-1px);
}
/* Shared field styles for all community add panels */
#ev-add-panel .field,
#gas-add-panel .field,
#solid-add-panel .field,
#lpg-add-panel .field,
#oil-add-panel .field,
#red-add-panel .field {
  margin-bottom: 8px;
}
#ev-add-panel .field label,
#gas-add-panel .field label,
#solid-add-panel .field label,
#lpg-add-panel .field label,
#oil-add-panel .field label,
#red-add-panel .field label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 2px;
}
#ev-add-panel .field input,
#ev-add-panel .field textarea,
#gas-add-panel .field input,
#gas-add-panel .field textarea,
#solid-add-panel .field input,
#solid-add-panel .field textarea,
#lpg-add-panel .field input,
#lpg-add-panel .field textarea,
#oil-add-panel .field input,
#oil-add-panel .field textarea,
#red-add-panel .field input,
#red-add-panel .field textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--border-dim);
  border-radius: var(--r-box);
  color: var(--text);
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
#ev-add-panel .field input:focus,
#ev-add-panel .field textarea:focus,
#gas-add-panel .field input:focus,
#gas-add-panel .field textarea:focus,
#solid-add-panel .field input:focus,
#solid-add-panel .field textarea:focus,
#lpg-add-panel .field input:focus,
#lpg-add-panel .field textarea:focus,
#oil-add-panel .field input:focus,
#oil-add-panel .field textarea:focus,
#red-add-panel .field input:focus,
#red-add-panel .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.22);
}
/* Match liquid report form actions on community add panels */
#ev-add-panel .up-actions,
#gas-add-panel .up-actions,
#solid-add-panel .up-actions,
#lpg-add-panel .up-actions,
#oil-add-panel .up-actions,
#red-add-panel .up-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
#ev-add-panel .up-actions button,
#gas-add-panel .up-actions button,
#solid-add-panel .up-actions button,
#lpg-add-panel .up-actions button,
#oil-add-panel .up-actions button,
#red-add-panel .up-actions button {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
#ev-add-panel .up-actions button:active,
#gas-add-panel .up-actions button:active,
#solid-add-panel .up-actions button:active,
#lpg-add-panel .up-actions button:active,
#oil-add-panel .up-actions button:active,
#red-add-panel .up-actions button:active {
  transform: scale(0.97);
}
#ev-add-panel .btn-save,
#gas-add-panel .btn-save,
#solid-add-panel .btn-save,
#lpg-add-panel .btn-save,
#oil-add-panel .btn-save,
#red-add-panel .btn-save {
  border: 1px solid #ffe28a;
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%);
  color: #0d1f14;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(138, 98, 8, 0.4),
    0 4px 14px rgba(229, 184, 66, 0.35);
}
#ev-add-panel .btn-cancel,
#gas-add-panel .btn-cancel,
#solid-add-panel .btn-cancel,
#lpg-add-panel .btn-cancel,
#oil-add-panel .btn-cancel,
#red-add-panel .btn-cancel {
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: #0a1810;
  color: #a3b8aa;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
}
#ev-add-panel .up-status,
#gas-add-panel .up-status,
#solid-add-panel .up-status,
#lpg-add-panel .up-status,
#oil-add-panel .up-status,
#red-add-panel .up-status {
  font-size: 12px;
  margin: 6px 0;
  min-height: 1.2em;
}
#ev-add-panel .up-status.ok,
#gas-add-panel .up-status.ok,
#solid-add-panel .up-status.ok,
#lpg-add-panel .up-status.ok,
#oil-add-panel .up-status.ok,
#red-add-panel .up-status.ok { color: #4ade80; }
#ev-add-panel .up-status.err,
#gas-add-panel .up-status.err,
#solid-add-panel .up-status.err,
#lpg-add-panel .up-status.err,
#oil-add-panel .up-status.err,
#red-add-panel .up-status.err { color: #f87171; }

/* Close (X) — same as liquid detail card (all community add panels) */
#ev-add-panel .detail-x,
#gas-add-panel .detail-x,
#solid-add-panel .detail-x,
#lpg-add-panel .detail-x,
#oil-add-panel .detail-x,
#red-add-panel .detail-x {
  width: 32px;
  height: 32px;
  border-radius: var(--r-box);
  border: 1px solid var(--border-dim);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
#ev-add-panel .detail-x:hover,
#gas-add-panel .detail-x:hover,
#solid-add-panel .detail-x:hover,
#lpg-add-panel .detail-x:hover,
#oil-add-panel .detail-x:hover,
#red-add-panel .detail-x:hover {
  color: var(--text);
  border-color: var(--border);
}

/* Postcode row inside add panels — match field inputs (all community modules) */
#ev-add-panel .loc-row input,
#gas-add-panel .loc-row input,
#solid-add-panel .loc-row input,
#lpg-add-panel .loc-row input,
#oil-add-panel .loc-row input,
#red-add-panel .loc-row input {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  background: var(--input-bg);
  border: 1px solid var(--border-dim);
  border-radius: var(--r-box);
  color: var(--text);
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  /* Kill native system chrome (esp. Windows) */
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
#ev-add-panel .loc-row input:focus,
#gas-add-panel .loc-row input:focus,
#solid-add-panel .loc-row input:focus,
#lpg-add-panel .loc-row input:focus,
#oil-add-panel .loc-row input:focus,
#red-add-panel .loc-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.22);
}

/* Pair fields (power/price, size/price) keep equal columns */
#ev-add-panel .calc-fields,
#gas-add-panel .calc-fields,
#solid-add-panel .calc-fields {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
#ev-add-panel .calc-fields .field,
#gas-add-panel .calc-fields .field,
#solid-add-panel .calc-fields .field {
  flex: 1;
  min-width: 0;
}

/* Gas / Solid / LPG / Oil / Red list controls */
#gas-controls, #solid-controls, #lpg-controls, #oil-controls, #red-controls { display: block; }
#gas-controls.hidden, #solid-controls.hidden, #lpg-controls.hidden, #oil-controls.hidden, #red-controls.hidden { display: none; }

.map-marker-lpg {
  color: #a78bfa;
  border-color: #a78bfa;
  background: linear-gradient(145deg, #12101a 0%, #0a0812 100%);
}
.map-marker-lpg.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.4),
    0 0 12px rgba(167, 139, 250, 0.3);
}
.station-card-lpg .brand { color: #a78bfa; }

.map-marker-oil {
  color: #fb923c;
  border-color: #fb923c;
  background: linear-gradient(145deg, #1a1008 0%, #0c0804 100%);
}
.map-marker-oil.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(234, 88, 12, 0.4),
    0 0 12px rgba(251, 146, 60, 0.3);
}
.station-card-oil .brand { color: #fb923c; }

/* Red diesel — deep red, distinct from heating oil amber */
.map-marker-red {
  color: #f87171;
  border-color: #f87171;
  background: linear-gradient(145deg, #1a0808 0%, #0c0404 100%);
}
.map-marker-red.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(220, 38, 38, 0.4),
    0 0 12px rgba(248, 113, 113, 0.3);
}
.station-card-red .brand { color: #f87171; }

.map-marker-gas {
  color: #5eead4;
  border-color: #5eead4;
  background: linear-gradient(145deg, #0a1a18 0%, #051210 100%);
}
.map-marker-gas.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(13, 148, 136, 0.4),
    0 0 12px rgba(94, 234, 212, 0.3);
}
.station-card-gas .brand { color: #5eead4; }

.map-marker-solid {
  color: #fbbf24;
  border-color: #fbbf24;
  background: linear-gradient(145deg, #1a1408 0%, #0c0a04 100%);
}
.map-marker-solid.selected {
  background: var(--gold-grad);
  border-color: #01160a;
  color: #01160a;
  box-shadow:
    0 0 0 3px rgba(202, 138, 4, 0.4),
    0 0 12px rgba(251, 191, 36, 0.3);
}
.station-card-solid .brand { color: #fbbf24; }

/* Match sort-pill / loc-btn language on community add type pills */
.gas-add-type-pill,
.solid-add-type-pill {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a1810;
  color: #a3b8aa;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.gas-add-type-pill:active,
.solid-add-type-pill:active {
  transform: scale(0.97);
}
.gas-add-type-pill.active,
.solid-add-type-pill.active {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%);
  border-color: #ffe28a;
  color: #0d1f14;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.65),
    inset 0 -2px 3px rgba(138, 98, 8, 0.4),
    0 4px 14px rgba(229, 184, 66, 0.35);
  transform: translateY(-1px);
}


/* Number fields inside community add panels (price etc) */
#ev-add-panel .calc-fields input,
#lpg-add-panel .calc-fields input,
#oil-add-panel .calc-fields input,
#red-add-panel .calc-fields input,
#gas-add-panel .calc-fields input,
#solid-add-panel .calc-fields input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-box);
  border: 1px solid var(--border-dim);
  background: var(--input-bg);
  color: var(--text);
  font-size: 16px;
}
#ev-add-panel .calc-fields input:focus,
#lpg-add-panel .calc-fields input:focus,
#oil-add-panel .calc-fields input:focus,
#red-add-panel .calc-fields input:focus,
#gas-add-panel .calc-fields input:focus,
#solid-add-panel .calc-fields input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/*
 * Netlify Free plan injects a "Powered by Netlify" badge as #nl-badge-frame
 * (isolated iframe — we can't style inside it, but we CAN move the iframe).
 * Lift it above the bottom nav so it doesn't cover List / Calc / About.
 * Turn off permanently (if plan allows): Project configuration → General → Powered by Netlify badge.
 */
#nl-badge-frame,
#nl-hud-frame,
iframe[id^="nl-"] {
  bottom: calc(var(--nav-total, 64px) + 12px) !important;
  top: auto !important;
}

/* List-view fuel pills replaced by track */
#vehicle-fuel-type #fuel-pills,
#vehicle-fuel-type > .fuel-groups {
  display: none !important;
}

/* ── Liquid fuel track (canvas) ───────────────────────────────── */
.fuel-track-card {
  border-radius: 14px;
  padding: 10px 10px 8px;
  background: linear-gradient(180deg, rgba(20, 39, 28, 0.55) 0%, rgba(12, 24, 17, 0.7) 100%);
  border: 1px solid rgba(229, 184, 75, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
}
.fuel-track-header {
  display: grid;
  /* Equal side columns so PETROL / chevrons sit on the true horizontal centre */
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.fuel-track-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold, #e5b84b);
  justify-self: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fuel-track-center {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
  grid-column: 2;
}
.fuel-track-chevron {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9eb3a6;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: color 0.15s ease, transform 0.1s ease;
}
.fuel-track-chevron:hover { color: #fff; }
.fuel-track-chevron:active { transform: scale(0.9); }
.fuel-track-group {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 9999px;
  flex-shrink: 0;
  min-width: 64px;
  text-align: center;
  color: #34d97e;
  background: rgba(31, 184, 101, 0.14);
  border: 1px solid rgba(52, 217, 126, 0.28);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.fuel-track-fullname {
  font-size: 11px;
  font-weight: 500;
  color: #9eb3a6;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  justify-self: end;
  max-width: 120px;
  text-align: right;
}
.fuel-track-housing {
  position: relative;
  width: 100%;
  height: 50px;
  border-radius: 11px;
  background: #050c08;
  border: 1.5px solid rgba(229, 184, 75, 0.34);
  box-shadow:
    inset 0 4px 12px rgba(0, 0, 0, 0.9),
    inset 0 -4px 12px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.fuel-track-housing canvas,
#fuel-track-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  /* Horizontal wheel — claim the gesture; do not let the page pan/scroll */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.fuel-track-housing canvas:active,
#fuel-track-canvas:active { cursor: grabbing; }
#calc-fuel-pills {
  display: none !important;
}
.fuel-track-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.fuel-track-dot {
  height: 6px;
  border-radius: 9999px;
  transition: width 0.2s ease, background 0.2s ease;
  background: rgba(255, 255, 255, 0.22);
  width: 4.5px;
}
.fuel-track-dot.is-active {
  width: 12px;
  background: var(--gold, #e5b84b);
}
@keyframes fuelGroupFlash {
  0% { transform: scale(0.95); opacity: 0.65; }
  100% { transform: scale(1); opacity: 1; }
}
.fuel-group-flash { animation: fuelGroupFlash 0.2s ease-out forwards; }


/* Nested fuel track / module head inside Category card — no second frame */
.list-ticket .fuel-track-card {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 8px 0 0;
  margin: 8px 0 0;
  border-radius: 0;
  border-top: 1px solid rgba(229, 184, 75, 0.12);
}
.module-head {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(229, 184, 75, 0.12);
}
.module-head .ev-intro { margin-top: 0; }
.module-head .btn-add-ev { margin-bottom: 0; }
.module-loc-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(229, 184, 75, 0.12);
}
.module-loc-block .section-label-row:first-child .section-label {
  margin-top: 0;
}


/* Community add panels — light section cards (match list tickets) */
.add-card {
  background: linear-gradient(180deg, rgba(20, 39, 28, 0.55) 0%, rgba(12, 24, 17, 0.7) 100%);
  border: 1px solid rgba(229, 184, 75, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.2);
}
.add-card .section-label { margin-top: 0; }
.add-card .ev-add-hint { margin: 4px 0 8px; }
.add-card .field { margin-bottom: 8px; }
.add-card .field:last-child { margin-bottom: 0; }


/* Share QR mode pills (App / WhatsApp) */
.about-qr-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}
.about-qr-mode-row .about-qr-mode.active {
  background: linear-gradient(180deg, #f3cd63 0%, #d4a32c 100%) !important;
  border-color: #ffe28a !important;
  color: #0d1f14 !important;
}
.about-social-facebook:not(.is-missing) { color: #8ab4f8; }
.about-social-whatsapp:not(.is-missing) { color: #6ee7a8; }


/* Fuel cost anatomy */
.anatomy-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0 6px;
  border: 1px solid rgba(229, 184, 75, 0.25);
}
.anatomy-seg { min-width: 2px; }
.anatomy-duty { background: #d4a32c; }
.anatomy-product { background: #2a6b45; }
.anatomy-vat { background: #3d8fd1; }
.anatomy-margin { background: #6b7280; }
.anatomy-legend {
  font-size: 10px !important;
  letter-spacing: 0.02em;
}

.about-nav-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.about-nav-modes .nav-mode-pill {
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
}

.anatomy-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.anatomy-li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
}
.anatomy-name { font-weight: 800; }
.anatomy-val { font-variant-numeric: tabular-nums; }
.anatomy-note {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.75;
}
.anatomy-li-duty,
.anatomy-li-duty .anatomy-name { color: #e5b84b; }
.anatomy-li-product,
.anatomy-li-product .anatomy-name { color: #4ade80; }
.anatomy-li-vat,
.anatomy-li-vat .anatomy-name { color: #60a5fa; }
.anatomy-li-margin,
.anatomy-li-margin .anatomy-name { color: #9ca3af; }
/* Match bar segment colours */
.anatomy-duty { background: #e5b84b; }
.anatomy-product { background: #2a6b45; }
.anatomy-vat { background: #3d8fd1; }
.anatomy-margin { background: #6b7280; }
