
    :root {
      --primary: #1614a8;
      --primary-dark: #0d0b7a;
      --primary-soft: #eef1ff;
      --text: #18304b;
      --muted: #5f6f82;
      --line: #d7e0ef;
      --panel-bg: rgba(255,255,255,.97);
      --shadow: 0 16px 40px rgba(14, 33, 77, .18);
      --radius: 18px;
    }

    * { box-sizing: border-box; }

    html, body {
      height: 100%;
      margin: 0;
      font-family: Arial, sans-serif;
      background: linear-gradient(180deg, #f4f7fe 0%, #eef3fb 100%);
      color: var(--text);
    }

    #map {
      height: 100%;
      width: 100%;
    }

    .panel {
      position: absolute;
      top: 16px;
      left: 16px;
      z-index: 1000;
      width: 420px;
      max-width: calc(100% - 32px);
      background: var(--panel-bg);
      border: 1px solid rgba(22, 20, 168, .12);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: visible;
      backdrop-filter: blur(8px);
    }

    .panel-header {
      padding: 18px 18px 14px;
      background: linear-gradient(135deg, rgba(22, 20, 168, .08) 0%, rgba(22, 20, 168, .02) 100%);
      border-bottom: 1px solid var(--line);
    }

    .brand-logo {
      display: block;
      width: 100%;
      max-width: 220px;
      height: auto;
      margin: 0 0 12px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      background: var(--primary-soft);
      color: var(--primary);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .02em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .panel h1 {
      margin: 0 0 8px;
      font-size: 24px;
      line-height: 1.1;
      color: var(--primary-dark);
    }

    .panel p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    .panel-body {
      padding: 16px 18px 18px;
    }

    .search-row {
      display: flex;
      gap: 10px;
      align-items: flex-start;
    }

    .input-wrap {
      position: relative;
      flex: 1;
    }

    .input-wrap::before {
      content: "📍";
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 15px;
      opacity: .75;
    }

    .panel input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 13px 14px 13px 36px;
      font-size: 14px;
      color: var(--text);
      background: #fff;
      outline: none;
      transition: border-color .15s ease, box-shadow .15s ease;
    }

    .panel input:focus {
      border-color: rgba(22, 20, 168, .45);
      box-shadow: 0 0 0 4px rgba(22, 20, 168, .10);
    }

    .autocomplete-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

   .suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 4000;
  max-height: 180px;
  overflow-y: auto;
  display: none;
}

    .suggestions.open {
      display: block;
    }

    .suggestion-item {
      padding: 10px 12px;
      font-size: 13px;
      line-height: 1.35;
      cursor: pointer;
      border-bottom: 1px solid #eef2ff;
      background: #fff;
    }

    .suggestion-item:last-child {
      border-bottom: 0;
    }

    .suggestion-item:hover,
    .suggestion-item.active {
      background: #f5f7ff;
    }

    .btn {
      border: 0;
      border-radius: 12px;
      padding: 0 14px;
      min-width: 92px;
      height: 46px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      color: #fff;
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      box-shadow: 0 8px 18px rgba(22, 20, 168, .22);
      flex: 0 0 auto;
    }

    .btn.secondary {
      background: #64748b;
      box-shadow: none;
    }

    .helper {
      margin-top: 10px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.45;
    }

    .resultado {
      margin-top: 14px;
      font-size: 14px;
      line-height: 1.5;
    }

    .box {
      border-radius: 14px;
      padding: 14px 15px;
      border: 1px solid #c9d8ff;
      background: linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
    }

    .warn {
      color: #7c2d12;
      background: #ffedd5;
      border: 1px solid #fdba74;
      padding: 8px;
      border-radius: 8px;
    }

    .legend-card {
      margin-top: 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fff;
      overflow: hidden;
    }

    .legend-title {
      padding: 12px 14px;
      font-size: 13px;
      font-weight: 700;
      color: var(--primary-dark);
      background: #f8faff;
      border-bottom: 1px solid var(--line);
    }

    .legend {
      max-height: 190px;
      overflow: auto;
      padding: 10px 14px 12px;
      font-size: 12px;
    }

    .legend-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 8px;
      color: var(--text);
      line-height: 1.35;
    }

    .legend-item:last-child { margin-bottom: 0; }

    .swatch {
      width: 12px;
      height: 12px;
      border-radius: 4px;
      flex: 0 0 auto;
      margin-top: 2px;
      border: 1px solid rgba(0,0,0,.12);
    }

    .footer-note {
      margin-top: 12px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
      text-align: center;
    }

    .startup-alert {
      position: fixed;
      inset: 0;
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(11, 18, 38, .55);
      backdrop-filter: blur(4px);
    }

    .startup-alert[hidden] {
      display: none !important;
    }

    .startup-alert-card {
      width: min(640px, 100%);
      background: #fff;
      border-radius: 22px;
      border: 1px solid rgba(22, 20, 168, .12);
      box-shadow: 0 24px 70px rgba(14, 33, 77, .28);
      overflow: hidden;
    }

    .startup-alert-top {
      padding: 18px 22px 14px;
      background: linear-gradient(135deg, rgba(22, 20, 168, .10) 0%, rgba(22, 20, 168, .03) 100%);
      border-bottom: 1px solid var(--line);
    }

    .startup-alert-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      background: var(--primary-soft);
      color: var(--primary);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .02em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .startup-alert-title {
      margin: 0;
      color: var(--primary-dark);
      font-size: 26px;
      line-height: 1.1;
    }

    .startup-alert-body {
      padding: 20px 22px 18px;
    }

    .startup-alert-body p {
      margin: 0 0 14px;
      font-size: 18px;
      line-height: 1.55;
      color: var(--text);
    }

    .startup-alert-highlight {
      font-weight: 700;
      color: var(--primary-dark);
    }

    .startup-alert-note {
      display: block;
      margin-top: 6px;
      font-size: 14px;
      color: var(--muted);
    }

    .startup-alert-actions {
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding: 0 22px 22px;
    }

    .startup-alert-btn {
      border: 0;
      border-radius: 12px;
      padding: 12px 18px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
    }

    .startup-alert-btn.primary {
      color: #fff;
      background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
      box-shadow: 0 8px 18px rgba(22, 20, 168, .22);
    }

    .startup-alert-btn.secondary {
      color: var(--primary-dark);
      background: #eef2ff;
    }

    .leaflet-popup-content {
      line-height: 1.45;
      margin: 12px 14px;
    }

    .leaflet-control-attribution {
      font-size: 11px;
    }

    .suggestion-item .sug-main {
      display: block;
      color: var(--text);
    }

    .suggestion-item .sug-tag {
      display: inline-block;
      margin-top: 3px;
      font-size: 10px;
      letter-spacing: .4px;
      text-transform: uppercase;
      color: var(--primary);
      background: var(--primary-soft);
      border-radius: 999px;
      padding: 2px 7px;
    }

    /* Control de capas base (esquina inferior derecha) */
    .leaflet-control-layers {
      border: 1px solid rgba(22, 20, 168, .14) !important;
      border-radius: 12px !important;
      box-shadow: 0 8px 22px rgba(14, 33, 77, .16) !important;
      background: rgba(255,255,255,.97) !important;
    }

    .leaflet-control-layers-toggle {
      width: 40px !important;
      height: 40px !important;
      background-size: 22px 22px !important;
    }

    .leaflet-control-layers-expanded {
      padding: 10px 14px 10px 10px !important;
      font-family: Arial, sans-serif;
      font-size: 13px;
      color: var(--text);
    }

    .leaflet-control-layers-expanded label {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 3px 0;
      cursor: pointer;
    }

    @media (max-width: 768px) {
      .panel {
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        max-height: 31vh;
        border-radius: 16px;
      }

      .panel-header {
        padding: 8px 12px 6px;
      }

      .brand-logo {
        max-width: 140px;
        margin: 0 auto 6px;
      }

      .eyebrow {
        margin: 0 auto 4px;
        font-size: 10px;
        padding: 3px 6px;
      }

      .panel-header,
      .panel-body {
        text-align: center;
      }

      .panel h1 {
        font-size: 15px;
        margin-bottom: 2px;
      }

      .panel p {
        display: none;
      }

      .panel-body {
        padding: 8px 12px 10px;
        max-height: calc(31vh - 74px);
        overflow: visible;
      }

      .search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 96px 96px;
        gap: 8px;
        align-items: start;
      }

      .autocomplete-wrap {
        width: 100%;
        min-width: 0;
      }

      .panel input {
        min-height: 44px;
        font-size: 16px;
        padding-top: 12px;
        padding-bottom: 12px;
      }

      .btn {
        min-width: 0;
        width: 100%;
        height: 44px;
        font-size: 13px;
        padding: 0 8px;
      }

      .helper,
      .legend-card,
      .footer-note {
        display: none;
      }

      .resultado {
        margin-top: 8px;
      }

      .suggestions {
        top: calc(100% + 4px);
        z-index: 4000;
        max-height: min(180px, 28vh);
      }

      .suggestion-item {
        font-size: 14px;
        padding: 10px 12px;
        text-align: left;
      }

      .startup-alert {
        padding: 14px;
      }

      .startup-alert-card {
        border-radius: 18px;
      }

      .startup-alert-top {
        padding: 14px 16px 12px;
      }

      .startup-alert-title {
        font-size: 21px;
      }

      .startup-alert-body {
        padding: 16px;
      }

      .startup-alert-body p {
        font-size: 16px;
        line-height: 1.5;
      }

      .startup-alert-actions {
        padding: 0 16px 16px;
        flex-direction: column;
      }

      .startup-alert-btn {
        width: 100%;
        min-height: 46px;
      }
    }

    @media (max-width: 420px) {
      .panel {
        max-height: 29vh;
      }

      .panel-body {
        max-height: calc(29vh - 74px);
      }

      .search-row {
        grid-template-columns: minmax(0, 1fr) 82px 82px;
        gap: 6px;
      }

      .btn {
        font-size: 12px;
        padding: 0 6px;
      }

      .startup-alert-title {
        font-size: 18px;
      }
    }
  
