/* ------------------------------------------------------------------
   Leadstan — custom styles layered on top of compiled Tailwind
   Mood: dark, sharp, ninja. Crimson accent (#dc2626) + steel cyan
   (#22d3ee) on near-black surfaces.
------------------------------------------------------------------ */

html,
body {
  height: 100%;
}
body {
  background: #06070a;
}

/* Subtle starfield (CSS-only, no extra requests) */
.stars {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(255, 255, 255, 0.45), transparent 50%),
    radial-gradient(1px 1px at 30% 80%, rgba(255, 255, 255, 0.4), transparent 50%),
    radial-gradient(1px 1px at 90% 50%, rgba(255, 255, 255, 0.35), transparent 50%),
    radial-gradient(1px 1px at 10% 60%, rgba(255, 255, 255, 0.4), transparent 50%),
    radial-gradient(1px 1px at 50% 20%, rgba(255, 255, 255, 0.4), transparent 50%);
  background-size: 1200px 1200px;
  opacity: 0.45;
  animation: drift 80s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-300px, -200px, 0); }
}

@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.animate-bounce-slow {
  animation: bounce-slow 2.4s ease-in-out infinite;
}

/* When flow is open, fade the hero text */
body.flow-open #hero-text {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

#flow.is-open {
  transform: translateY(0);
}

/* ── Range slider ──────────────────────────────────────────────── */
.lb-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, #ef4444, #dc2626);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.06);
  outline: none;
}
.lb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 999px;
  background: white;
  border: 3px solid #dc2626;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.65);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.lb-range::-webkit-slider-thumb:hover { transform: scale(1.08); }
.lb-range::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 999px;
  background: white;
  border: 3px solid #dc2626;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.65);
  cursor: pointer;
}

/* ── Hero fake search input (opens search modal) ──────────────── */
.lb-hero-search {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 540px;
  background: rgba(8, 9, 12, 0.65);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 0.625rem;
  padding: 14px 16px;
  cursor: text;
  text-align: left;
  font-size: 16px;
  color: #f1f5f9;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease,
    background-color 0.2s ease;
  box-shadow:
    0 8px 30px -8px rgba(0, 0, 0, 0.55),
    0 0 40px -12px rgba(220, 38, 38, 0.20);
}
.lb-hero-search:hover,
.lb-hero-search:focus-visible {
  outline: none;
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(8, 9, 12, 0.78);
  box-shadow:
    0 10px 40px -10px rgba(0, 0, 0, 0.65),
    0 0 60px -10px rgba(220, 38, 38, 0.45);
  transform: translateY(-1px);
}
.lb-hero-search-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  line-height: 1;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  overflow: hidden;
}
.lb-hero-search-text .rot {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lb-hero-search-text .caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  background: #f87171;
  margin-left: 2px;
  flex: 0 0 auto;
  animation: lb-caret 1s steps(2, end) infinite;
}
@keyframes lb-caret { 50% { opacity: 0; } }
.lb-hero-search-kbd {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 2px 6px;
  color: #94a3b8;
}

/* When the search modal is open, the hero search button gets dimmed and
   slightly scaled to feel like it "expanded" into the modal. */
body.lb-search-open .lb-hero-search {
  opacity: 0.35;
  transform: scale(0.97);
  filter: blur(0.5px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    filter 0.25s ease;
}

/* ── Search modal (niche + location, replaces the old loc-modal) ── */
.lb-search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 16px 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.lb-search-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lb-search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 0%, rgba(220, 38, 38, 0.10), rgba(2, 3, 7, 0.78) 60%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.lb-search-modal-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: rgba(8, 9, 12, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.625rem;
  overflow: hidden;
  transform: scale(0.92) translateY(-12px);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.24s ease,
    box-shadow 0.34s ease;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px -20px rgba(220, 38, 38, 0.25);
}
.lb-search-modal.is-open .lb-search-modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.65),
    0 0 80px -10px rgba(220, 38, 38, 0.30),
    0 0 0 1px rgba(220, 38, 38, 0.12);
}
.lb-search-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lb-search-modal-kbd {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  padding: 2px 6px;
  color: #94a3b8;
}
.lb-search-modal-body {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
}
.lb-search-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.lb-search-field { padding: 6px 0; }
.lb-search-field + .lb-search-field { margin-top: 4px; }
.lb-search-label {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94a3b8;
  margin-bottom: 8px;
}
.lb-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.5rem;
  padding: 10px 12px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.lb-search-input-wrap:focus-within {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.05);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.lb-search-input-icon {
  width: 16px;
  height: 16px;
  color: #f87171;
  flex: 0 0 auto;
}
.lb-search-input-wrap input {
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  outline: none;
  color: #f8fafc;
  font-size: 15px;
  padding: 2px 0;
  min-width: 0;
}
.lb-search-input-wrap input::placeholder { color: #64748b; }

.lb-search-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lb-search-loc-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  max-height: 220px;
  overflow-y: auto;
}
.lb-search-loc-list:empty { display: none; }

