/* ==========================================================================
   GRAVITY MAP v2 — Full-Screen 100vw x 100dvh Live Driver Arbitrage App
   AccuWeather Thermal Price Cloud | Instant Search | Live Stations on Zoom
   Apple Maps / Mapbox Frosted-Glass HUD | Dark Default + Light Parity
   Zero page scroll | Zero emojis | Strict tabular-nums | Explicit transitions
   ========================================================================== */

:root {
  --hud-bg: rgba(11, 15, 22, 0.84);
  --hud-bg-solid: #0d121b;
  --hud-sub: rgba(255, 255, 255, 0.068);
  --hud-hover: rgba(255, 255, 255, 0.12);
  --hud-bd: rgba(255, 255, 255, 0.12);
  --hud-bd-strong: rgba(255, 255, 255, 0.22);
  --ink: #f4f7fb;
  --ink-dim: #cbd5e1;
  --ink-mut: #8e9eb4;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.50), 0 1px 0 rgba(255, 255, 255, 0.06) inset;

  /* Semantic Map Accents */
  --emerald: #10b981;
  --emerald-bright: #34d399;
  --emerald-soft: rgba(16, 185, 129, 0.18);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.18);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --coral: #f97316;
  --coral-soft: rgba(249, 115, 22, 0.18);
  --crimson: #ef4444;
  --crimson-soft: rgba(239, 68, 68, 0.18);
  --indigo: #818cf8;
  --indigo-soft: rgba(129, 140, 248, 0.18);
  --blue: #3b82f6;

  --map-bg: #0b1018;
  --sitebar-bg: #080c13;
  --deck-bg: #090e16;
  --deck-card: #101724;
  --deck-row-hover: rgba(255, 255, 255, 0.04);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html.fp-light {
  --hud-bg: rgba(255, 255, 255, 0.88);
  --hud-bg-solid: #ffffff;
  --hud-sub: rgba(15, 23, 34, 0.055);
  --hud-hover: rgba(15, 23, 34, 0.10);
  --hud-bd: rgba(15, 23, 34, 0.11);
  --hud-bd-strong: rgba(15, 23, 34, 0.22);
  --ink: #0f1722;
  --ink-dim: #334155;
  --ink-mut: #5b6b7f;
  --shadow: 0 12px 32px rgba(15, 23, 34, 0.14), 0 1px 0 rgba(255, 255, 255, 0.92) inset;

  --emerald: #059669;
  --emerald-bright: #047857;
  --emerald-soft: rgba(5, 150, 105, 0.12);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --cyan: #0284c7;
  --cyan-soft: rgba(2, 132, 199, 0.12);
  --coral: #ea580c;
  --coral-soft: rgba(234, 88, 12, 0.12);
  --crimson: #dc2626;
  --crimson-soft: rgba(220, 38, 38, 0.11);
  --indigo: #4f46e5;
  --indigo-soft: rgba(79, 70, 229, 0.12);
  --blue: #2563eb;

  --map-bg: #e8edf2;
  --sitebar-bg: #ffffff;
  --deck-bg: #f8fafc;
  --deck-card: #ffffff;
  --deck-row-hover: rgba(15, 23, 34, 0.035);
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--deck-bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   88dvh Interactive Protomaps + Leaflet Stage (Scoped HUD — zero bleed over Deck)
   ========================================================================== */
.gm-stage {
  position: relative;
  width: 100%;
  height: 88dvh;
  min-height: 540px;
  overflow: hidden;
  background: var(--map-bg);
  isolation: isolate;
  user-select: none;
  border-bottom: 1px solid var(--hud-bd);
}

#gravityMap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--map-bg);
  isolation: isolate;
  z-index: 1;
}

.leaflet-container { background: var(--map-bg); font-family: var(--font); }

/* AccuWeather Thermal Price Cloud Canvas Layer (pure normal alpha compositing — zero mix-blend-mode GPU glitch) */
.gm-cloud-canvas {
  pointer-events: none;
  opacity: 1;
}

.leaflet-control-attribution {
  background: var(--hud-bg) !important;
  color: var(--ink-mut) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top-left-radius: 8px;
  font-size: 10px !important;
  padding: 2px 7px !important;
}
.leaflet-control-attribution a { color: var(--ink-dim) !important; }

.leaflet-bar {
  border: 1px solid var(--hud-bd) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
  background: var(--hud-bg) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.leaflet-bar a {
  background: transparent !important;
  color: var(--ink) !important;
  border-bottom: 1px solid var(--hud-bd) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-weight: 700;
}
.leaflet-bar a:last-child { border-bottom: 0 !important; }
.leaflet-bar a:hover { background: var(--hud-hover) !important; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--hud-bg-solid) !important;
  color: var(--ink) !important;
  border: 1px solid var(--hud-bd);
  box-shadow: var(--shadow) !important;
}

/* ==========================================================================
   Floating Frosted-Glass Top Pill Bar (Single crisp row desktop)
   ========================================================================== */
.gm-topbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 12px;
  max-width: calc(100% - 20px);
  background: var(--hud-bg);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid var(--hud-bd);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* Brand + Live Freshness Trigger */
.gm-brand-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 6px;
  border-right: 1px solid var(--hud-bd);
  flex-shrink: 0;
}

.gm-logo { width: 20px; height: 20px; display: block; flex-shrink: 0; }

.gm-brand-text {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.gm-fresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.gm-fresh-btn:hover { background: var(--hud-hover); border-color: var(--hud-bd-strong); }

.gm-fresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
  flex-shrink: 0;
}
.gm-fresh-dot.is-teal { background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.gm-fresh-dot.is-amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.gm-fresh-pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 280px;
  padding: 12px 14px;
  background: var(--hud-bg);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid var(--hud-bd-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(var(--gm-pop-dx, 0px)) translateY(-4px);
  pointer-events: none;
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
  z-index: 620;
}
.gm-fresh-pop.is-open { opacity: 1; transform: translateX(var(--gm-pop-dx, 0px)) translateY(0); pointer-events: auto; }
.gm-fresh-title { font-size: 11.5px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.gm-fresh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  font-size: 11.5px;
}
.gm-fresh-row { display: flex; justify-content: space-between; color: var(--ink-mut); }
.gm-fresh-row strong { color: var(--ink-dim); font-weight: 700; }

/* Instant Search Pill in Top Bar */
.gm-search-wrap {
  position: relative;
  flex-shrink: 1;
  width: 176px;
  transition: width 180ms var(--ease);
}
.gm-search-wrap:focus-within { width: 222px; }

.gm-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-mut);
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.gm-search-box:focus-within {
  border-color: var(--emerald);
  background: var(--hud-hover);
  color: var(--ink);
}

.gm-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.gm-search-input::placeholder { color: var(--ink-mut); font-weight: 500; }

.gm-search-kbd {
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-mut);
  border: 1px solid var(--hud-bd);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 17px;
  flex-shrink: 0;
}
.gm-search-wrap:focus-within .gm-search-kbd { display: none; }

.gm-search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 0;
  background: var(--hud-hover);
  color: var(--ink-dim);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.gm-search-clear.is-show { display: inline-flex; }

.gm-search-drop {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  width: 316px;
  max-width: calc(100vw - 24px);
  padding: 6px;
  background: var(--hud-bg);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  border: 1px solid var(--hud-bd-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(var(--gm-pop-dx, 0px)) translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
  z-index: 630;
}
.gm-search-drop.is-open { opacity: 1; transform: translateX(var(--gm-pop-dx, 0px)) translateY(0); pointer-events: auto; }

.gm-sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms var(--ease);
}
.gm-sr-item:hover,
.gm-sr-item.is-active { background: var(--hud-hover); }

