:root,
[data-theme="dark"] {
  --bg: #000000;
  --surface: #0d0d0d;
  --surface-2: #141414;
  --surface-3: #1c1c1c;
  --border: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.35);
  --accent: #ff8000;
  --accent-2: #ffb347;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #efefed;
  --surface-3: #e5e5e3;
  --border: rgba(0, 0, 0, 0.08);
  --text: #0a0a0a;
  --muted: rgba(0, 0, 0, 0.45);
  --accent: #e06e00;
  --accent-2: #ff8000;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  color: var(--text);
  font-family: 'Sora', sans-serif;
  background: var(--bg);
}

button {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.is-hidden {
  display: none !important;
}

.landing {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(255, 128, 0, 0.12), transparent);
}

.landing-mark {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.landing h1 {
  max-width: 800px;
  margin: 0;
  font-family: 'DM Sans', 'Sora', sans-serif;
  font-size: clamp(3.8rem, 12vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: -0.05em;
  font-weight: 700;
  text-transform: none;
}

.headline-accent {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  text-shadow:
    0 0 80px rgba(255, 128, 0, 0.6),
    0 0 30px rgba(255, 128, 0, 0.9);
}

.headline-underline {
  text-decoration-line: underline;
  text-decoration-thickness: 0.055em;
  text-underline-offset: 0.16em;
  text-decoration-color: rgba(255, 128, 0, 0.6);
}

/* ── Landing location search ── */
.location-search-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.location-or {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.location-search-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 4px 4px 16px;
  transition: border-color 0.18s ease;
}

.location-search-row:focus-within {
  border-color: rgba(255, 128, 0, 0.35);
}

.location-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  width: 220px;
}

.location-input::placeholder { color: var(--muted); }

.location-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #000;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.18s ease;
}

.location-search-btn:hover { opacity: 0.85; }

/* ── Topbar location row ── */
.topbar-location-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.location-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.location-edit-icon:hover {
  opacity: 1;
  color: var(--accent);
}

/* ── In-app location bar (slide-down) ── */
.location-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.location-bar-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.18s ease;
}

.location-bar-input:focus {
  border-color: rgba(255, 128, 0, 0.4);
}

.location-bar-input::placeholder { color: var(--muted); }

.location-bar-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s ease;
}

.location-bar-btn:hover { opacity: 0.85; }
.location-bar-btn:disabled { opacity: 0.5; cursor: default; }

.location-bar-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 50%;
  line-height: 1;
  transition: color 0.15s ease;
}

.location-bar-close:hover { color: var(--text); }

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

.landing-legal-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 999px;
}

.landing-legal-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.landing-legal-link:hover {
  color: var(--muted);
}

/* ── Theme & language toggle buttons ── */
.landing-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  z-index: 10;
}

.topbar-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ctrl-btn:hover {
  color: var(--text);
  border-color: var(--muted);
  background: var(--surface);
}

.ctrl-btn svg {
  pointer-events: none;
}

/* On the landing page, blend into the dark/light background */
.landing-controls .ctrl-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .landing-controls .ctrl-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

.slider-hint {
  margin: 2px 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.landing-copy {
  max-width: 400px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.charge-button,
.mode-chip,
.range-chip,
.back-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, outline-color 0.22s ease;
}

.charge-button {
  position: relative;
  overflow: hidden;
  min-width: 200px;
  min-height: 58px;
  padding: 0 36px;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  outline: 1.5px solid rgba(255, 128, 0, 0.35);
  outline-offset: 3px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.charge-button span {
  position: relative;
  z-index: 1;
  color: #000000;
  text-shadow: none;
  transition: none;
}

.charge-button:hover span {
  color: #000000;
  text-shadow: none;
}

.charge-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    #00ff87 0px,
    #00ff87 14px,
    #00e87a 14px,
    #00e87a 16px
  );
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: inherit;
  z-index: 0;
}

.charge-button:hover::before {
  transform: scaleX(1);
}

.charge-button:hover {
  transform: translateY(-3px);
  outline-color: rgba(255, 128, 0, 0.9);
  box-shadow:
    0 0 12px rgba(255, 128, 0, 0.6),
    0 0 40px rgba(255, 128, 0, 0.35),
    0 0 80px rgba(255, 128, 0, 0.18),
    0 12px 40px rgba(0, 0, 0, 0.5);
}