.lb-loc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  color: #cbd5e1;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.lb-loc-item:hover,
.lb-loc-item.is-active {
  background: rgba(220, 38, 38, 0.12);
  color: #fff;
}
.lb-loc-item .pin {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #f87171;
}
.lb-loc-item .text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lb-loc-item .main {
  font-size: 14px;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-loc-item .secondary {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Niche chip ────────────────────────────────────────────────── */
.lb-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgb(203 213 225);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.lb-chip:hover {
  background: rgba(220, 38, 38, 0.12);
  color: white;
  border-color: rgba(220, 38, 38, 0.45);
}

/* ── Ninja navbar — small floating hex-pill, centered, side-gutters ── */
.lb-nav-frame {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  padding: 12px 24px 0; /* top stand-off + horizontal side gutters */
  pointer-events: none; /* clicks pass through outside the card */
}
@media (max-width: 1024px) { .lb-nav-frame { padding: 10px 16px 0; } }
@media (max-width: 640px)  { .lb-nav-frame { padding: 8px 10px 0;  } }

/* Centered hex-chamfered card. All four corners cut by a small fixed amount
   so the silhouette reads as an angular ninja pill (not a banner with deep
   chops). The drop-shadow stack draws a thin red hairline that traces the
   chamfered outline plus a soft depth shadow under it. */
.lb-nav-card {
  pointer-events: auto;
  position: relative;
  margin: 0 auto;
  max-width: 64rem;
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  padding: 8px 0;
  /* Hex-octagon silhouette: small ~12px diagonal cuts on every corner. */
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  filter:
    drop-shadow(0 0 0.5px rgba(220, 38, 38, 0.85))
    drop-shadow(0 1px 0 rgba(220, 38, 38, 0.45))
    drop-shadow(0 10px 26px rgba(0, 0, 0, 0.55));
}

/* Tablet: smaller chamfer. */
@media (max-width: 1024px) {
  .lb-nav-card {
    padding: 7px 0;
    clip-path: polygon(
      10px 0,
      calc(100% - 10px) 0,
      100% 10px,
      100% calc(100% - 10px),
      calc(100% - 10px) 100%,
      10px 100%,
      0 calc(100% - 10px),
      0 10px
    );
  }
}

/* Mobile: tighter still. */
@media (max-width: 640px) {
  .lb-nav-card {
    padding: 6px 0;
    clip-path: polygon(
      8px 0,
      calc(100% - 8px) 0,
      100% 8px,
      100% calc(100% - 8px),
      calc(100% - 8px) 100%,
      8px 100%,
      0 calc(100% - 8px),
      0 8px
    );
  }
}

/* Inner content row — content centers naturally inside the capped-width card. */
.lb-nav-inner {
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
@media (max-width: 640px) {
  .lb-nav-inner { padding: 0 12px; gap: 8px; }
}

/* Brand row — original logo restored via Tailwind utilities in markup.
   The whole brand area is treated as a logo: clickable, but the wordmark
   itself is not selectable (no caret/double-click highlight) so it reads
   as a unit, not as text. The <a> remains keyboard-focusable. */
.lb-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
  cursor: pointer;
}

/* Wordmark — unselectable so drags don't highlight letter-by-letter. */
.lb-brand-text {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
}

/* Links */
.lb-nav-links {
  display: none;
  align-items: center;
  gap: 6px;
}
@media (min-width: 768px) {
  .lb-nav-links { display: inline-flex; }
}
.lb-nav-link {
  position: relative;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 4px 9px;
  text-decoration: none;
  transition: color 0.18s ease;
}
.lb-nav-link:hover,
.lb-nav-link:focus-visible { color: #ffffff; outline: none; }
.lb-nav-link::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.0), rgba(220, 38, 38, 0.85), rgba(220, 38, 38, 0.0));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}
.lb-nav-link:hover::after,
.lb-nav-link:focus-visible::after { transform: scaleX(1); }