.gm-sr-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gm-sr-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.gm-sr-tag.is-city { background: var(--hud-sub); color: var(--ink-dim); border: 1px solid var(--hud-bd); }
.gm-sr-tag.is-postcode { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.36); }
html.fp-light .gm-sr-tag.is-postcode { color: #1d4ed8; }
.gm-sr-text { display: flex; flex-direction: column; min-width: 0; }
.gm-sr-sub { font-size: 10.5px; font-weight: 600; color: var(--ink-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-sr-tag.is-border { background: var(--emerald-soft); color: var(--emerald-bright); }
.gm-sr-tag.is-ferry { background: var(--cyan-soft); color: var(--cyan); }
.gm-sr-tag.is-airport { background: var(--indigo-soft); color: var(--indigo); }
.gm-sr-tag.is-lez { background: var(--coral-soft); color: var(--coral); }

.gm-sr-name {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-sr-meta {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--emerald-bright);
  white-space: nowrap;
  flex-shrink: 0;
}
.gm-sr-meta.is-dim { color: var(--ink-mut); }
.gm-sr-empty { padding: 10px; font-size: 12px; color: var(--ink-mut); text-align: center; }

/* Segmented Fuel Switch */
.gm-seg {
  display: inline-flex;
  align-items: center;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}
.gm-seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-mut);
  font-size: 12px;
  font-weight: 700;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.gm-seg-btn:hover { color: var(--ink); }
.gm-seg-btn.is-active { background: var(--ink); color: var(--hud-bg-solid); }

/* Tank & Car Pill + Popover */
.gm-car-wrap { position: relative; flex-shrink: 0; }

.gm-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.gm-pill-btn:hover, .gm-pill-btn.is-open { background: var(--hud-hover); border-color: var(--hud-bd-strong); }

.gm-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(calc(-50% + var(--gm-pop-dx, 0px))) translateY(-4px);
  width: 274px;
  padding: 15px;
  background: var(--hud-bg);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid var(--hud-bd-strong);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
  z-index: 610;
}
.gm-popover.is-open { opacity: 1; transform: translateX(calc(-50% + var(--gm-pop-dx, 0px))) translateY(0); pointer-events: auto; }

.gm-slider-group { display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.gm-slider-group:last-of-type { margin-bottom: 10px; }
.gm-slider-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.gm-slider-head strong { color: var(--emerald-bright); font-size: 13.5px; font-weight: 800; }

.gm-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--hud-bd-strong);
  outline: none;
  cursor: pointer;
}
.gm-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--hud-bg-solid);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.gm-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--emerald);
  border: 2px solid var(--hud-bg-solid);
  cursor: pointer;
}

.gm-pop-presets { display: flex; gap: 6px; padding-top: 8px; border-top: 1px solid var(--hud-bd); }
.gm-preset-chip {
  flex: 1;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-preset-chip:hover { background: var(--hud-hover); color: var(--ink); }

/* 6 Layer Toggles */
.gm-layers {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-left: 4px;
  border-left: 1px solid var(--hud-bd);
}

.gm-layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-mut);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.gm-layer-btn:hover { background: var(--hud-sub); color: var(--ink); }

.gm-layer-btn.is-on[data-layer="cloud"] {
  background: linear-gradient(90deg, rgba(16,185,129,0.22), rgba(245,158,11,0.20), rgba(239,68,68,0.22));
  border-color: rgba(245, 158, 11, 0.42);
  color: var(--ink);
}
.gm-layer-btn.is-on[data-layer="borders"] {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.36);
  color: var(--emerald-bright);
}
.gm-layer-btn.is-on[data-layer="stations"] {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.42);
  color: #60a5fa;
}
html.fp-light .gm-layer-btn.is-on[data-layer="stations"] { color: #1d4ed8; }
.gm-layer-btn.is-on[data-layer="ferries"] {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.36);
  color: var(--cyan);
}
.gm-layer-btn.is-on[data-layer="airports"] {
  background: var(--indigo-soft);
  border-color: rgba(129, 140, 248, 0.36);
  color: var(--indigo);
}
.gm-layer-btn.is-on[data-layer="lez"] {
  background: var(--coral-soft);
  border-color: rgba(249, 115, 22, 0.36);
  color: var(--coral);
}

/* Right Icon Buttons */
.gm-icon-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  border-left: 1px solid var(--hud-bd);
  flex-shrink: 0;
}
.gm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.gm-icon-btn:hover { background: var(--hud-hover); border-color: var(--hud-bd-strong); }
.gm-icon-btn.is-busy { color: var(--blue); border-color: var(--blue); }

/* ==========================================================================
   Floating Driver Verdict Card (Right Desktop / Bottom Sheet Mobile)
   ========================================================================== */
.gm-card {
  position: absolute;
  top: 72px;
  right: 16px;
  z-index: 480;
  width: 348px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 92px);
  overflow-y: auto;
  background: var(--hud-bg);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  border: 1px solid var(--hud-bd-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 15px 16px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  pointer-events: none;
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  user-select: text;
}
.gm-card.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

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

.gm-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.gm-verdict-pill.is-go { background: var(--emerald-soft); color: var(--emerald-bright); border: 1px solid rgba(16, 185, 129, 0.38); }
.gm-verdict-pill.is-stay { background: var(--hud-sub); color: var(--ink-dim); border: 1px solid var(--hud-bd-strong); }
.gm-verdict-pill.is-warn { background: var(--coral-soft); color: var(--coral); border: 1px solid rgba(249, 115, 22, 0.42); }
.gm-verdict-pill.is-ferry { background: var(--cyan-soft); color: var(--cyan); border: 1px solid rgba(34, 211, 238, 0.38); }
.gm-verdict-pill.is-airport { background: var(--indigo-soft); color: var(--indigo); border: 1px solid rgba(129, 140, 248, 0.42); }

.gm-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-mut);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-close-btn:hover { background: var(--hud-hover); color: var(--ink); }

.gm-card-title { margin: 9px 0 2px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.22; }
.gm-card-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-mut);
  margin-bottom: 11px;
}
.gm-card-age {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-dim);
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  padding: 1px 7px;
  border-radius: 999px;
}

.gm-price-vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  border-radius: 12px;
  margin-bottom: 11px;
}
.gm-pv-side { display: flex; flex-direction: column; gap: 1px; }
.gm-pv-side.is-right { text-align: right; }
.gm-pv-cc { font-size: 11px; font-weight: 700; color: var(--ink-mut); }
.gm-pv-price { font-size: 16px; font-weight: 800; color: var(--ink); }
.gm-pv-price.is-cheap { color: var(--emerald-bright); }
.gm-pv-arrow { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--emerald-bright); font-size: 11px; font-weight: 800; }

.gm-station-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  border-radius: 12px;
  margin-bottom: 11px;
}
.gm-station-big { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.gm-station-big.is-cheap { color: var(--emerald-bright); }
.gm-station-big.is-high { color: var(--crimson); }
.gm-station-local { font-size: 12px; font-weight: 700; color: var(--ink-mut); }

.gm-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--hud-bd);
  font-size: 12.5px;
}
.gm-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gm-row span { color: var(--ink-mut); }
.gm-row strong { font-weight: 700; color: var(--ink); text-align: right; }
.gm-row strong.is-pos { color: var(--emerald-bright); }
.gm-row strong.is-neg { color: var(--coral); }
.gm-toll-note { font-size: 11px; color: var(--ink-mut); margin-top: -2px; }

.gm-be-strip { margin-bottom: 13px; }
.gm-be-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--ink-dim); margin-bottom: 6px; }
.gm-be-track { position: relative; height: 7px; border-radius: 999px; background: var(--hud-sub); overflow: hidden; }
.gm-be-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emerald), var(--cyan)); transition: width 220ms var(--ease); }
.gm-be-fill.is-warn { background: var(--coral); }

