:root {
  color-scheme: light dark;
  --bg: #f7faf9;
  --surface: #ffffff;
  --surface-2: #f1f6f5;
  --surface-3: #e9f2f0;
  --text: #13201f;
  --muted: #667674;
  --muted-2: #8b9896;
  --line: #dbe7e4;
  --teal: #0f9f90;
  --teal-dark: #08766c;
  --teal-soft: #e7f8f5;
  --green: #25b86a;
  --yellow: #d99a13;
  --red: #dc4f4f;
  --gray: #8b9896;
  --blue: #2878f0;
  --shadow-sm: 0 8px 24px rgba(22, 63, 58, .08);
  --shadow: 0 22px 70px rgba(22, 63, 58, .12);
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --header-h: 66px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1413;
    --surface: #121c1a;
    --surface-2: #172321;
    --surface-3: #1c2b28;
    --text: #f1f7f5;
    --muted: #a4b5b1;
    --muted-2: #7f918d;
    --line: #263a36;
    --teal: #1ab9a6;
    --teal-dark: #76e3d6;
    --teal-soft: #173631;
    --shadow-sm: 0 8px 24px rgba(0,0,0,.22);
    --shadow: 0 24px 72px rgba(0,0,0,.34);
  }
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The main area owns all spare viewport height. The hero itself always stays
   content-sized, so search results can begin immediately below it while the
   footer still sits at the bottom of an otherwise empty landing page. */
main {
  flex: 1 0 auto;
  width: 100%;
  min-height: 0;
}