.lb-nav-bullet {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: rgba(220, 38, 38, 0.7);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.6));
}

/* Actions */
.lb-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lb-nav-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.18), transparent);
  margin: 0 4px;
}
.lb-nav-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.lb-nav-ghost:hover,
.lb-nav-ghost:focus-visible {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
  outline: none;
}
.lb-nav-ghost--mute { color: #94a3b8; }
.lb-nav-ghost--mute:hover { color: #fff; }

.lb-nav-userpill {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hex-edged primary CTA — angular, ninja. */
.lb-nav-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff;
  padding: 7px 18px;
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #ef4444 100%);
  border: 0;
  cursor: pointer;
  /* Slanted left + right edges, like an angular hex pill. */
  clip-path: polygon(8% 0%, 100% 0%, 92% 100%, 0% 100%);
  transition: filter 0.18s ease, transform 0.18s ease;
}
.lb-nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.lb-nav-cta:hover {
  filter: brightness(1.12) drop-shadow(0 0 14px rgba(220, 38, 38, 0.55));
  transform: translateY(-1px);
}
.lb-nav-cta:hover::before { transform: translateX(110%); }
.lb-nav-cta:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.75);
  outline-offset: 2px;
}

/* Globe canvas reset */
#globe canvas { display: block; }

/* Hide the globe until three-globe has finished loading the diffuse
   texture. Without this the WebGL canvas paints its default white sphere
   for ~200–800 ms while the earth-night.jpg downloads, which reads as a
   white flicker. globe.js adds `.is-ready` via onGlobeReady. */
#globe {
  opacity: 0;
  transition: opacity 0.55s ease-out;
}
#globe.is-ready { opacity: 1; }

/* Globe is positioned absolute inside the hero section. We confine it to
   the middle ~60% so the left/right gutters give the user clear space to
   scroll the page (and to give the hero copy more breathing room). */
#globe {
  left: 18%;
  right: 18%;
}
@media (max-width: 1280px) { #globe { left: 12%; right: 12%; } }
@media (max-width: 1024px) { #globe { left: 8%;  right: 8%;  } }
@media (max-width: 640px)  { #globe { left: 4%;  right: 4%;  } }

/* ── Globe pin (HTML element placed on lat/lng) ──────────────────── */
.lb-pin { pointer-events: none; }
.lb-pin-anchor {
  position: relative;
  transform: translate(-50%, -100%);
}
.lb-pin-core {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff, #ef4444 55%, #b91c1c);
  box-shadow:
    0 0 20px rgba(239, 68, 68, 0.95),
    0 0 70px rgba(220, 38, 38, 0.55);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.lb-pin-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(239, 68, 68, 0.6);
  transform: translate(-50%, -50%);
  animation: lb-pin-pulse 1.8s ease-out infinite;
  transition: border-color 0.4s ease;
}
@keyframes lb-pin-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}
/* Scanning state: pin glows cyan to match the rings/atmosphere. */
body.lb-scanning .lb-pin-core {
  background: radial-gradient(circle, #ffffff, #22d3ee 55%, #0e7490);
  box-shadow:
    0 0 20px rgba(34, 211, 238, 0.95),
    0 0 70px rgba(34, 211, 238, 0.55);
}
body.lb-scanning .lb-pin-pulse {
  border-color: rgba(34, 211, 238, 0.7);
}

/* ── Scan halo (HUD overlay anchored at the target lat/lng) ──────── */
.lb-scan-halo { pointer-events: none; user-select: none; }
.lb-scan-halo-anchor {
  position: relative;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
}
.lb-scan-halo-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.40) 0%,
    rgba(34, 211, 238, 0.15) 28%,
    rgba(34, 211, 238, 0.04) 55%,
    transparent 75%
  );
  mix-blend-mode: screen;
  animation: lb-halo-glow 2.6s ease-in-out infinite;
  filter: blur(2px);
}
.lb-scan-halo-ring {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35) inset;
  animation: lb-halo-expand 1.7s ease-out infinite;
  transform-origin: center;
  opacity: 0;
}
.lb-scan-halo-ring.is-mid {
  animation-duration: 2.2s;
  animation-delay: 0.5s;
  border-color: rgba(125, 211, 252, 0.55);
}
.lb-scan-halo-ring.is-slow {
  animation-duration: 2.9s;
  animation-delay: 1s;
  border-color: rgba(34, 211, 238, 0.32);
}
.lb-scan-halo-cross {
  position: absolute;
  inset: 8%;
  pointer-events: none;
  opacity: 0.55;
}
.lb-scan-halo-cross::before,
.lb-scan-halo-cross::after {
  content: '';
  position: absolute;
}
.lb-scan-halo-cross::before {
  left: 0; right: 0; top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 211, 238, 0.7) 50%, transparent 100%);
}
.lb-scan-halo-cross::after {
  top: 0; bottom: 0; left: 50%; width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(34, 211, 238, 0.7) 50%, transparent 100%);
}
.lb-scan-halo-ticks {
  position: absolute;
  inset: 6%;
  animation: lb-halo-spin 14s linear infinite;
}
.lb-scan-halo-ticks span {
  position: absolute;
  width: 10px;
  height: 1px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.95));
  top: 50%;
  left: 50%;
  transform-origin: 0 50%;
}
.lb-scan-halo-ticks span:nth-child(1) { transform: rotate(0deg)   translateX(108px); }
.lb-scan-halo-ticks span:nth-child(2) { transform: rotate(45deg)  translateX(108px); }
.lb-scan-halo-ticks span:nth-child(3) { transform: rotate(90deg)  translateX(108px); }
.lb-scan-halo-ticks span:nth-child(4) { transform: rotate(135deg) translateX(108px); }
.lb-scan-halo-ticks span:nth-child(5) { transform: rotate(180deg) translateX(108px); }
.lb-scan-halo-ticks span:nth-child(6) { transform: rotate(225deg) translateX(108px); }
.lb-scan-halo-ticks span:nth-child(7) { transform: rotate(270deg) translateX(108px); }
.lb-scan-halo-ticks span:nth-child(8) { transform: rotate(315deg) translateX(108px); }