.gm-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gm-card-actions:has(> :nth-child(3)), .gm-card-actions.has-3 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) auto; gap: 6px; }
.gm-card-png-btn { padding: 0 12px; min-width: 50px; }
.gm-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 37px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink);
  transition: background-color 150ms var(--ease), transform 140ms var(--ease);
}
.gm-nav-btn:hover { background: var(--hud-hover); }
.gm-nav-btn.is-primary { background: var(--emerald); border-color: transparent; color: #04130d; }
html.fp-light .gm-nav-btn.is-primary { color: #ffffff; }
.gm-nav-btn.is-primary:hover { opacity: 0.92; }

/* ==========================================================================
   Floating Bottom Quick-Fly Bar + AccuWeather Thermal Scale Legend
   ========================================================================== */
.gm-quickfly {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 450;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--hud-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--hud-bd);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.gm-quickfly::-webkit-scrollbar { display: none; }

.gm-fly-chip {
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 700;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.gm-fly-chip:hover { background: var(--hud-hover); color: var(--ink); }
.gm-fly-chip.is-active { background: var(--ink); color: var(--hud-bg-solid); }

/* Bottom-Left AccuWeather Thermal Scale + Compact Legend */
.gm-legend {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 440;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--hud-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--hud-bd);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-dim);
}

.gm-thermal-ramp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.gm-ramp-bar {
  width: 72px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488 0%, #10b981 22%, #a3e635 40%, #facc15 54%, #f97316 76%, #dc2626 100%);
}
.gm-leg-sep { width: 1px; height: 14px; background: var(--hud-bd); }
.gm-leg-item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.gm-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.gm-swatch.is-border { background: var(--emerald); }
.gm-swatch.is-ferry { background: var(--cyan); }
.gm-swatch.is-lez { background: var(--coral); }

/* ==========================================================================
   Custom Map Markers (Border, Ferry, Airport, LEZ, Live Station Price Pills)
   ========================================================================== */
.gm-pin-wrap { background: transparent !important; border: 0 !important; }

.gm-border-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(9, 14, 21, 0.92);
  border: 1.5px solid var(--emerald);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms var(--ease);
}
html.fp-light .gm-border-pill { background: rgba(255, 255, 255, 0.96); color: #0f1722; box-shadow: 0 4px 12px rgba(15, 23, 34, 0.16); }
.gm-border-pill:hover, .gm-border-pill.is-selected { transform: translate(-50%, -50%) scale(1.1); border-color: #ffffff; z-index: 900; }
html.fp-light .gm-border-pill:hover, html.fp-light .gm-border-pill.is-selected { border-color: #0f1722; }
.gm-border-pill.is-zero { border-color: var(--ink-mut); opacity: 0.72; }
.gm-border-pill.is-exclave { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.24), 0 4px 14px rgba(0, 0, 0, 0.45); }
.gm-border-pill.is-compact { padding: 3px 7px; font-size: 11px; gap: 4px; }
.gm-pill-save { color: var(--emerald-bright); }

.gm-tier-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gm-tier-dot.is-live { background: var(--emerald-bright); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28); }
.gm-tier-dot.is-wob { background: transparent; border: 1.5px solid var(--cyan); }
.gm-tier-dot.is-noneu { background: transparent; border: 1.5px solid var(--amber); }

.gm-pill-tier {
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #cbd5e1;
  letter-spacing: 0.01em;
}
html.fp-light .gm-pill-tier { background: rgba(15, 23, 34, 0.08); color: #334155; }

/* Live Station Price Badges (Zoom >= 10) */
.gm-stn-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(11, 16, 24, 0.94);
  border: 1.5px solid var(--amber);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 140ms var(--ease);
}
html.fp-light .gm-stn-pill { background: rgba(255, 255, 255, 0.97); color: #0f1722; box-shadow: 0 3px 10px rgba(15, 23, 34, 0.15); }
.gm-stn-pill:hover, .gm-stn-pill.is-selected { transform: translate(-50%, -50%) scale(1.12); z-index: 950; }
.gm-stn-pill.is-cheap { border-color: var(--emerald); color: var(--emerald-bright); }
.gm-stn-pill.is-mid { border-color: var(--amber); }
.gm-stn-pill.is-high { border-color: var(--crimson); color: #fca5a5; }
html.fp-light .gm-stn-pill.is-high { color: #b91c1c; }
.gm-stn-pill.is-best {
  background: var(--emerald);
  border-color: #ffffff;
  color: #03150e;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.32), 0 4px 14px rgba(0, 0, 0, 0.45);
}
html.fp-light .gm-stn-pill.is-best { background: var(--emerald); border-color: #047857; color: #ffffff; }
.gm-stn-brand { font-size: 10px; font-weight: 700; opacity: 0.78; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
.gm-stn-cc {
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.15;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
html.fp-light .gm-stn-cc { background: rgba(15, 23, 34, 0.09); color: #1e293b; }
.gm-stn-pill.is-best .gm-stn-cc { background: rgba(3, 21, 14, 0.22); color: #03150e; }
html.fp-light .gm-stn-pill.is-best .gm-stn-cc { background: rgba(255, 255, 255, 0.24); color: #ffffff; }

.gm-ferry-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(7, 22, 34, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.65);
  color: #cffafe;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
html.fp-light .gm-ferry-pill { background: rgba(255, 255, 255, 0.94); color: #0369a1; border-color: rgba(2, 132, 199, 0.55); }

.gm-airport-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 20, 42, 0.90);
  border: 1.4px solid rgba(129, 140, 248, 0.85);
  color: #e0e7ff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.gm-airport-pin.has-save { height: 23px; padding: 0 8px; }
.gm-airport-pin:hover,
.gm-airport-pin.is-selected {
  transform: translate(-50%, -50%) scale(1.1);
  border-color: #ffffff;
  background: rgba(30, 27, 75, 0.96);
  z-index: 920;
}
.gm-ap-ico { color: var(--indigo); flex-shrink: 0; }
.gm-ap-iata { color: inherit; }
.gm-ap-save { color: var(--emerald-bright); font-weight: 800; }
html.fp-light .gm-airport-pin {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(79, 70, 229, 0.78);
  color: #1e1b4b;
  box-shadow: 0 3px 10px rgba(15, 23, 34, 0.16);
}
html.fp-light .gm-airport-pin:hover,
html.fp-light .gm-airport-pin.is-selected {
  border-color: #1e1b4b;
  background: #eef2ff;
}
html.fp-light .gm-ap-save { color: #047857; }

.gm-lez-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(28, 14, 10, 0.88);
  border: 1px solid rgba(249, 115, 22, 0.72);
  color: #fed7aa;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
html.fp-light .gm-lez-tag { background: rgba(255, 247, 237, 0.94); color: #9a3412; border-color: rgba(234, 88, 12, 0.55); }

.gm-user-pin {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.28), 0 3px 10px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
}

.gm-toast {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 700;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-bd-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.gm-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==========================================================================
   Responsive Breakpoints (<= 1340px compact legend, <= 1120px 2-row HUD, <= 640px mobile)
   ========================================================================== */
@media (max-width: 1460px) {
  .gm-leg-sep, .gm-legend .gm-leg-item { display: none; }
}

@media (max-width: 1180px) {
  .gm-topbar {
    top: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
    border-radius: 18px;
    padding: 7px 9px;
    gap: 6px;
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
  }
  .gm-brand-wrap { border-right: 0; padding-right: 0; }
  .gm-layers {
    order: 6;
    width: 100%;
    padding: 5px 0 0;
    border-left: 0;
    border-top: 1px solid var(--hud-bd);
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .gm-layers::-webkit-scrollbar { display: none; }
  .gm-icon-actions { border-left: 0; padding-left: 0; }
  .gm-legend { display: none; }
}

@media (max-width: 640px) {
  .gm-topbar {
    top: 8px;
    gap: 5px 4px;
    padding: 5px 7px;
    border-radius: 16px;
  }
  .gm-brand-wrap { order: 1; gap: 4px; }
  .gm-brand-text { font-size: 12px; }
  .gm-fresh-btn { height: 28px; padding: 0 6px; font-size: 10.5px; }
  .gm-search-wrap,
  .gm-search-wrap:focus-within {
    order: 2;
    flex: 1 1 112px;
    width: auto;
    min-width: 108px;
  }
  .gm-search-box { height: 34px; padding: 0 7px 0 9px; gap: 5px; }
  .gm-search-input { font-size: 12px; }
  .gm-search-kbd { display: none; }
  .gm-seg { order: 3; }
  .gm-seg-btn { padding: 0 8px; height: 30px; font-size: 11px; }
  .gm-route-wrap { order: 4; }
  .gm-car-wrap { order: 5; }
  .gm-mob-layers-btn { order: 6; display: inline-flex !important; }
  .gm-icon-actions { order: 7; margin-left: auto; gap: 3px; }
  .gm-pill-btn { height: 34px; padding: 0 7px; gap: 4px; font-size: 11px; }
  .gm-icon-btn { width: 34px; height: 34px; }

  /* Collapse 6 layer buttons into floating frosted popover drawer -> strictly 2-row <=86px topbar! */
  .gm-layers {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: 100%;
    padding: 10px;
    gap: 6px;
    border: 1px solid var(--hud-bd-strong);
    border-radius: 16px;
    background: var(--hud-bg);
    backdrop-filter: blur(22px) saturate(165%);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    overflow: visible;
    z-index: 615;
  }
  .gm-layers.is-mob-open { display: flex; }
  .gm-layer-btn { height: 36px; padding: 0 11px; font-size: 12px; }
  .gm-replay-trigger { height: 36px; width: 32px; }

  .gm-card {
    top: auto;
    right: 8px;
    left: 8px;
    bottom: 50px;
    width: auto;
    max-width: none;
    border-radius: 18px;
    padding: 13px 14px;
    max-height: 62dvh;
    overflow-y: auto;
    z-index: 495;
  }
  .gm-quickfly {
    bottom: 8px;
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    padding: 4px;
  }
  .gm-fly-chip { height: 28px; padding: 0 10px; font-size: 11px; }
  .leaflet-bottom.leaflet-right { display: none; }
}

@media (max-width: 460px) {
  /* Keep <h1> accessible in DOM while freeing 78px on 390px viewports so Row 1 never wraps */
  .gm-brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}


/* ==========================================================================
   GRAVITY MAP v6 — Route Optimizer, Replay Scrubber, Exit Sniper, Brand Bar
   ========================================================================== */

/* Route Trigger + Popover */
.gm-route-wrap {
  position: relative;
  flex-shrink: 0;
}
.gm-route-btn.is-active {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--emerald-bright);
}
.gm-route-pop {
  width: 318px;
  max-width: calc(100vw - 24px);
  left: 0;
  transform: translateX(var(--gm-pop-dx, 0px)) translateY(-4px);
  padding: 13px 14px;
}
.gm-route-pop.is-open { transform: translateX(var(--gm-pop-dx, 0px)) translateY(0); }

.gm-rpop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gm-rpop-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.gm-rpop-clear {
  border: 0;
  background: transparent;
  color: var(--crimson);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.gm-rpop-clear:hover { background: var(--crimson-soft); }

.gm-rpop-fields {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 11px;
}
.gm-rpop-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 32px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.gm-rpop-field:focus-within {
  border-color: var(--emerald);
  background: var(--hud-hover);
}
.gm-rpop-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gm-rpop-dot.is-from { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.gm-rpop-dot.is-to { background: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-soft); }
.gm-rpop-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.gm-rpop-input::placeholder { color: var(--ink-mut); font-weight: 500; }

.gm-rpop-swap {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--hud-bd-strong);
  background: var(--hud-bg-solid);
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-rpop-swap:hover { background: var(--hud-hover); color: var(--ink); }

.gm-rpop-drop {
  position: absolute;
  top: calc(100% + 5px);
  left: -1px;
  right: -1px;
  padding: 5px;
  border-radius: 11px;
  background: var(--hud-bg-solid);
  border: 1px solid var(--hud-bd-strong);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 2px;
  max-height: 210px;
  overflow-y: auto;
  z-index: 660;
}
.gm-rpop-drop.is-open { display: flex; }

.gm-rpop-tank { margin-bottom: 10px; }

.gm-rpop-go {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 0;
  background: var(--emerald);
  color: #03150e;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
html.fp-light .gm-rpop-go { color: #ffffff; }
.gm-rpop-go:hover { opacity: 0.92; }
.gm-rpop-go:disabled { opacity: 0.5; cursor: progress; }

.gm-rpop-corridors {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--hud-bd);
}
.gm-rpop-sub {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-mut);
  margin-bottom: 7px;
}
.gm-corridor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.gm-corridor-chip {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-corridor-chip:hover {
  background: var(--hud-hover);
  border-color: var(--emerald);
  color: var(--ink);
}

/* Split Cloud + Replay Play Button */
.gm-cloud-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.gm-replay-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  cursor: pointer;
  padding: 0;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-replay-trigger:hover {
  background: var(--hud-hover);
  border-color: var(--hud-bd-strong);
  color: var(--ink);
}
.gm-replay-trigger.is-on {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: var(--amber);
}

/* Route Plan Card Internals */
.gm-route-costs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.gm-rc-box {
  padding: 7px 8px;
  border-radius: 10px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gm-rc-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-mut);
  white-space: nowrap;
}
.gm-rc-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}
.gm-rc-val.is-pos { color: var(--emerald-bright); }

.gm-route-stops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.gm-rstop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: var(--emerald-soft);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 140ms var(--ease), transform 140ms var(--ease);
}
.gm-rstop-row:hover { border-color: var(--emerald); transform: translateY(-1px); }
.gm-rstop-left { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gm-rstop-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-rstop-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-rstop-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.gm-rstop-price { font-size: 12.5px; font-weight: 800; color: var(--emerald-bright); }
.gm-rstop-liters { font-size: 10.5px; font-weight: 700; color: var(--ink-dim); }

.gm-tolls-details {
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  font-size: 11px;
  color: var(--ink-dim);
}
.gm-tolls-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gm-tolls-details summary::-webkit-details-marker { display: none; }
.gm-tolls-list {
  margin: 6px 0 0;
  padding: 6px 0 0 14px;
  border-top: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Map Route Markers (Green Optimal Stops, Red Skip Zones, A/B Endpoints) */
.gm-route-stop-pin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--emerald);
  border: 2px solid #ffffff;
  color: #03150e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.30), 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
html.fp-light .gm-route-stop-pin { color: #ffffff; border-color: #047857; }

.gm-route-skip-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(32, 10, 14, 0.94);
  border: 1.5px solid var(--crimson);
  color: #fecaca;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.42);
}
html.fp-light .gm-route-skip-pin { background: #fef2f2; color: #b91c1c; }

.gm-route-end-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--hud-bg-solid);
  border: 2.5px solid var(--cyan);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  transform: translate(-50%, -50%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.gm-route-end-pin.is-from { border-color: var(--emerald); }

/* Highway Exit Sniper Badge on Map */
.gm-sniper-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(4, 28, 20, 0.94);
  border: 1.5px solid var(--emerald-bright);
  color: var(--emerald-bright);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22), 0 4px 12px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 140ms var(--ease);
}
html.fp-light .gm-sniper-pill { background: #ecfdf5; color: #047857; border-color: #059669; }
.gm-sniper-pill:hover { transform: translate(-50%, -50%) scale(1.08); }

/* "Fill Now or Wait?" Timing Signal Pill inside Verdict Cards */
.gm-timing-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 9px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
}
.gm-timing-pill.is-now {
  border-color: rgba(16, 185, 129, 0.42);
  background: var(--emerald-soft);
  color: var(--emerald-bright);
}
.gm-timing-pill.is-wait {
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--amber-soft);
  color: var(--amber);
}
.gm-timing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.gm-timing-badge { font-weight: 800; white-space: nowrap; }
.gm-timing-detail { color: var(--ink-dim); font-weight: 600; }

/* Zoom-Only Brand Filter Pill Strip */
.gm-brandbar {
  position: absolute;
  bottom: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 440;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px;
  max-width: calc(100% - 24px);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--hud-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hud-bd);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.gm-brandbar::-webkit-scrollbar { display: none; }
.gm-brandbar[hidden] { display: none !important; }
.gm-brand-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-brand-chip:hover { background: var(--hud-hover); color: var(--ink); }
.gm-brand-chip.is-active {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-bright);
}
.gm-brand-cnt { opacity: 0.72; font-weight: 600; margin-left: 3px; }

/* Windy-Style Floating Time-Scrubber Bar */
body.gm-replay-on .gm-quickfly,
body.gm-replay-on .gm-brandbar {
  display: none !important;
}
.gm-replaybar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 520;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 8px;
  width: min(760px, calc(100% - 24px));
  background: var(--hud-bg);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--hud-bd-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.gm-replaybar[hidden] { display: none !important; }

.gm-replay-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: var(--emerald);
  color: #03150e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
html.fp-light .gm-replay-play { color: #ffffff; }
.gm-replay-play .gm-ico-pause { display: none; }
.gm-replay-play.is-playing .gm-ico-play { display: none; }
.gm-replay-play.is-playing .gm-ico-pause { display: block; }

.gm-replay-seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  flex-shrink: 0;
}
.gm-replay-mode {
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.gm-replay-mode.is-active {
  background: var(--hud-bg-solid);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.gm-replay-track {
  flex: 1 1 160px;
  min-width: 90px;
  display: flex;
  align-items: center;
}
.gm-replay-range { width: 100%; }

.gm-replay-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gm-replay-time {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.gm-replay-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  max-width: 215px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-replay-badge.is-peak {
  background: var(--crimson-soft);
  border-color: rgba(239, 68, 68, 0.55);
  color: #fca5a5;
}
html.fp-light .gm-replay-badge.is-peak { color: #b91c1c; }
.gm-replay-badge.is-event {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--amber);
}
.gm-replay-badge.is-best {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.55);
  color: var(--emerald-bright);
}

.gm-replay-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.gm-replay-close:hover { background: var(--hud-hover); color: var(--ink); }

.gm-be-head { gap: 10px; }

@media (max-width: 640px) {
  .gm-route-pop {
    position: fixed;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
  .gm-brandbar { bottom: 50px; max-width: calc(100% - 16px); }
  body.gm-peek-open .gm-brandbar { display: none !important; }
  .gm-replaybar {
    bottom: 8px;
    width: calc(100% - 16px);
    border-radius: 18px;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 10px;
  }
  .gm-replay-track { order: 4; flex: 1 0 100%; }
  .gm-replay-info { order: 3; max-width: calc(100% - 140px); overflow: hidden; }
  .gm-replay-badge { max-width: 145px; }
  .gm-replay-close { margin-left: auto; }
}


/* ==========================================================================
   GRAVITY MAP Stage 2 — Audit Fixes (1280/768/390, Popover Head, LEZ Dots)
   + Jan 1 Tax Shock + Forecourt Truth X-Ray + My Garage + EV Strip + Share PNG
   ========================================================================== */

/* Fix Car & Route Popover slider headers (display:flex + space-between) */
.gm-pop-row { margin-bottom: 10px; }
.gm-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: var(--ink-dim);
}
.gm-pop-head strong { color: var(--ink); font-weight: 800; white-space: nowrap; }

/* My Garage Popover: 5 Presets (incl. Truck 600L) + Currency + Saved Places */
.gm-car-pop { width: 296px; max-width: calc(100vw - 24px); }
.gm-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--hud-bd);
}
.gm-preset-chip {
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-preset-chip:hover { background: var(--hud-hover); border-color: var(--hud-bd-strong); color: var(--ink); }
.gm-preset-chip.is-active { background: var(--emerald-soft); border-color: var(--emerald); color: var(--emerald-bright); }
.gm-preset-chip.is-truck { border-color: rgba(245, 158, 11, 0.45); color: var(--amber); }

.gm-garage-sec {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--hud-bd);
}
.gm-ccy-row { display: flex; flex-wrap: wrap; gap: 4px; }
.gm-ccy-chip {
  height: 23px;
  padding: 0 7px;
  border-radius: 7px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
}
.gm-ccy-chip:hover { background: var(--hud-hover); color: var(--ink); }
.gm-ccy-chip.is-active { background: var(--ink); color: var(--hud-bg-solid); border-color: var(--ink); }

.gm-saved-list { display: flex; flex-direction: column; gap: 4px; max-height: 120px; overflow-y: auto; }
.gm-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  font-size: 11px;
}
.gm-saved-jump {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  padding: 0;
}
.gm-saved-jump:hover { color: var(--emerald-bright); }
.gm-saved-delta { font-size: 10.5px; font-weight: 800; white-space: nowrap; color: var(--ink-dim); }
.gm-saved-delta.is-pos { color: var(--emerald-bright); }
.gm-saved-delta.is-neg { color: var(--crimson); }
.gm-saved-del {
  border: 0;
  background: transparent;
  color: var(--ink-mut);
  cursor: pointer;
  font-size: 12px;
  padding: 0 3px;
}
.gm-saved-del:hover { color: var(--crimson); }

/* Returning-Driver Subtle Saved Pill (bottom-left above legend) */
.gm-saved-pill {
  position: absolute;
  bottom: 54px;
  left: 14px;
  z-index: 460;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--hud-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hud-bd-strong);
  box-shadow: var(--shadow);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  max-width: min(360px, calc(100% - 28px));
}
.gm-saved-pill[hidden] { display: none !important; }
.gm-saved-pill-go {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gm-saved-pill-go:hover { color: var(--emerald-bright); }
.gm-saved-pill-x {
  border: 0;
  background: var(--hud-sub);
  color: var(--ink-mut);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  font-size: 11px;
  line-height: 18px;
  padding: 0;
  flex-shrink: 0;
}

/* Share 2-Option Popover (Copy Deep-Link | Save Postcard PNG) */
.gm-share-wrap { position: relative; display: inline-flex; }
.gm-share-pop {
  width: 192px;
  left: auto;
  right: 0;
  transform: translateX(var(--gm-pop-dx, 0px)) translateY(-4px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gm-share-pop.is-open { transform: translateX(var(--gm-pop-dx, 0px)) translateY(0); }
.gm-share-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms var(--ease);
}
.gm-share-opt:hover { background: var(--hud-hover); }
.gm-share-opt.is-accent { color: var(--emerald-bright); }

/* Verdict Card Top Buttons (Star + Close) */
.gm-card-top-btns { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.gm-star-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-star-btn[hidden] { display: none !important; }
.gm-star-btn:hover { background: var(--hud-hover); color: var(--amber); }
.gm-star-btn.is-starred { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.gm-star-btn.is-starred svg { fill: currentColor; }

/* Compact LEZ Shield Dot at z <= 7 (zero collision with border pills!) */
.gm-lez-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.92);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.28), 0 2px 6px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
  cursor: pointer;
}
html.fp-light .gm-lez-dot { border-color: #9a3412; }

/* Jan 1, 2027 Tax Shock Replay Tab + Card Callout */
.gm-replay-mode.is-shock.is-active {
  background: var(--crimson);
  color: #ffffff;
}
.gm-shock-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  margin-bottom: 9px;
  background: var(--crimson-soft);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  font-size: 11px;
  font-weight: 700;
}
html.fp-light .gm-shock-callout { color: #991b1b; }

/* Forecourt Truth X-Ray: Smart Attribute Micro-Chips + Trust Dot + 3-Layer Tax Bar */
.gm-bar-sep {
  width: 1px;
  height: 16px;
  background: var(--hud-bd-strong);
  margin: 0 3px;
  flex-shrink: 0;
}
.gm-attr-chip {
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--hud-bd);
  background: var(--hud-sub);
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-attr-chip:hover { background: var(--hud-hover); color: var(--ink); }
.gm-attr-chip.is-active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
}
.gm-attr-chip.is-trust.is-active {
  background: var(--emerald-soft);
  border-color: var(--emerald);
  color: var(--emerald-bright);
}

.gm-stn-trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-bright);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}
.gm-stn-pill.is-best .gm-stn-trust-dot { background: #ffffff; }

.gm-stn-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}
.gm-stn-attr-tag {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  color: var(--ink-dim);
  font-size: 10px;
  font-weight: 800;
}
.gm-stn-attr-tag.is-trust {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--emerald-bright);
}

.gm-xray {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
}
.gm-xray-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-dim);
  margin-bottom: 6px;
}
.gm-xray-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 6px;
}
.gm-xray-seg { height: 100%; border-radius: 3px; min-width: 4px; }
.gm-xray-seg.is-net { background: var(--cyan); }
.gm-xray-seg.is-tax { background: var(--amber); }
.gm-xray-seg.is-margin { background: var(--emerald); }
.gm-xray-seg.is-margin.is-over { background: var(--crimson); }
.gm-xray-leg {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-mut);
  font-weight: 700;
}
.gm-xray-leg b { color: var(--ink); font-weight: 800; }

/* EV vs. Fuel 1-Line Trip Reality Strip inside Route Cards */
.gm-ev-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding: 7px 9px;
  border-radius: 9px;
  margin-bottom: 10px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-dim);
}
.gm-ev-strip strong { color: var(--ink); font-weight: 800; }
.gm-ev-strip .is-win { color: var(--emerald-bright); }

