/* ================================================================
   TraceNet AI — design tokens, glassmorphism, neon, animations
   ================================================================ */

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

html, body {
  background: #05060f;
  color: #e2e8f0;
  scroll-behavior: smooth;
}

/* ----- Ambient backdrop (fixed, fills the viewport) -------------- */
.tn-ambient {
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(168, 85, 247, 0.16), transparent 65%),
    radial-gradient(ellipse 55% 35% at 85% 25%, rgba(34, 211, 238, 0.10), transparent 65%),
    radial-gradient(ellipse 55% 35% at 12% 65%, rgba(236, 72, 153, 0.08), transparent 65%),
    radial-gradient(ellipse 60% 40% at 50% 105%, rgba(52, 211, 153, 0.06), transparent 65%);
}

.tn-grid-bg {
  background-image:
    linear-gradient(rgba(120, 140, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 90%);
}

/* ----- Glassmorphism cards -------------------------------------- */
.tn-glass {
  background: rgba(15, 18, 38, 0.45);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(120, 140, 255, 0.10);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.tn-glass-strong {
  background: rgba(11, 13, 28, 0.78);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(120, 140, 255, 0.16);
}

/* ----- Gradient text -------------------------------------------- */
.tn-gradient-text {
  background: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----- Animated gradient hairline border ------------------------ */
.tn-grad-border {
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(34, 211, 238, 0.55),
    rgba(168, 85, 247, 0.45),
    rgba(236, 72, 153, 0.45)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ----- Hero radial highlight ------------------------------------ */
.tn-hero-radial {
  background:
    radial-gradient(circle at 25% 50%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(circle at 75% 50%, rgba(168, 85, 247, 0.16), transparent 55%);
}

/* ----- Form controls -------------------------------------------- */
.tn-input {
  display: block;
  width: 100%;
  background: rgba(8, 10, 22, 0.65);
  border: 1px solid rgba(120, 140, 255, 0.14);
  color: #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.7rem 0.95rem;
  font-family: inherit;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.tn-input::placeholder { color: rgba(148, 163, 184, 0.45); }
.tn-input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow:
    0 0 0 3px rgba(34, 211, 238, 0.12),
    0 0 14px rgba(34, 211, 238, 0.18);
  background: rgba(8, 10, 22, 0.85);
}
.tn-input:disabled { opacity: 0.6; cursor: not-allowed; }

select.tn-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

/* ----- Buttons -------------------------------------------------- */
.tn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  user-select: none;
}
.tn-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.tn-btn-primary {
  background: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(34, 211, 238, 0.35),
    0 10px 24px -6px rgba(168, 85, 247, 0.45);
}
.tn-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(34, 211, 238, 0.6),
    0 14px 32px -8px rgba(168, 85, 247, 0.65);
}

.tn-btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  color: #e2e8f0;
  border-color: rgba(120, 140, 255, 0.18);
}
.tn-btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(120, 140, 255, 0.38);
  color: #ffffff;
}

/* ----- Animations ---------------------------------------------- */
@keyframes tn-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.tn-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: tn-shimmer 3s linear infinite;
}

@keyframes tn-floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.tn-float { animation: tn-floaty 4s ease-in-out infinite; }

@keyframes tn-marker-pulse {
  0%   { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ----- Custom scrollbar ---------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(8, 10, 22, 0.5); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.55), rgba(168, 85, 247, 0.55));
  border-radius: 10px;
  border: 2px solid rgba(8, 10, 22, 0.5);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.85), rgba(168, 85, 247, 0.85));
}

/* ----- Map sizing (NOT dependent on Tailwind JIT) -------------- */
/*
   Pinned dimensions for the Leaflet container so the map has
   a real height the moment React mounts — even before the
   Tailwind CDN's runtime has injected its JIT classes.
*/
.tn-map-canvas {
  display: block;
  width: 100%;
  height: 62vh;
  min-height: 440px;
  position: relative;
}
@media (min-width: 1024px) {
  .tn-map-canvas {
    height: 70vh;
    min-height: 560px;
  }
}