/* Sweeping radar arm — a thin cyan wedge that rotates around the target. */
.lb-scan-halo-sweep {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(34, 211, 238, 0.55) 0deg,
    rgba(34, 211, 238, 0.25) 18deg,
    rgba(34, 211, 238, 0.06) 36deg,
    transparent 60deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(circle, transparent 0%, transparent 30%, black 35%, black 100%);
          mask: radial-gradient(circle, transparent 0%, transparent 30%, black 35%, black 100%);
  animation: lb-halo-sweep 3.2s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.85;
}

@keyframes lb-halo-glow {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes lb-halo-expand {
  0%   { transform: scale(0.45); opacity: 1; }
  80%  { opacity: 0.4; }
  100% { transform: scale(1.65); opacity: 0; }
}
@keyframes lb-halo-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes lb-halo-sweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Scan tooltip (floats above the pin during step 3) ───────────── */
.lb-scan-tip {
  position: relative;
  transform: translate(-50%, calc(-100% - 26px));
  pointer-events: none;
  user-select: none;
  z-index: 5;
  animation: lb-scan-tip-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lb-scan-tip-card {
  background: rgba(8, 9, 12, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 0.5rem;
  padding: 9px 12px 10px;
  min-width: 220px;
  max-width: 280px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 12.5px;
  color: #e2e8f0;
  box-shadow:
    0 0 28px rgba(34, 211, 238, 0.22),
    0 12px 36px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lb-scan-tip-row1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #67e8f9;
}
.lb-scan-tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px #22d3ee;
  animation: lb-scan-dot-pulse 1.4s ease-in-out infinite;
  flex: 0 0 auto;
}
@keyframes lb-scan-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.45); opacity: 0.55; }
}
.lb-scan-tip-row2 {
  margin-top: 6px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-scan-tip-row2 .lb-scan-tip-niche { color: #f87171; font-weight: 600; }
.lb-scan-tip-row2 .lb-scan-tip-location { color: #ffffff; font-weight: 600; }
.lb-scan-tip-row2 .lb-scan-tip-sep { color: #64748b; margin: 0 4px; }
.lb-scan-tip-row3 {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11.5px;
}
.lb-scan-tip-row3 .lb-scan-tip-count {
  color: #67e8f9;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.lb-scan-tip-row3 .lb-scan-tip-sep { color: #64748b; }
.lb-scan-tip-tail {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 26px;
  background: linear-gradient(to bottom, rgba(34, 211, 238, 0.75), transparent);
  transform: translateX(-50%);
}
@keyframes lb-scan-tip-in {
  from { opacity: 0; transform: translate(-50%, calc(-100% - 26px)) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, calc(-100% - 26px)) scale(1); }
}

/* Done state — switch the accent to a "strike complete" green. */
.lb-scan-tip.is-done .lb-scan-tip-card {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow:
    0 0 28px rgba(34, 197, 94, 0.22),
    0 12px 36px rgba(0, 0, 0, 0.55);
}
.lb-scan-tip.is-done .lb-scan-tip-row1 { color: #86efac; }
.lb-scan-tip.is-done .lb-scan-tip-dot {
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: none;
}
.lb-scan-tip.is-done .lb-scan-tip-row3 .lb-scan-tip-count { color: #86efac; }
.lb-scan-tip.is-done .lb-scan-tip-tail {
  background: linear-gradient(to bottom, rgba(34, 197, 94, 0.75), transparent);
}

/* Reduced motion — kill the animations, keep the colors. */
@media (prefers-reduced-motion: reduce) {
  .lb-pin-pulse,
  .lb-scan-tip,
  .lb-scan-tip-dot,
  .lb-scan-halo-glow,
  .lb-scan-halo-ring,
  .lb-scan-halo-ticks,
  .lb-scan-halo-sweep { animation: none !important; }
  .lb-scan-halo-ring { opacity: 0.5; }
}

/* ── History row flash ────────────────────────────────────────── */
@keyframes lb-history-flash {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); border-color: rgba(255,255,255,0.10); }
  20%  { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.18); border-color: rgba(34, 211, 238, 0.55); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); border-color: rgba(255,255,255,0.10); }
}
.lb-history-complete-flash {
  animation: lb-history-flash 1.4s ease-out;
}

/* ── Lead table (compact) ─────────────────────────────────────── */
.lb-lead-table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.lb-lead-table-scroll {
  max-height: 60vh;
  overflow: auto;
}
.lb-lead-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.lb-lead-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 9, 12, 0.96);
  backdrop-filter: blur(8px);
  text-align: left;
  font-weight: 500;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #94a3b8;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.lb-lead-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}
.lb-lead-table tbody tr:last-child td { border-bottom: 0; }
.lb-lead-table tbody tr {
  transition: background-color 0.12s ease;
}
.lb-lead-table tbody tr:hover {
  background: rgba(220, 38, 38, 0.06);
}
.lb-lead-table .col-title {
  font-weight: 600;
  color: #f8fafc;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.lb-lead-table .col-cat {
  color: #fca5a5;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-lead-table .col-rating {
  color: #fde68a;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  white-space: nowrap;
  width: 70px;
}
.lb-lead-table .col-rating .reviews {
  color: #94a3b8;
  font-size: 9.5px;
  margin-left: 3px;
}
.lb-lead-table .col-addr {
  color: #cbd5e1;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.lb-lead-table .col-link {
  white-space: nowrap;
  font-size: 10.5px;
}
.lb-lead-link {
  color: #fca5a5;
  text-decoration: none;
  border-bottom: 1px dashed rgba(252, 165, 165, 0.30);
  padding-bottom: 1px;
  font-size: 10.5px;
}
.lb-lead-link:hover {
  color: #fff;
  border-bottom-color: #fff;
}
.lb-lead-table .col-actions {
  display: flex;
  gap: 4px;
}

/* Mobile stack — collapse table on narrow screens */
@media (max-width: 720px) {
  .lb-lead-table thead { display: none; }
  .lb-lead-table tbody td {
    display: block;
    padding: 3px 10px;
    border: 0;
  }
  .lb-lead-table tbody tr {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 8px 0;
  }
  .lb-lead-table tbody tr:last-child { border-bottom: 0; }
  .lb-lead-table .col-title { font-size: 13px; max-width: none; padding-top: 6px; }
  .lb-lead-table .col-addr { max-width: none; white-space: normal; }
  .lb-lead-table .col-cat { max-width: none; }
}

/* ── Pagination ──────────────────────────────────────────────── */
.lb-pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #94a3b8;
  flex-wrap: wrap;
}
.lb-pagination-info {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.lb-pagination-info > span { color: #e2e8f0; }
.lb-pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lb-pg-pagesize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
}
.lb-pg-select {
  appearance: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #e2e8f0;
  padding: 3px 22px 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
  background-size: 12px;
  cursor: pointer;
}
.lb-pg-select:focus { outline: 1px solid rgba(220, 38, 38, 0.5); outline-offset: 1px; }
.lb-pg-btn,
.lb-pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: #cbd5e1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.lb-pg-btn:hover,
.lb-pg-num:hover {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
}
.lb-pg-btn[disabled] {
  opacity: 0.35;
  pointer-events: none;
}
.lb-pg-num.is-active {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.18);
}
.lb-pg-pages {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.lb-pg-ellipsis {
  color: #475569;
  padding: 0 2px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
}
@media (max-width: 480px) {
  .lb-pagination { justify-content: center; }
  .lb-pg-pagesize { display: none; }
}

/* ── History view: same panel, stripped chrome ───────────────── */
/* When the user opens a past run from History, the slide-up panel reuses
   the step-3 markup. We just hide the live-flow chrome (progress bar +
   "Step 3 / 3" indicator) and show a small "Viewing past run" label so
   it's obvious you're looking at a saved record, not a live strike. */
body.lb-history-view #flow-progress-wrap,
body.lb-history-view #flow-step-indicator { display: none !important; }
body.lb-history-view #flow-history-label { display: inline-flex; align-items: center; }

/* ── Toasts ───────────────────────────────────────────────────── */
.lb-toast-host {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.lb-toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 12, 0.94);
  backdrop-filter: blur(12px);
  color: #f1f5f9;
  font-size: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.lb-toast.is-shown {
  transform: translateX(0);
  opacity: 1;
}
.lb-toast-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.lb-toast-icon svg { width: 16px; height: 16px; }
.lb-toast-msg { flex: 1 1 auto; line-height: 1.35; }
.lb-toast-close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}
.lb-toast-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.lb-toast-error {
  border-color: rgba(220, 38, 38, 0.45);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.20), rgba(8, 9, 12, 0.94));
}
.lb-toast-error .lb-toast-icon {
  color: #fda4af;
  background: rgba(220, 38, 38, 0.20);
}
.lb-toast-success {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.18), rgba(8, 9, 12, 0.94));
}
.lb-toast-success .lb-toast-icon {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.18);
}
.lb-toast-info .lb-toast-icon {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.18);
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .stars,
  .animate-bounce-slow {
    animation: none !important;
  }
  .lb-search-modal,
  .lb-search-modal-card,
  .lb-hero-search,
  .lb-buy-modal,
  .lb-buy-modal-card {
    transition-duration: 0s !important;
  }
  .lb-hero-search-text .caret { animation: none !important; }
}