/* Single-Row 1280px Standard Laptop HUD (1181px..1380px) */
@media (max-width: 1380px) and (min-width: 1181px) {
  .gm-topbar { gap: 4px; padding: 4px 6px 4px 10px; }
  .gm-brand-wrap { gap: 5px; padding-right: 5px; }
  .gm-brand-text { font-size: 12px; }
  .gm-fresh-btn { padding: 0 6px; font-size: 10.5px; }
  .gm-search-wrap { width: 142px; }
  .gm-search-wrap:focus-within { width: 178px; }
  .gm-seg-btn { padding: 0 8px; font-size: 11px; }
  .gm-pill-btn { padding: 0 7px; font-size: 11px; gap: 4px; }
  .gm-layer-btn { padding: 0 7px; font-size: 11px; gap: 4px; }
  .gm-icon-btn { width: 28px; height: 28px; }
  .gm-layers { padding-left: 5px; gap: 3px; }
  .gm-icon-actions { padding-left: 5px; gap: 3px; }
}

/* Clean 2-Row Tablet HUD (641px..1180px — zero orphan 3rd row on 768px!) */
@media (max-width: 1180px) and (min-width: 641px) {
  .gm-topbar { gap: 5px; padding: 6px 9px; }
  .gm-brand-wrap { gap: 5px; }
  .gm-brand-text { font-size: 12px; }
  .gm-search-wrap,
  .gm-search-wrap:focus-within {
    flex: 1 1 118px;
    width: auto;
    min-width: 108px;
  }
  .gm-search-kbd { display: none; }
  .gm-seg-btn { padding: 0 8px; font-size: 11.5px; }
  .gm-pill-btn { padding: 0 8px; font-size: 11.5px; }
  .gm-icon-btn { width: 28px; height: 28px; }
  .gm-icon-actions { gap: 4px; }
}