/* ----- Leaflet dark-theme overrides ---------------------------- */
.leaflet-container {
  background: #050614 !important;
  font-family: "Space Grotesk", system-ui, sans-serif !important;
  /* baseline so the map is never collapsed even if container fails */
  min-height: 200px;
  outline: none;
}
.leaflet-pane,
.leaflet-tile-container,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  /* Leaflet relies on these being unmodified — guard against
     accidental global resets from frameworks/CDNs. */
  box-sizing: content-box !important;
}
.leaflet-control-attribution {
  background: rgba(11, 13, 28, 0.7) !important;
  color: rgba(148, 163, 184, 0.55) !important;
  font-size: 9px !important;
  border: 1px solid rgba(120, 140, 255, 0.10) !important;
  border-radius: 6px;
  padding: 2px 6px !important;
}
.leaflet-control-attribution a { color: #67e8f9 !important; }

.leaflet-bar,
.leaflet-bar a {
  background: rgba(11, 13, 28, 0.85) !important;
  color: #e2e8f0 !important;
  border-color: rgba(120, 140, 255, 0.20) !important;
  backdrop-filter: blur(8px);
}
.leaflet-bar a:hover {
  background: rgba(34, 211, 238, 0.18) !important;
  color: #67e8f9 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(11, 13, 28, 0.95) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(120, 140, 255, 0.22) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(34, 211, 238, 0.12) !important;
}
.leaflet-popup-content-wrapper { border-radius: 12px !important; }
.leaflet-popup-content { font-family: inherit !important; margin: 12px 16px !important; line-height: 1.4 !important; }
.leaflet-popup-close-button { color: #94a3b8 !important; font-size: 18px !important; padding: 6px 8px !important; }
.leaflet-popup-close-button:hover { color: #e2e8f0 !important; }

/* Custom div marker */
.tn-marker-icon { background: transparent !important; border: none !important; }

.tn-mk {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: var(--c, #22d3ee);
}
.tn-mk:hover { transform: scale(1.12); }
.tn-mk-dim { opacity: 0.32; }
.tn-mk-dim:hover { opacity: 0.7; }

.tn-mk-core {
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  /*
     Accent-tinted fill so lost/found/recovered are unmistakable
     even at small zoom levels. color-mix is supported in every
     evergreen browser since 2023.
  */
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--c, #22d3ee) 32%, rgba(11, 13, 28, 0.92)),
    rgba(15, 18, 38, 0.95)
  );
  border: 2px solid var(--c, #22d3ee);
  box-shadow:
    0 0 0 2px rgba(11, 13, 28, 0.6),
    0 0 16px var(--c, #22d3ee),
    inset 0 0 8px color-mix(in srgb, var(--c, #22d3ee) 35%, transparent);
}

.tn-mk-pulse {
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  background: var(--c);
  opacity: 0.35;
  animation: tn-marker-pulse 2.2s ease-out infinite;
}

.tn-mk-active .tn-mk-core {
  background: var(--c);
  color: #0a0c1a;
  font-weight: 700;
  box-shadow:
    0 0 0 3px rgba(11, 13, 28, 0.6),
    0 0 22px var(--c),
    0 0 4px rgba(255, 255, 255, 0.6) inset;
  transform: scale(1.15);
}
.tn-mk-active .tn-mk-pulse {
  opacity: 0.55;
  animation-duration: 1.4s;
}

/* Lost: most attention-grabbing of the three.
   Solid bright red fill with white glyph — semantically: urgent.
   This is the visual style used by emergency UIs and is unmistakable
   against the dark map even at small icon sizes. */
.tn-mk-lost .tn-mk-core {
  background: linear-gradient(135deg, #ff8aa3, #e11d48);
  color: #ffffff;
  font-weight: 800;
  border: 2px dashed #fecdd3;
  box-shadow:
    0 0 0 2px rgba(11, 13, 28, 0.7),
    0 0 18px #fb7185,
    0 0 36px rgba(225, 29, 72, 0.55),
    inset 0 0 6px rgba(255, 255, 255, 0.45);
}
.tn-mk-lost {
  filter:
    drop-shadow(0 0 8px rgba(251, 113, 133, 0.7))
    drop-shadow(0 0 18px rgba(225, 29, 72, 0.45));
}
.tn-mk-lost .tn-mk-pulse {
  background: #fb7185;
  opacity: 0.55;
  animation-duration: 1.4s;
}

/* Found: calm — solid ring, slower steadier pulse */
.tn-mk-found .tn-mk-pulse {
  animation-duration: 2.4s;
}

/* Recovered: celebratory gold marker with double ring + ✓ badge */
.tn-mk-recovered {
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
}
.tn-mk-recovered .tn-mk-core {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  color: #2a1700;
  font-weight: 700;
  border-color: #fbbf24;
  border-width: 2px;
  box-shadow:
    0 0 0 2px rgba(11, 13, 28, 0.7),
    0 0 18px #fbbf24,
    inset 0 0 6px rgba(255, 255, 255, 0.55);
}
.tn-mk-recovered .tn-mk-pulse {
  background: #fbbf24;
  opacity: 0.5;
  animation-duration: 1.4s;
}
.tn-mk-recovered .tn-mk-pulse-2 {
  animation-delay: 0.7s;
  opacity: 0.32;
}
.tn-mk-check {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #34d399, #10b981);
  border: 2px solid #0a0c1a;
  font-size: 8px;
  font-weight: 800;
  color: #052e1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

/* ----- Beautiful popup cards ----------------------------------- */
.tn-popup .leaflet-popup-content-wrapper {
  padding: 0 !important;
  background: linear-gradient(180deg, rgba(15, 18, 38, 0.96), rgba(8, 10, 22, 0.96)) !important;
  border: 1px solid rgba(120, 140, 255, 0.25) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(168, 85, 247, 0.18) !important;
  border-radius: 14px !important;
  overflow: hidden;
}
.tn-popup .leaflet-popup-content { margin: 0 !important; padding: 0 !important; width: auto !important; }
.tn-popup .leaflet-popup-tip { background: rgba(15, 18, 38, 0.96) !important; border: 1px solid rgba(120, 140, 255, 0.25) !important; }
.tn-popup .leaflet-popup-close-button {
  color: #94a3b8 !important;
  font-size: 18px !important;
  padding: 8px 10px !important;
  z-index: 5;
}
.tn-popup .leaflet-popup-close-button:hover { color: #f87171 !important; }

.tn-pop { width: 248px; }

.tn-pop-photo {
  position: relative;
  height: 116px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0c1a;
}
.tn-pop-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tn-pop-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 10, 22, 0.9));
  pointer-events: none;
}
.tn-pop-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(8, 10, 22, 0.6));
}
.tn-pop-photo-empty span { font-size: 38px; opacity: 0.55; }

.tn-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px 4px;
}
.tn-pop-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: color-mix(in srgb, var(--c) 18%, transparent);
  color: var(--c);
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c) 35%, transparent);
}
.tn-pop-cat {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.85);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tn-pop-glyph { font-size: 14px; opacity: 0.7; }

.tn-pop-title {
  padding: 4px 14px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: #e8edf7;
  line-height: 1.3;
}
.tn-pop-meta {
  padding: 6px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tn-pop-meta div {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tn-pop-meta span { opacity: 0.7; }
.tn-pop-desc {
  margin: 8px 14px 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tn-pop-meta:last-child { padding-bottom: 12px; }

/* Animated dashed connection lines (targeted via className) */
.leaflet-overlay-pane path.tn-link {
  animation: tn-dash-flow 1.4s linear infinite;
}
@keyframes tn-dash-flow {
  to { stroke-dashoffset: -22; }
}

/* ----- "You Are Here" marker ----------------------------------- */
.tn-you {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tn-you-core {
  position: relative;
  z-index: 3;
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #67e8f9, #22d3ee);
  border: 2px solid #0a0c1a;
  box-shadow:
    0 0 0 2px rgba(34, 211, 238, 0.8),
    0 0 18px rgba(34, 211, 238, 0.95),
    inset 0 0 6px rgba(255, 255, 255, 0.6);
}
.tn-you-ring,
.tn-you-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 9999px;
  border: 2px solid #22d3ee;
  opacity: 0.7;
  animation: tn-you-ring 2.4s ease-out infinite;
  z-index: 1;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}
.tn-you-ring-2 { animation-delay: 1.2s; }
@keyframes tn-you-ring {
  0%   { transform: scale(0.55); opacity: 0.85; }
  70%  { opacity: 0.18; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ----- Claim CTA inside MarkerCard ----------------------------- */
.tn-claim-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(34, 211, 238, 0.14));
  border: 1px solid color-mix(in srgb, var(--c, #a855f7) 40%, rgba(120, 140, 255, 0.18));
  color: #f1f5f9;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}
.tn-claim-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(34, 211, 238, 0.22));
  box-shadow:
    0 0 24px color-mix(in srgb, var(--c, #a855f7) 50%, transparent),
    0 10px 22px rgba(0, 0, 0, 0.5);
}
.tn-claim-cta:disabled { opacity: 0.6; cursor: not-allowed; }
.tn-claim-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 70% 80% at 50% 120%,
    color-mix(in srgb, var(--c, #a855f7) 70%, transparent),
    transparent 70%
  );
  opacity: 0.35;
  z-index: -1;
}

/* ----- Chat ---------------------------------------------------- */
.tn-chat { isolation: isolate; }

.tn-bubble {
  position: relative;
  border-radius: 16px;
  word-break: break-word;
}
.tn-bubble-mine {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.85), rgba(168, 85, 247, 0.85));
  color: #f8fafc;
  border-bottom-right-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 8px 22px -10px rgba(168, 85, 247, 0.55);
}
.tn-bubble-mine::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 14px;
  height: 14px;
  background:
    radial-gradient(
      circle at 0% 0%,
      transparent 14px,
      rgba(168, 85, 247, 0.85) 15px
    );
  pointer-events: none;
}
.tn-bubble-theirs {
  background: rgba(15, 18, 38, 0.7);
  color: #e2e8f0;
  border: 1px solid rgba(120, 140, 255, 0.16);
  border-bottom-left-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ----- Your Uploads dashboard cards ---------------------------- */
.tn-upload-card {
  isolation: isolate;
  border: 1px solid color-mix(in srgb, var(--accent, #a855f7) 22%, rgba(120, 140, 255, 0.10));
  transition: transform 0.25s cubic-bezier(.16,1,.3,1),
              border-color 0.25s ease,
              box-shadow 0.25s ease;
}
.tn-upload-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, #a855f7) 55%, rgba(120, 140, 255, 0.18));
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.6),
    0 0 22px color-mix(in srgb, var(--accent, #a855f7) 28%, transparent);
}
.tn-upload-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}
.tn-upload-card > * { position: relative; z-index: 1; }

/* ----- Smart Match v2 card ------------------------------------ */
.tn-match-card {
  position: relative;
  overflow: hidden;
}
.tn-match-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(251, 113, 133, 0.07), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(52, 211, 153, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.tn-match-card > * { position: relative; z-index: 1; }

.tn-match-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(8, 10, 22, 0.6);
  border: 1.5px solid color-mix(in srgb, var(--c, #22d3ee) 55%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c, #22d3ee) 35%, transparent);
}
.tn-match-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tn-match-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--c) 22%, transparent),
    rgba(8, 10, 22, 0.7)
  );
}
.tn-match-thumb-empty span { font-size: 24px; opacity: 0.7; }
.tn-match-thumb-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.16em;
  font-weight: 700;
  padding: 1.5px 0;
  background: linear-gradient(180deg, transparent, rgba(8, 10, 22, 0.85));
  color: var(--c);
}
.tn-match-arrow {
  font-family: "JetBrains Mono", monospace;
  color: rgba(168, 85, 247, 0.7);
  font-size: 16px;
  font-weight: 700;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6));
  margin: 0 -2px;
}

.tn-match-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, var(--c, #22d3ee) 12%, rgba(15, 18, 38, 0.6));
  color: var(--c, #22d3ee);
  border: 1px solid color-mix(in srgb, var(--c, #22d3ee) 35%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--c, #22d3ee) 20%, transparent);
  white-space: nowrap;
}
.tn-match-stat svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* ----- Marker card (rich React popup) -------------------------- */
.tn-marker-card {
  /* Outer glow + accent gradient border */
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 32px color-mix(in srgb, var(--accent, #22d3ee) 28%, transparent));
}
.tn-marker-card-inner {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 18, 38, 0.96), rgba(8, 10, 22, 0.97));
  border: 1px solid color-mix(in srgb, var(--accent, #22d3ee) 28%, rgba(120, 140, 255, 0.18));
  border-radius: 24px;
  overflow: hidden;
  max-height: inherit;
  isolation: isolate;
}
.tn-marker-card-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent, #22d3ee) 70%, transparent),
    transparent 45%,
    color-mix(in srgb, var(--accent, #22d3ee) 35%, transparent)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}
.tn-marker-card-inner > * { position: relative; z-index: 1; }

/* Subtle scrolling area inside card */
.tn-marker-card-inner ::-webkit-scrollbar { width: 6px; }
.tn-marker-card-inner ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.45), rgba(168, 85, 247, 0.45));
  border-radius: 999px;
}

/* Action buttons (Call / Email / Directions) */
.tn-action-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 11px 8px;
  border-radius: 14px;
  background: rgba(15, 18, 38, 0.55);
  border: 1px solid color-mix(in srgb, var(--c, #22d3ee) 25%, rgba(120, 140, 255, 0.14));
  color: #e2e8f0;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
  overflow: hidden;
  isolation: isolate;
}
.tn-action-btn:hover {
  background: color-mix(in srgb, var(--c, #22d3ee) 14%, rgba(15, 18, 38, 0.7));
  border-color: var(--c, #22d3ee);
  box-shadow:
    0 0 22px color-mix(in srgb, var(--c, #22d3ee) 40%, transparent),
    0 8px 18px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
  color: #fff;
}
.tn-action-btn:active {
  transform: translateY(0);
}
.tn-action-icon {
  color: var(--c, #22d3ee);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c, #22d3ee) 70%, transparent));
}
.tn-action-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  color: rgba(226, 232, 240, 0.88);
  font-weight: 600;
}
.tn-action-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 80% 60% at 50% 110%,
    color-mix(in srgb, var(--c, #22d3ee) 60%, transparent),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}
.tn-action-btn:hover .tn-action-glow { opacity: 0.7; }
.tn-action-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- Location autocomplete dropdown -------------------------- */
.tn-autocomplete {
  background: rgba(11, 13, 28, 0.96);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(120, 140, 255, 0.25);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(34, 211, 238, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  list-style: none;
  margin: 0;
  padding: 4px;
}
.tn-autocomplete::-webkit-scrollbar { width: 6px; }
.tn-autocomplete::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.45), rgba(168, 85, 247, 0.45));
  border-radius: 999px;
  border: 1px solid transparent;
}

/* ----- Misc utility classes ------------------------------------ */
.tn-hero-title { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.05; }

/* line-clamp helpers (Tailwind v3 has these but keep as fallback) */
.tn-line-clamp-1,
.tn-line-clamp-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tn-line-clamp-1 { -webkit-line-clamp: 1; }
.tn-line-clamp-2 { -webkit-line-clamp: 2; }