button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  background: #332b12;
  color: #fff4c4;
  padding: 9px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1500;
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.1);
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.035em;
}
.brand-logo { width: 34px; height: 34px; display: block; }
.desktop-nav { display: flex; align-items: center; gap: 4px; justify-self: center; }
.nav-link, .ghost-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.nav-link { padding: 10px 13px; border-radius: 11px; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-2); }
.header-actions { justify-self: end; }
.ghost-button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.hero {
  position: relative;
  min-height: 0;
  height: auto;
  display: grid;
  place-items: start center;
  overflow: hidden;
  padding: 10px 18px 18px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--teal-soft) 66%, transparent), transparent 46%),
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--teal) 11%, transparent), transparent 36%);
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .36; pointer-events: none; }
.hero-glow-one { width: 270px; height: 270px; background: #63e6d4; left: -100px; top: 18%; }
.hero-glow-two { width: 320px; height: 320px; background: #b7f2d1; right: -130px; bottom: 5%; }
.hero-inner { position: relative; z-index: 1; width: min(760px, 100%); text-align: center; }
.brand-mark-large { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.brand-mark-large img { width: 32px; height: 32px; }
.eyebrow, .toolbar-kicker, .account-overline {
  margin: 0;
  color: var(--teal);
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .14em;
  font-weight: 800;
}
.hero h1 {
  margin: 5px auto 0;
  max-width: 720px;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: .98;
  letter-spacing: -.065em;
  font-weight: 800;
}
.hero h1 span { color: var(--teal); }
.hero-copy { max-width: 590px; margin: 7px auto 0; color: var(--muted); font-size: clamp(12px, 1.15vw, 14px); line-height: 1.38; }
.search-shell {
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.search-input-wrap { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 0 12px; }
.search-input-wrap svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-input-wrap input { width: 100%; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 650; }
.search-input-wrap input::placeholder { color: var(--muted-2); }
.primary-button, .secondary-button, .location-button, .auth-button {
  border-radius: 13px;
  min-height: 44px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button { border: 1px solid var(--teal); background: var(--teal); color: #fff; padding: 0 24px; }
.primary-button:hover, .location-button:hover, .auth-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:active, .location-button:active, .auth-button:active, .secondary-button:active { transform: translateY(0); }
.location-button {
  margin: 8px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 176px;
  border: 1px solid var(--teal);
  background: var(--surface);
  color: var(--teal-dark);
  padding: 0 17px;
}
.location-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-vehicle { margin: 8px auto 0; display: inline-flex; align-items: center; gap: 9px; padding: 8px 10px 8px 13px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 90%, transparent); border-radius: 13px; }
.hero-vehicle label { color: var(--muted); font-size: 12px; font-weight: 800; }
.hero-vehicle select { max-width: 250px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 800; }
.privacy-hint { margin: 6px auto 0; max-width: 520px; color: var(--muted-2); font-size: 11px; line-height: 1.55; }

.results-section { padding: 12px clamp(12px, 3vw, 38px) 96px; min-height: calc(100svh - var(--header-h)); }
.results-toolbar { max-width: 1580px; margin: 0 auto 15px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.results-heading-wrap { min-width: 0; }
.results-toolbar h2, .saved-section h2 { margin: 5px 0 0; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.results-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.sort-control { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 8px 10px; }
.sort-control span { color: var(--muted); font-size: 11px; font-weight: 800; }
.sort-control select { border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 800; }
.view-toggle { display: none; align-items: center; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); }
.toggle-button { border: 0; padding: 8px 14px; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 800; }
.toggle-button.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.07); }

.filter-bar { max-width: 1580px; margin: 0 auto 14px; display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 9px; overflow-x: auto; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-control { position: relative; min-width: 145px; display: grid; gap: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 5px 15px rgba(0,0,0,.025); }
.filter-control > span:first-child { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.filter-control select { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 800; }
.switch-control { grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.switch-control > span:first-child { grid-column: 1 / -1; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch { justify-self: end; position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line); transition: .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.18); transition: .2s ease; }
.switch-control input:checked + .switch { background: var(--teal); }
.switch-control input:checked + .switch::after { transform: translateX(18px); }

.status-banner { max-width: 1580px; margin: 0 auto 13px; padding: 11px 13px; border-radius: 13px; background: var(--teal-soft); border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--line)); color: var(--teal-dark); font-size: 12px; line-height: 1.55; font-weight: 750; }
.status-banner[data-type="error"] { color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); border-color: color-mix(in srgb, var(--red) 26%, var(--line)); }
.status-banner[data-type="loading"]::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-layout {
  max-width: 1580px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(350px, .78fr) minmax(0, 1.4fr);
  gap: 13px;
  /* Keep the results and map as two independent panes. The page can still
     scroll to/from this section, but once the pointer is over the station
     list only that list scrolls. */
  height: clamp(560px, calc(100svh - 245px), 860px);
  min-height: 0;
}
.results-panel, .map-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.results-panel { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.results-meta { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 800; }
.data-source-pill { padding: 5px 8px; border-radius: 999px; background: var(--surface-2); font-size: 10px; }
.station-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--muted) 38%, transparent) transparent;
}
.station-list::-webkit-scrollbar { width: 9px; }
.station-list::-webkit-scrollbar-track { background: transparent; }
.station-list::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 30%, transparent); border: 3px solid transparent; background-clip: padding-box; border-radius: 999px; }
.station-card { position: relative; padding: 14px; border: 1px solid transparent; border-radius: 17px; transition: background .18s ease, transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.station-card + .station-card { margin-top: 4px; }
.station-card:hover, .station-card.active { background: var(--surface-2); border-color: var(--line); transform: translateY(-1px); }
.station-card.active { box-shadow: inset 3px 0 0 var(--teal); }
.station-top { display: flex; justify-content: space-between; gap: 12px; }
.station-title-row { display: flex; align-items: start; gap: 10px; min-width: 0; }
.station-title-block { min-width: 0; }
.station-name { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.station-distance { color: var(--muted); white-space: nowrap; font-size: 11px; font-weight: 800; padding-top: 2px; }
.favorite-mini { flex: 0 0 auto; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.favorite-mini svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.favorite-mini.is-favorite { color: #e76b78; background: color-mix(in srgb, #e76b78 9%, var(--surface)); }
.favorite-mini.is-favorite svg { fill: currentColor; }
.station-address { margin: 5px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.station-network { color: var(--text); font-weight: 750; }
.status-rating-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-available { color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.status-busy { color: var(--yellow); background: color-mix(in srgb, var(--yellow) 10%, var(--surface)); }
.status-offline { color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.status-unknown { color: var(--gray); background: var(--surface-2); }
.rating-mini { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.rating-mini strong { color: var(--text); }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { padding: 5px 7px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 10px; line-height: 1.2; font-weight: 800; }
.tag.highlight { color: var(--teal-dark); background: var(--teal-soft); }
.card-actions { display: grid; grid-template-columns: 1fr 1.15fr; gap: 7px; margin-top: 12px; }
.card-actions a, .card-actions button { min-height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; font-size: 11px; font-weight: 800; }
.details-button { border: 1px solid var(--line); background: transparent; color: var(--text); }
.directions-button { border: 1px solid var(--teal); background: var(--teal); color: #fff; }
.empty-state { padding: 54px 22px; text-align: center; color: var(--muted); line-height: 1.6; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--text); }
.skeleton-card { height: 180px; margin: 6px; border-radius: 16px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.map-panel { position: relative; min-height: 0; height: 100%; }
#map { width: 100%; height: 100%; min-height: 0; background: #d8e9e5; }
.map-legend { position: absolute; z-index: 600; left: 12px; bottom: 12px; max-width: calc(100% - 24px); display: flex; flex-wrap: wrap; gap: 8px 11px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); color: var(--muted); font-size: 10px; font-weight: 750; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.green { background: var(--green); }.dot.yellow { background: var(--yellow); }.dot.red { background: var(--red); }.dot.gray { background: var(--gray); }
.ev-marker { width: 42px; height: 50px; position: relative; filter: drop-shadow(0 7px 9px rgba(0,0,0,.2)); }
.ev-marker .pin { position: absolute; inset: 0 0 8px 0; border: 2px solid #d6e5e1; border-radius: 50% 50% 50% 12%; background: #fff; transform: rotate(-45deg); }
.ev-marker .bolt { position: absolute; z-index: 2; top: 8px; left: 13px; color: #0f9f90; font-size: 20px; font-weight: 900; }
.ev-marker .state-dot { position: absolute; z-index: 3; top: 1px; right: 2px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; }
.leaflet-control-zoom a { color: #20312e !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--text); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-sm); }

.saved-section { min-height: calc(100svh - var(--header-h)); max-width: 1200px; margin: 0 auto; padding: 42px clamp(15px, 4vw, 42px) 110px; }
.saved-header p:last-child { margin: 7px 0 0; color: var(--muted); }
.saved-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.saved-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.saved-card h3 { margin: 0; letter-spacing: -.02em; }
.saved-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.saved-actions { margin-top: 14px; display: flex; gap: 7px; }
.saved-actions a, .saved-actions button { flex: 1; min-height: 40px; border-radius: 11px; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; font-weight: 800; font-size: 11px; }
.saved-actions button { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.saved-actions a { border: 1px solid var(--teal); background: var(--teal); color: #fff; }

.modal-backdrop { position: fixed; inset: 0; z-index: 2500; display: grid; place-items: center; padding: 18px; background: rgba(8, 17, 15, .46); backdrop-filter: blur(10px); }
.modal-card, .station-sheet { position: relative; width: min(460px, 100%); max-height: min(88svh, 860px); overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.26); }
.modal-card { padding: 28px; text-align: center; }
.modal-close { position: absolute; z-index: 3; top: 12px; right: 13px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: 22px; }
.modal-logo { width: 49px; height: 49px; }
.modal-card h2 { margin: 11px 0 6px; letter-spacing: -.04em; }
.modal-card p { color: var(--muted); line-height: 1.6; }
.auth-button { width: 100%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 14px; margin-top: 9px; }
.auth-button.google { background: var(--surface); }
.google-g { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 6px; border-radius: 50%; color: #4285f4; font-weight: 900; }
#emailAuthForm input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: var(--surface); color: var(--text); }
.divider { display: flex; align-items: center; gap: 9px; margin: 14px 0; color: var(--muted); font-size: 11px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.text-button, .danger-text-button { border: 0; background: transparent; font-weight: 800; }
.text-button { margin-top: 12px; color: var(--teal); }
.danger-text-button { margin-top: 14px; color: var(--red); }
.modal-footnote { margin-top: 15px !important; font-size: 10px; }
.modal-footnote a { color: var(--teal-dark); }
.account-profile-row { display: flex; align-items: center; gap: 12px; text-align: left; margin-bottom: 18px; }
.account-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.account-profile-row h2 { margin: 3px 0 1px; }
.account-profile-row p { margin: 0; font-size: 12px; }
.account-setting-card { display: grid; gap: 8px; padding: 15px; text-align: left; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.account-setting-card label { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.account-setting-card select { min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font-weight: 750; }
.account-setting-card small { color: var(--muted); line-height: 1.45; }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); padding: 0 14px; }
.secondary-button.full { width: 100%; margin-top: 10px; }

.station-sheet { width: min(620px, 100%); padding: 25px; text-align: left; }
.sheet-drag { display: none; }
.station-sheet-header { padding-right: 38px; }
.station-sheet-header h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.station-sheet-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.station-sheet-topline { margin-top: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.station-sheet-rating { color: var(--muted); font-size: 12px; font-weight: 800; }
.station-info-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.info-tile { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.info-tile span { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.info-tile strong { display: block; margin-top: 4px; font-size: 13px; line-height: 1.4; }
.sheet-section { margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--line); }
.sheet-section h3 { margin: 0 0 9px; font-size: 15px; letter-spacing: -.02em; }
.sheet-section-copy { margin: -2px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.report-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.report-button { min-height: 43px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 11px; font-weight: 800; }
.report-button.available:hover { border-color: var(--green); color: var(--green); }
.report-button.busy:hover { border-color: var(--yellow); color: var(--yellow); }
.report-button.offline:hover { border-color: var(--red); color: var(--red); }
.amenities-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.amenity-card { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.amenity-card strong { display: block; font-size: 12px; }
.amenity-card span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.amenities-loading { color: var(--muted); font-size: 11px; }
.rating-stars { display: flex; gap: 4px; }
.star-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #d2a019; font-size: 19px; }
.star-button.active { background: #fff8db; border-color: #eed781; }
.review-form textarea { width: 100%; min-height: 86px; resize: vertical; margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: var(--surface); color: var(--text); }
.review-list { margin-top: 12px; display: grid; gap: 8px; }
.review-item { padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.review-item-header { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); }
.review-item strong { color: var(--text); }
.review-item p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sheet-actions { position: sticky; bottom: -25px; margin: 20px -25px -25px; padding: 12px 25px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1.15fr; gap: 8px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); }
.sheet-actions a, .sheet-actions button { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; border-radius: 12px; text-decoration: none; font-size: 12px; font-weight: 800; }
.sheet-actions button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.sheet-actions a { border: 1px solid var(--teal); background: var(--teal); color: #fff; }

.toast-region { position: fixed; z-index: 5000; right: 16px; bottom: 20px; width: min(360px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-size: 12px; line-height: 1.5; font-weight: 750; animation: toastIn .22s ease both; }
.toast.error { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

footer { flex: 0 0 auto; width: 100%; margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 25px clamp(18px, 4vw, 50px) 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--text); }
.footer-brand img { width: 27px; height: 27px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 13px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.mobile-bottom-nav { display: none; }

@media (max-width: 1100px) {
  .filter-bar { grid-template-columns: repeat(6, minmax(150px, 180px)); }
  .results-layout { grid-template-columns: minmax(325px, .8fr) minmax(0, 1.25fr); }
  .saved-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .site-header { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .desktop-nav { display: none; }
  .brand { font-size: 15px; }
  .brand-logo { width: 31px; height: 31px; }
  .header-actions { grid-column: 2; }
  .results-section { padding-bottom: 92px; }
  .results-toolbar { align-items: center; }
  .view-toggle { display: flex; }
  .sort-control { display: none; }
  .results-layout {
    grid-template-columns: 1fr;
    height: clamp(460px, calc(100svh - 225px), 760px);
    min-height: 0;
  }
  .map-panel { display: none; min-height: 0; height: 100%; }
  .results-layout.map-mode .results-panel { display: none; }
  .results-layout.map-mode .map-panel { display: block; }
  #map { min-height: 0; height: 100%; }
  .results-panel { min-height: 0; height: 100%; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 1800;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }
  .mobile-nav-button { display: grid; place-items: center; gap: 3px; padding: 7px 4px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 800; }
  .mobile-nav-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
  .mobile-nav-button.active { color: var(--teal); background: var(--teal-soft); }
  footer { padding-bottom: 92px; }
}

@media (max-width: 640px) {
  .ghost-button { padding: 8px 10px; font-size: 12px; }
  .hero { min-height: 0; height: auto; padding: 12px 14px 22px; align-items: start; }
  .brand-mark-large { width: 50px; height: 50px; border-radius: 16px; }
  .brand-mark-large img { width: 33px; height: 33px; }
  .hero h1 { font-size: clamp(38px, 12vw, 52px); }
  .hero-copy { margin-top: 10px; font-size: 13px; line-height: 1.45; }
  .search-shell { margin-top: 16px; grid-template-columns: 1fr; padding: 6px; gap: 6px; }
  .search-input-wrap input { height: 47px; }
  .primary-button { min-height: 47px; }
  .location-button { width: 100%; max-width: 360px; margin-top: 10px; }
  .hero-vehicle { width: 100%; max-width: 360px; justify-content: space-between; text-align: left; }
  .hero-vehicle select { min-width: 0; max-width: 220px; }
  .results-section { padding: 17px 9px 95px; }
  .results-toolbar { margin-bottom: 11px; }
  .results-toolbar h2 { font-size: 22px; }
  .results-subtitle { max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .filter-bar { margin-inline: -9px; padding-inline: 9px; grid-template-columns: repeat(6, minmax(142px, 162px)); }
  .filter-control { min-width: 142px; }
  .results-panel, .map-panel { border-radius: 16px; box-shadow: none; }
  .station-list { padding: 5px; }
  .station-card { padding: 12px; }
  .station-name { font-size: 15px; }
  .status-rating-row { align-items: start; }
  .map-legend { right: 10px; left: 10px; bottom: 10px; }
  .saved-section { padding: 30px 13px 100px; }
  .saved-grid { grid-template-columns: 1fr; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-card, .station-sheet { width: 100%; max-height: 92svh; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .modal-card { padding: 28px 20px calc(24px + env(safe-area-inset-bottom)); }
  .station-sheet { padding: 25px 18px 0; }
  .sheet-drag { display: block; width: 44px; height: 5px; padding: 0; margin: -12px auto 15px; border: 0; border-radius: 999px; background: var(--line); }
  .station-info-grid { grid-template-columns: 1fr 1fr; }
  .sheet-actions { bottom: 0; margin: 20px -18px 0; padding: 11px 18px calc(11px + env(safe-area-inset-bottom)); }
  .toast-region { bottom: calc(86px + env(safe-area-inset-bottom)); }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 390px) {
  .brand span { max-width: 126px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero h1 { font-size: 40px; }
  .station-info-grid, .amenities-grid { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-height: 950px) {
  .hero {
    min-height: 0;
    height: auto;
    padding-top: 8px;
    padding-bottom: 14px;
  }
  .brand-mark-large { width: 42px; height: 42px; margin-bottom: 4px; border-radius: 13px; }
  .brand-mark-large img { width: 28px; height: 28px; }
  .eyebrow { font-size: 10px; }
  .hero h1 { margin-top: 3px; font-size: clamp(34px, 3.7vw, 46px); line-height: .96; }
  .hero-copy { max-width: 560px; margin-top: 5px; font-size: 12px; line-height: 1.34; }
  .search-shell { margin-top: 10px; padding: 5px; }
  .search-input-wrap input { height: 42px; }
  .primary-button, .secondary-button, .location-button, .auth-button { min-height: 42px; }
  .location-button { margin-top: 7px; }
  .hero-vehicle { margin-top: 7px; padding-top: 6px; padding-bottom: 6px; }
  .privacy-hint { margin-top: 4px; font-size: 10px; }
}

@media (max-width: 640px) and (max-height: 760px) {
  .hero { padding-top: 12px; }
  .brand-mark-large { width: 44px; height: 44px; margin-bottom: 6px; }
  .brand-mark-large img { width: 29px; height: 29px; }
  .eyebrow { font-size: 10px; }
  .hero h1 { font-size: 37px; }
  .hero-copy { margin-top: 8px; }
  .search-shell { margin-top: 12px; }
  .location-button, .hero-vehicle { margin-top: 8px; }
  .privacy-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Auth session restoration: avoids flashing signed-out UI for returning users. */
.account-loading { text-align: center; padding: 18px 4px 8px; }
.account-loading h2 { margin: 10px 0 6px; }
.account-loading p { margin: 0; color: var(--muted); }
#accountButton.signed-in { border-color: color-mix(in srgb, var(--teal) 38%, var(--line)); }


/* Authentication must resolve before either signed-in or signed-out account content appears. */
html[data-auth="loading"] #loggedOutAccount,
html[data-auth="loading"] #loggedInAccount { display: none !important; }