/* ==========================================================================
   Pan-EU Cartography Upgrades — Non-Live Badges, 4-Tier Near Me Tags,
   Mobile Layers Drawer Button & 110px Mobile Glass Peek Card
   ========================================================================== */

/* Desktop/Tablet hide Mobile Layers button & Peek Card */
.gm-mob-layers-btn { display: none; }
.gm-mob-layers-btn.is-open {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--emerald-bright);
}
.gm-mob-layers-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--emerald-soft);
  color: var(--emerald-bright);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* Non-Live Country Visual-Center Dual Badge (z=8..11) */
.gm-nonlive-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-radius: 12px;
  background: rgba(11, 16, 25, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(34, 211, 238, 0.50);
  color: #f1f5f9;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-nl-head { display: inline-flex; align-items: center; gap: 5px; }
.gm-nonlive-badge.is-noneu { border-color: rgba(245, 158, 11, 0.65); }
.gm-nonlive-badge:hover { transform: translate(-50%, -50%) scale(1.06); }
html.fp-light .gm-nonlive-badge {
  background: rgba(255, 255, 255, 0.95);
  color: #0f1722;
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 4px 12px rgba(15, 23, 34, 0.14);
}
html.fp-light .gm-nonlive-badge.is-noneu { border-color: rgba(217, 119, 6, 0.58); }
.gm-nl-cc {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  letter-spacing: 0.03em;
}
html.fp-light .gm-nl-cc { background: rgba(15, 23, 34, 0.08); color: #1e293b; }
.gm-nl-prices { color: #cbd5e1; font-weight: 600; font-size: 11px; }
.gm-nl-prices b { color: #f8fafc; font-weight: 800; }
html.fp-light .gm-nl-prices { color: #475569; }
html.fp-light .gm-nl-prices b { color: #0f1722; }
.gm-nl-tier {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
}
.gm-nonlive-badge.is-noneu .gm-nl-tier { background: var(--amber-soft); color: var(--amber); }

/* z=8..11 Anchor City Pills (cities_agg.json — ZERO PHP calls!) */
.gm-city-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 16, 25, 0.92);
  border: 1.5px solid var(--amber);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-city-pill:hover, .gm-city-pill.is-selected { transform: translate(-50%, -50%) scale(1.08); border-color: #ffffff; z-index: 920; }
.gm-city-pill.is-cheap { border-color: var(--emerald); }
.gm-city-pill.is-high { border-color: var(--crimson); }
.gm-city-name { color: #cbd5e1; font-weight: 600; max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
.gm-city-price { color: #ffffff; font-weight: 800; }
.gm-city-pill.is-cheap .gm-city-price { color: var(--emerald-bright); }
.gm-city-pill.is-high .gm-city-price { color: #fca5a5; }
html.fp-light .gm-city-pill {
  background: rgba(255, 255, 255, 0.96);
  color: #0f1722;
  box-shadow: 0 3px 10px rgba(15, 23, 34, 0.14);
}
html.fp-light .gm-city-pill:hover, html.fp-light .gm-city-pill.is-selected { border-color: #0f1722; }
html.fp-light .gm-city-name { color: #334155; }
html.fp-light .gm-city-price { color: #0f1722; }
html.fp-light .gm-city-pill.is-cheap .gm-city-price { color: #047857; }
html.fp-light .gm-city-pill.is-high .gm-city-price { color: #b91c1c; }

/* border_intel Strip & Internal Linking Card CTAs */
.gm-bi-strip {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gm-bi-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.gm-bi-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: var(--hud-hover);
  color: var(--ink-dim);
  border: 1px solid var(--hud-bd);
}
.gm-bi-chip.is-emerald { background: var(--emerald-soft); border-color: rgba(16, 185, 129, 0.42); color: var(--emerald-bright); }
.gm-bi-chip.is-cyan { background: var(--cyan-soft); border-color: rgba(34, 211, 238, 0.42); color: var(--cyan); }
.gm-bi-chip.is-amber { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.45); color: var(--amber); }
.gm-bi-chip.is-warn { background: var(--crimson-soft); border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
html.fp-light .gm-bi-chip.is-warn { color: #b91c1c; }
.gm-bi-note { font-size: 11px; color: var(--ink-dim); line-height: 1.38; }
.gm-bi-stale { font-size: 10.5px; color: var(--amber); font-weight: 700; }

.gm-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--hud-bd);
}
.gm-link-pill {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--hud-bd-strong);
  background: var(--hud-sub);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-link-pill:hover { background: var(--hud-hover); border-color: var(--emerald); color: var(--emerald-bright); }
.gm-link-pill.is-pri {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.42);
  color: var(--emerald-bright);
}
.gm-link-pill.is-pri:hover { background: var(--emerald); color: #03150e; }
html.fp-light .gm-link-pill.is-pri:hover { color: #ffffff; }

/* Tier 2 / Tier 3 Near Me Dual Petrol + Diesel Map Tags */
.gm-nm-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(11, 16, 25, 0.94);
  border: 1.5px solid var(--cyan);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
  cursor: pointer;
}
.gm-nm-tag.is-petrol { transform: translate(-50%, calc(-100% - 14px)); border-color: var(--emerald); }
.gm-nm-tag.is-diesel { transform: translate(-50%, 14px); border-color: var(--cyan); }
.gm-nm-tag span { color: var(--ink-dim); font-size: 10px; font-weight: 700; }
.gm-nm-tag strong { color: #ffffff; font-weight: 800; }
.gm-nm-tag em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-mut);
  padding-left: 3px;
  border-left: 1px solid var(--hud-bd);
}
html.fp-light .gm-nm-tag {
  background: rgba(255, 255, 255, 0.97);
  color: #0f1722;
  box-shadow: 0 4px 12px rgba(15, 23, 34, 0.16);
}
html.fp-light .gm-nm-tag strong { color: #0f1722; }

/* 110px Mobile Glass Peek Card (<= 640px only; scoped inside #gmStage!) */
.gm-peek-card {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 50px;
  z-index: 492;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--hud-bg);
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid var(--hud-bd-strong);
  box-shadow: var(--shadow);
  flex-direction: column;
  gap: 8px;
}
.gm-pk-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.gm-pk-info {
  flex: 1 1 auto;
  min-width: 0;
  cursor: pointer;
}
.gm-pk-kicker { margin-bottom: 2px; }
.gm-pk-kicker .gm-verdict-pill { padding: 2px 7px; font-size: 9.5px; }
.gm-pk-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-pk-sub {
  font-size: 11px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-pk-metric {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--emerald-bright);
  white-space: nowrap;
  flex-shrink: 0;
}
.gm-pk-x { width: 32px; height: 32px; flex-shrink: 0; }
.gm-pk-acts {
  display: flex;
  align-items: center;
  gap: 6px;
}
.gm-pk-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--hud-bd-strong);
  background: var(--hud-sub);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.gm-pk-btn.is-pri {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #03150e;
  font-weight: 800;
}
html.fp-light .gm-pk-btn.is-pri { color: #ffffff; }

/* ==========================================================================
   /live/map/ Production RC Shell: Compact Sitebar (~42px),
   Below-the-Fold SSR Intelligence Deck & Footer (Dark + Light Synced)
   ========================================================================== */
.gm-sitebar {
  position: relative;
  z-index: 560;
  width: 100%;
  height: 44px;
  background: var(--sitebar-bg);
  border-bottom: 1px solid var(--hud-bd);
}
.gm-sitebar-inner {
  max-width: 1320px;
  height: 100%;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gm-site-logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.gm-site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
}
.gm-site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.gm-site-nav::-webkit-scrollbar { display: none; }
.gm-site-nav a {
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--ink-dim);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-site-nav a:hover { background: var(--hud-sub); color: var(--ink); }

.gm-langbar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.gm-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 25px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-mut);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: background-color 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.gm-lang-pill:hover { background: var(--hud-sub); color: var(--ink); }
.gm-lang-pill.is-active {
  background: var(--emerald-soft);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--emerald-bright);
}

/* Option A: Clean Horizontal AdSense Top Leaderboard Band (strictly between sitebar and #gmStage) */
.gm-ad-band {
  position: relative;
  z-index: 540;
  width: 100%;
  min-height: 98px;
  max-height: 118px;
  padding: 4px 12px 5px;
  background: var(--sitebar-bg);
  border-bottom: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.gm-ad-band .fp-ad,
.gm-ad-band .fp-ad--top {
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  width: 100%;
  max-width: 970px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gm-ad-band .fp-ad__label,
.gm-ad-preview-label {
  display: block;
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mut);
  text-align: center;
}
.gm-ad-band .fp-ad__ins,
.gm-ad-band ins.adsbygoogle {
  max-height: 90px !important;
}
.gm-ad-preview-box {
  width: min(728px, 100%);
  height: 90px;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px dashed var(--hud-bd-strong);
  background: var(--hud-sub);
  color: var(--ink-mut);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.gm-ad-preview-size-mob { display: none; }
.gm-ad-slot--preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gm-ad-preview-box--deck {
  width: min(728px, 100%);
  height: 90px;
}

body.has-ad-band .gm-stage {
  height: calc(88dvh - 102px);
  min-height: 500px;
}

/* Graceful zero-gap collapse when empty, blocked, or AdSense marks slot unfilled */
.gm-ad-band:empty,
.gm-ad-band.is-collapsed,
.gm-ad-band:has(.fp-ad--unfilled),
.gm-ad-band:has(ins[data-ad-status="unfilled"]),
.gm-ad-band:has(ins[data-ad-status="unfill-optimized"]),
html.fp-ads-blocked .gm-ad-band:not(.gm-ad-band--preview) {
  display: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body.has-ad-band:has(#gmAdBand:empty) .gm-stage,
body.has-ad-band:has(#gmAdBand.is-collapsed) .gm-stage,
body.has-ad-band:has(#gmAdBand .fp-ad--unfilled) .gm-stage,
body.has-ad-band:has(#gmAdBand ins[data-ad-status="unfilled"]) .gm-stage,
body.has-ad-band:has(#gmAdBand ins[data-ad-status="unfill-optimized"]) .gm-stage,
html.fp-ads-blocked body.has-ad-band:not(:has(.gm-ad-band--preview)) .gm-stage {
  height: 88dvh;
  min-height: 540px;
}

/* Below-the-Fold SSR Intelligence Deck */
.gm-deck {
  position: relative;
  z-index: 2;
  background: var(--deck-bg);
  color: var(--ink);
}
.gm-deck-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 20px 44px;
}
.gm-deck-hero { margin-bottom: 28px; }
.gm-deck-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.gm-deck-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--emerald-bright);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.gm-deck-updated {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mut);
}
.gm-deck-h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2.15rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.gm-deck-lead {
  margin: 0 0 20px;
  max-width: 780px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}
.gm-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gm-kpi {
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--deck-card);
  border: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gm-kpi strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.gm-kpi span { font-size: 12px; font-weight: 600; color: var(--ink-mut); }

.gm-ad-slot { margin: 22px 0; text-align: center; }

.gm-deck-sec { margin-top: 34px; }
.gm-sec-head { margin-bottom: 14px; }
.gm-sec-head h2 {
  margin: 0 0 4px;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.gm-sec-head p { margin: 0; font-size: 13.5px; color: var(--ink-dim); }
.gm-sec-foot { margin-top: 12px; }

.gm-tbl-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--hud-bd);
  background: var(--deck-card);
}
.gm-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}
.gm-tbl th {
  padding: 11px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-mut);
  border-bottom: 1px solid var(--hud-bd);
  white-space: nowrap;
}
.gm-tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hud-bd);
  vertical-align: middle;
  color: var(--ink);
}
.gm-tbl tbody tr:last-child td { border-bottom: 0; }
.gm-tbl tbody tr:hover { background: var(--deck-row-hover); }
.gm-td-name strong { font-weight: 700; color: var(--ink); }
.gm-td-num { white-space: nowrap; font-weight: 700; }
.gm-td-num.is-cheap { color: var(--emerald-bright); }
.gm-td-num.is-pct { color: var(--emerald-bright); font-weight: 800; }
.gm-td-num.is-save { color: var(--ink); font-weight: 800; }
.gm-td-act {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.gm-regime-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: var(--hud-sub);
  border: 1px solid var(--hud-bd);
  color: var(--ink-dim);
  white-space: nowrap;
}
.gm-regime-tag.is-schengen { background: var(--emerald-soft); border-color: rgba(16, 185, 129, 0.36); color: var(--emerald-bright); }
.gm-regime-tag.is-eu_non_schengen,
.gm-regime-tag.is-ferry { background: var(--cyan-soft); border-color: rgba(34, 211, 238, 0.36); color: var(--cyan); }
.gm-regime-tag.is-non_eu_customs,
.gm-regime-tag.is-duty_free_exclave { background: var(--amber-soft); border-color: rgba(245, 158, 11, 0.42); color: var(--amber); }
.gm-can-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--hud-sub);
  color: var(--ink-mut);
  white-space: nowrap;
}

.gm-jump-btn,
.gm-guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease);
}
.gm-jump-btn {
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: var(--emerald-soft);
  color: var(--emerald-bright);
}
.gm-jump-btn:hover { background: var(--emerald); color: #03150e; }
html.fp-light .gm-jump-btn:hover { color: #ffffff; }
.gm-guide-link {
  border: 1px solid var(--hud-bd-strong);
  background: var(--hud-sub);
  color: var(--ink-dim);
}
.gm-guide-link:hover { background: var(--hud-hover); color: var(--ink); }

.gm-deck-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.gm-deck-card {
  padding: 16px;
  border-radius: 14px;
  background: var(--deck-card);
  border: 1px solid var(--hud-bd);
  display: flex;
  flex-direction: column;
}
.gm-deck-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.gm-deck-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}
.gm-deck-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hud-bd);
}
.gm-deck-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.gm-dl-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.gm-dl-info strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gm-dl-info strong a { color: inherit; text-decoration: none; }
.gm-dl-info strong a:hover { color: var(--emerald-bright); }
.gm-dl-info span { font-size: 11.5px; color: var(--ink-mut); font-weight: 600; }

.gm-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  color: var(--emerald-bright);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}
.gm-more-link:hover { text-decoration: underline; }

.gm-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.gm-tier-card {
  padding: 15px 16px;
  border-radius: 14px;
  background: var(--deck-card);
  border: 1px solid var(--hud-bd);
}
.gm-tier-card h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--emerald-bright);
}
.gm-tier-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}

.gm-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gm-faq-item {
  border-radius: 12px;
  background: var(--deck-card);
  border: 1px solid var(--hud-bd);
  padding: 12px 15px;
}
.gm-faq-item summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.gm-faq-item summary::-webkit-details-marker { display: none; }
.gm-faq-item summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald-bright);
  flex-shrink: 0;
}
.gm-faq-item[open] summary::after { content: "-"; }
.gm-faq-item p {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-dim);
}