.mode-chip:hover,
.range-chip:hover,
.back-button:hover {
  transform: translateY(-1px);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 72px; /* room for bottom nav */
}

.tab-panel {
  padding: 0 16px;
}

.tab-panel.is-hidden {
  display: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 0;
  margin-bottom: 16px;
}

.back-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.topbar-copy {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
  flex: 1;
}

.topbar-copy strong {
  font-size: 0.95rem;
}

.topbar-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.status-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.mode-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-chip {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.mode-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}

.range-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.range-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.range-chip.is-active {
  background: var(--surface-3);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 16px;
  height: calc(100vh - 160px);
  max-height: 600px;
}

.result-panel,
.map-panel,
.featured-card,
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.result-card {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.result-card:hover {
  border-color: rgba(255, 128, 0, 0.3);
  transform: translateY(-1px);
}

.result-card:active {
  transform: translateY(0);
}

.result-card--top {
  border-color: rgba(255, 128, 0, 0.35);
}

.result-card--selected {
  border-color: rgba(255, 128, 0, 0.8) !important;
  box-shadow:
    0 0 0 1px rgba(255, 128, 0, 0.2),
    0 0 20px rgba(255, 128, 0, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.4);
  background: var(--surface-2);
}

.result-panel {
  border-radius: 28px;
  padding: 14px;
  overflow: hidden;
  display: grid;
  gap: 12px;
}

.featured-card,
.result-card {
  border-radius: 22px;
}

.featured-card {
  padding: 20px;
  display: grid;
  gap: 12px;
  border-color: rgba(255, 128, 0, 0.4);
  box-shadow:
    0 0 0 1px rgba(255, 128, 0, 0.15),
    0 0 24px rgba(255, 128, 0, 0.18),
    0 0 60px rgba(255, 128, 0, 0.08);
}

.marker-top {
  filter: drop-shadow(0 0 6px rgba(255, 128, 0, 0.9)) drop-shadow(0 0 16px rgba(255, 128, 0, 0.5));
}

.featured-label {
  color: var(--accent);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.featured-card h2,
.result-card h3,
.empty-state h2 {
  margin: 0;
  line-height: 1.06;
}

.featured-card h2 {
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.featured-meta,
.result-meta,
.featured-card p,
.result-card p,
.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.featured-session {
  text-align: right;
  flex-shrink: 0;
}

.featured-session span {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
}

.featured-price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.featured-breakdown {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.breakdown-warn {
  color: #e05a00;
}

[data-theme="light"] .breakdown-warn {
  color: #c04a00;
}

.featured-pass-hint {
  background: rgba(255, 128, 0, 0.06);
  border: 1px solid rgba(255, 128, 0, 0.18);
  border-radius: 14px;
  padding: 10px 14px;
  display: grid;
  gap: 4px;
}

.featured-pass-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.featured-pass-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.featured-pass-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.featured-pass-cost {
  font-size: 0.88rem;
  color: var(--muted);
}

.featured-pass-save {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
}

/* ── Power filter & filter bar ── */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.power-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.power-chip {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.power-chip.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ── Station count ── */
.station-count {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 2px 0;
  letter-spacing: 0.03em;
}

/* ── Onboarding hint ── */
.onboarding-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 128, 0, 0.06);
  border: 1px solid rgba(255, 128, 0, 0.18);
  border-radius: 12px;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.onboarding-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}

/* ── Vehicle profile section (in Passen tab) ── */
.vehicle-profile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-bottom: 4px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 100px;
  flex-shrink: 0;
}

.profile-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-chip {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.profile-chip.is-active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ── Log session button ── */
.log-session-btn {
  background: transparent;
  border: 1px solid rgba(255, 128, 0, 0.3);
  color: var(--accent);
  border-radius: 999px;
  padding: 0 14px;
  min-height: 36px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.log-session-btn:hover { background: rgba(255, 128, 0, 0.08); }
.log-session-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Charging history ── */
.history-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.history-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-meta {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.history-cost {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.history-total {
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.history-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
}

/* ── B2B section ── */
.b2b-section {
  margin-top: 24px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.b2b-section h3 {
  margin: 0 0 8px;
  color: var(--accent);
}

.b2b-section p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

/* Pass hint on station cards */
.passes-disclaimer {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin: 0 0 12px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.pass-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 128, 0, 0.05);
  border: 1px solid rgba(255, 128, 0, 0.15);
  border-radius: 10px;
  font-size: 0.78rem;
}

.pass-hint-label {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 100%;
}

.pass-hint-name {
  font-weight: 600;
  color: var(--text);
}

.pass-hint-cost {
  color: var(--muted);
}

.featured-actions,
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge,
.navigate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
}

.badge {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.badge-highlight {
  background: rgba(255, 128, 0, 0.1);
  color: var(--accent);
  border-color: rgba(255, 128, 0, 0.2);
}

.badge-busy {
  background: rgba(180, 130, 0, 0.1);
  color: #b38600;
  border-color: rgba(180, 130, 0, 0.25);
}

.badge-warning {
  background: rgba(255, 60, 60, 0.08);
  color: #ff6060;
  border-color: rgba(255, 60, 60, 0.2);
}

.navigate-link {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.map-tooltip.leaflet-tooltip {
  background: var(--surface);
  border: 1px solid rgba(255,128,0,0.4);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.map-tooltip.leaflet-tooltip::before {
  border-top-color: rgba(255,128,0,0.4);
}

/* ── Best station: badge + location ring ── */
.map-best-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}

.map-best-badge {
  display: flex;
  align-items: baseline;
  gap: 2px;
  background: #ff8000;
  color: #000;
  padding: 5px 12px;
  border-radius: 999px;
  border: 2px solid #ffd700;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  white-space: nowrap;
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, 0.25),
    0 4px 16px rgba(255, 128, 0, 0.5);
  transition: transform 0.18s ease;
}

.map-best-badge:hover { transform: scale(1.06); }

.map-best-price { font-size: 0.88rem; }
.map-best-unit  { font-size: 0.62rem; opacity: 0.7; font-weight: 600; }

/* Exact location dot with expanding pulse rings */
.map-best-ring {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff8000;
  border: 2.5px solid #ffd700;
  flex-shrink: 0;
  animation: ring-pulse 2s ease-out infinite;
}

.map-best-ring.is-selected {
  animation: ring-pulse-fast 1s ease-out infinite;
}

@keyframes ring-pulse {
  0% {
    box-shadow:
      0 0 0 0   rgba(255, 128, 0, 0.7),
      0 0 0 0   rgba(255, 215, 0, 0.45);
  }
  70% {
    box-shadow:
      0 0 0 14px rgba(255, 128, 0, 0),
      0 0 0 22px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow:
      0 0 0 0   rgba(255, 128, 0, 0),
      0 0 0 0   rgba(255, 215, 0, 0);
  }
}

@keyframes ring-pulse-fast {
  0% {
    box-shadow:
      0 0 0 0   rgba(255, 128, 0, 0.9),
      0 0 0 0   rgba(255, 215, 0, 0.6);
  }
  70% {
    box-shadow:
      0 0 0 20px rgba(255, 128, 0, 0),
      0 0 0 30px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow:
      0 0 0 0   rgba(255, 128, 0, 0),
      0 0 0 0   rgba(255, 215, 0, 0);
  }
}

/* ── Other station markers: always-visible price pills (Option A) ── */
.map-pill-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 52px;
  justify-content: flex-end;
  gap: 4px;
  cursor: pointer;
  overflow: visible;
}

.map-pill {
  background: rgba(0, 0, 0, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 3px 8px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: border-color 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.map-pill-price { font-size: 0.72rem; }

.map-pill-detail {
  display: none;
  font-size: 0.62rem;
  font-weight: 400;
  opacity: 0.82;
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-pill-wrap.is-selected .map-pill {
  border-color: #ff8000;
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 128, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.map-pill-wrap.is-selected .map-pill-detail {
  display: block;
}

.map-dot-area {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.map-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 128, 0, 0.6);
  border: 2px solid rgba(0, 0, 0, 0.45);
  transition: width 0.2s ease, height 0.2s ease, background 0.2s ease;
}

.map-dot.is-busy { background: rgba(100, 100, 100, 0.6); }

.map-pill-wrap.is-selected .map-dot {
  width: 16px;
  height: 16px;
  background: #ff8000;
  border: 2.5px solid #333;
  animation: dot-pulse 1.4s ease-out infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0    rgba(255, 128, 0, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(255, 128, 0, 0); }
  100% { box-shadow: 0 0 0 0    rgba(255, 128, 0, 0); }
}

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

.result-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-rank {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.75rem;
}

.result-value {
  text-align: right;
  white-space: nowrap;
}

.result-value strong {
  display: block;
  font-size: 1.05rem;
}

.result-value span {
  color: var(--muted);
  font-size: 0.78rem;
}

.map-panel {
  border-radius: 32px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.leaflet-control-attribution {
  font-family: 'Sora', sans-serif;
}

.leaflet-popup-content-wrapper {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.leaflet-popup-tip {
  background: var(--surface-2);
}

.empty-state {
  padding: 12px;
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.55; }
}

.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

.skeleton-line {
  height: 13px;
  border-radius: 6px;
  background: var(--surface-3);
  animation: pulse 1.5s ease infinite;
}

.offline-banner {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: 0.04em;
}

/* ── Update toast ── */
.update-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 10px 16px 10px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  font-size: 0.82rem;
  white-space: nowrap;
}

.update-toast button {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* ── Bottom nav ────────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.18s ease;
}

.nav-tab.is-active {
  color: var(--accent);
}

.nav-tab svg {
  transition: stroke 0.18s ease;
}

/* ── Compare pass screen ───────────────────────────── */

.compare-hero {
  max-width: 680px;
  margin: 32px auto 40px;
  text-align: center;
}

.compare-hero h2 {
  margin: 0 0 12px;
  font-family: 'DM Sans', 'Sora', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.compare-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.compare-inputs {
  max-width: 560px;
  margin: 0 auto 40px;
  display: grid;
  gap: 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.kwh-group {
  display: grid;
  gap: 12px;
}

.kwh-label-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.kwh-label-row > span {
  color: var(--muted);
  font-size: 0.88rem;
  padding-top: 2px;
}

.kwh-label-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.kwh-label-row strong {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
}

.kwh-detail {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.kwh-slider {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
}

.kwh-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.5);
  cursor: pointer;
}

.kwh-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 128, 0, 0.5);
  cursor: pointer;
}

.pass-list {
  max-width: 560px;
  margin: 0 auto 48px;
  display: grid;
  gap: 12px;
}

.pass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  gap: 14px;
  transition: border-color 0.18s ease;
}

.pass-card:first-child {
  border-color: rgba(255, 128, 0, 0.35);
  background: var(--surface-2);
}

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

.pass-rank {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.pass-card:first-child .pass-rank {
  color: var(--accent);
}

.pass-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pass-provider {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.pass-total {
  text-align: right;
  white-space: nowrap;
}

.pass-total strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.pass-total span {
  color: var(--muted);
  font-size: 0.75rem;
}

.pass-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pass-note {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

.pass-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.18s ease, border-color 0.18s ease;
  font-family: inherit;
  cursor: pointer;
}

.pass-card:first-child .pass-cta {
  background: var(--accent);
  color: #000;
  border-color: transparent;
}

.pass-cta:hover {
  border-color: rgba(255, 128, 0, 0.4);
  color: var(--accent);
}

.pass-card:first-child .pass-cta:hover {
  background: #ffaa33;
  color: #000;
}

/* ── Privacy page ──────────────────────────────────── */

.privacy-page {
  max-width: 640px;
  margin: 32px auto 64px;
  padding: 0 4px;
  line-height: 1.8;
}

.privacy-page h2 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin: 0 0 4px;
}

.privacy-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.feedback-button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background: rgba(255,128,0,0.1);
  border: 1px solid rgba(255,128,0,0.2);
  color: var(--accent);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.feedback-button:hover {
  background: rgba(255,128,0,0.18);
}

.privacy-date {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0 0 32px;
}

.privacy-page h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 28px 0 8px;
}

.privacy-page p,
.privacy-page ul {
  margin: 0 0 12px;
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}

.privacy-page ul {
  padding-left: 20px;
}

.privacy-page a {
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 980px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  #map {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .landing h1 {
    font-size: 3.6rem;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-copy {
    order: 3;
    width: 100%;
  }

  .mode-switch {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .range-switch {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .result-top {
    flex-direction: column;
  }

  .result-value {
    text-align: left;
  }
}