/* ────────────────────────────────────────────────────────────────
   Credits pill (header) + Buy-credits modal
   ──────────────────────────────────────────────────────────────── */

.lb-nav-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(220, 38, 38, 0.06));
  border: 1px solid rgba(220, 38, 38, 0.30);
  padding: 5px 9px 5px 7px;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.lb-nav-credits:hover,
.lb-nav-credits:focus-visible {
  border-color: rgba(220, 38, 38, 0.55);
  filter: brightness(1.1);
  outline: none;
}
.lb-nav-credits-num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lb-nav-credits-label {
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 9px;
}
@media (max-width: 640px) {
  .lb-nav-credits-label { display: none; }
}

/* Lock body scroll while a modal is open. */
html.lb-modal-open,
html.lb-modal-open body { overflow: hidden; }

/* ─── Buy modal ──────────────────────────────────────────────── */
.lb-buy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: lbBuyFadeIn 220ms ease-out;
}
.lb-buy-modal.hidden { display: none; }

.lb-buy-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 8, 0.72);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
}

.lb-buy-modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #0c0e14 0%, #08090c 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.12),
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 12px 30px -12px rgba(220, 38, 38, 0.18);
  animation: lbBuyPop 240ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
}

@keyframes lbBuyFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes lbBuyPop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lb-buy-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lb-buy-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 30px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.lb-buy-close:hover {
  color: #fff;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
}

.lb-buy-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

.lb-buy-pack {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}
.lb-buy-pack-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lb-buy-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}
.lb-buy-stepper input {
  width: 56px;
  text-align: center;
  background: transparent;
  border: 0;
  color: #f8fafc;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}
.lb-buy-stepper input::-webkit-outer-spin-button,
.lb-buy-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.lb-buy-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  background: rgba(255, 255, 255, 0.02);
  color: #cbd5e1;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lb-buy-step-btn:hover { background: rgba(220, 38, 38, 0.10); color: #fff; }
.lb-buy-step-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.lb-buy-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}
.lb-buy-summary-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lb-buy-summary-row:last-child { align-items: flex-end; }

.lb-buy-bullets {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}
.lb-buy-bullets li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-buy-checkout-note {
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.04);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #94a3b8;
}

.lb-buy-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