.gm-footer {
  background: var(--sitebar-bg);
  border-top: 1px solid var(--hud-bd);
  padding: 24px 20px 32px;
  color: var(--ink-mut);
}
.gm-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.gm-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.gm-footer-links a {
  color: var(--ink-dim);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}
.gm-footer-links a:hover { color: var(--emerald-bright); }
.gm-footer-note { margin: 0; font-size: 12px; color: var(--ink-mut); }

@media (max-width: 960px) {
  .gm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-deck-grid { grid-template-columns: 1fr; }
  .gm-tiers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile 390px Peek Card Activation + Unified Viewport-Safe Popovers + Compact Row 1 + Deck */
@media (max-width: 640px) {
  .gm-sitebar { height: 42px; }
  .gm-sitebar-inner { padding: 0 10px; gap: 6px; }
  .gm-site-nav { display: none; }
  .gm-lang-pill { height: 24px; padding: 0 6px; font-size: 10px; }

  .gm-stage {
    height: 84dvh;
    min-height: 480px;
  }
  .gm-ad-band {
    min-height: 58px;
    max-height: 110px;
    padding: 3px 8px 4px;
  }
  .gm-ad-preview-box {
    width: min(320px, 100%);
    height: 50px;
    font-size: 11px;
  }
  .gm-ad-preview-box--deck {
    width: min(320px, 100%);
    height: 60px;
  }
  .gm-ad-preview-size-desk { display: none; }
  .gm-ad-preview-size-mob { display: inline; }
  body.has-ad-band .gm-stage {
    height: calc(84dvh - 60px);
    min-height: 440px;
  }
  body.has-ad-band:has(#gmAdBand:empty) .gm-stage,
  body.has-ad-band:has(#gmAdBand.is-collapsed) .gm-stage,
  body.has-ad-band:has(#gmAdBand .fp-ad--unfilled) .gm-stage,
  body.has-ad-band:has(#gmAdBand ins[data-ad-status="unfilled"]) .gm-stage,
  body.has-ad-band:has(#gmAdBand ins[data-ad-status="unfill-optimized"]) .gm-stage,
  html.fp-ads-blocked body.has-ad-band:not(:has(.gm-ad-band--preview)) .gm-stage {
    height: 84dvh;
    min-height: 480px;
  }
  body.has-ad-band .gm-popover,
  body.has-ad-band .gm-car-pop,
  body.has-ad-band .gm-route-pop,
  body.has-ad-band .gm-share-pop,
  body.has-ad-band .gm-fresh-pop,
  body.has-ad-band .gm-search-drop,
  body.has-ad-band .gm-layers.is-mob-open {
    max-height: calc(84dvh - 176px);
  }

  .gm-deck-inner { padding: 24px 14px 32px; }
  .gm-tiers-grid { grid-template-columns: 1fr; }

  /* Every popover & dropdown inside .gm-topbar pins cleanly inside the 8px..vw-8px #gmStage frame */
  .gm-popover,
  .gm-car-pop,
  .gm-route-pop,
  .gm-share-pop,
  .gm-fresh-pop,
  .gm-search-drop {
    position: fixed;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    margin-left: 0 !important;
    max-height: calc(84dvh - 116px);
    overflow-y: auto;
    transform: translateX(var(--gm-pop-dx, 0px)) translateY(-4px);
  }
  .gm-popover.is-open,
  .gm-car-pop.is-open,
  .gm-route-pop.is-open,
  .gm-share-pop.is-open,
  .gm-fresh-pop.is-open,
  .gm-search-drop.is-open {
    transform: translateX(var(--gm-pop-dx, 0px)) translateY(0);
  }
  .gm-layers.is-mob-open {
    max-height: calc(84dvh - 116px);
    overflow-y: auto;
  }

  .gm-peek-card.is-open { display: flex; }
  .gm-saved-pill { display: none; }
  .gm-replay-mode { padding: 0 7px; font-size: 10.5px; }
}

@media (max-width: 430px) {
  /* Keep strictly 2 crisp rows (<=88px) across ALL 6 languages (en/de/fr/it/es/ro) at 390px */
  .gm-topbar { padding: 5px 6px; gap: 5px 3px; }
  .gm-brand-wrap { gap: 3px; }
  .gm-logo { width: 18px; height: 18px; }
  .gm-fresh-btn { padding: 0 5px; gap: 3px; font-size: 10px; }
  .gm-search-wrap,
  .gm-search-wrap:focus-within { flex: 1 1 92px; min-width: 90px; }
  .gm-search-box { padding: 0 6px 0 7px; gap: 4px; }
  .gm-search-input { font-size: 11px; }
  .gm-seg-btn { padding: 0 6px; font-size: 10.5px; }
  .gm-pill-btn { padding: 0 6px; gap: 3px; font-size: 10.5px; }
  .gm-mob-layers-cnt { min-width: 15px; height: 15px; font-size: 9.5px; }
  .gm-icon-actions { gap: 2px; }
  .gm-icon-btn { width: 32px; height: 32px; }
}

