
    :root {
      --ink: #14282a;
      --paper: #f9f8f4;
      --accent: #bd552e;
      --teal: #14595b;
      --teal-light: #257b7f;
      --gold: #d99b26;
      --renabap-color: #7b2cbf;
      --card-bg: rgba(255, 255, 255, 0.95);
      --card-border: rgba(18, 56, 58, 0.16);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      line-height: 1.6;
      overflow-x: hidden;
    }

    /* MAPA FIJO A PANTALLA COMPLETA TOTAL (100vw x 100vh) */
    #map {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 1;
      background: #c5d4cd;
    }

    /* CAPA DE GLOBO ORTOGRÁFICO 3D (Observable Plot) SINCRONIZADA EN RAPPORT CON MAPLIBRE */
    #plot-globe-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 5;
      display: flex;
      align-items: center;
      justify-content: center;
      /* Exactamente igual al desplazamiento neto del padding de MapLibre (520px izq - 30px der = 490px) */
      padding-left: 490px;
      background: radial-gradient(circle at calc(50% + 245px) 50%, #edf5f3 0%, #d8e5e1 100%);
      pointer-events: none;
      opacity: 1;
      will-change: opacity;
    }
    #plot-globe-overlay.is-hidden {
      opacity: 0 !important;
      pointer-events: none !important;
    }

    .maplibregl-popup {
      z-index: 1000 !important;
      pointer-events: auto !important;
    }
    .maplibregl-popup-content {
      position: relative !important;
      z-index: 1001 !important;
      background: #ffffff !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
      border-radius: 8px !important;
    }
    .maplibregl-marker {
      z-index: 20 !important;
    }
    #plot-globe-stage {
      position: relative;
      pointer-events: auto;
      cursor: grab;
      display: flex;
      align-items: center;
      justify-content: center;
      filter: drop-shadow(0 20px 44px rgba(15, 52, 54, 0.24));
    }
    #plot-globe-stage:active {
      cursor: grabbing;
    }
    #plot-globe-container {
      width: clamp(280px, 44vw, 500px);
      height: clamp(280px, 44vw, 500px);
      max-height: 72vh;
      aspect-ratio: 1 / 1;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, #ffffff 0%, #cbd8da 75%, #14595b 140%);
      transform-origin: 50% 50%;
      will-change: transform;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .globe-hud {
      position: absolute;
      bottom: -68px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
      pointer-events: auto;
    }
    .globe-caption {
      font-size: 0.76rem;
      color: #1f3c3e;
      background: rgba(255,255,255,0.92);
      padding: 4px 12px;
      border-radius: 20px;
      font-weight: 600;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      border: 1px solid rgba(20,89,91,0.18);
    }
    .globe-ref-bar {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      justify-content: center;
    }
    .globe-ref-btn {
      border: 1px solid rgba(20,89,91,0.25);
      background: rgba(255,255,255,0.9);
      color: var(--teal);
      font-size: 0.7rem;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .globe-ref-btn:hover, .globe-ref-btn.primary {
      background: var(--teal);
      color: #fff;
      border-color: var(--teal);
    }
    .globe-ref-btn.primary {
      background: var(--accent);
      border-color: var(--accent);
    }
    @media (max-width: 850px) {
      #plot-globe-overlay {
        padding-left: 0;
        align-items: center;
        justify-content: center;
        background: radial-gradient(circle at 50% 50%, #edf5f3 0%, #d8e5e1 100%);
      }
      #plot-globe-container {
        width: min(78vw, 320px);
        height: min(78vw, 320px);
      }
    }

    /* CONTROLES SUPERIORES FLOTANTES */
    .top-controls {
      position: fixed;
      top: 14px;
      left: 18px;
      right: 18px;
      z-index: 40;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }
    .top-controls.stacked-mode {
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
    }
    .top-controls.stacked-mode .story-nav {
      align-self: flex-start;
    }
    .top-controls.stacked-mode .layer-controls {
      align-self: flex-end;
      box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    }

    .story-nav {
      pointer-events: auto;
      display: flex;
      gap: 5px;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(8px);
      padding: 5px 8px;
      border-radius: 30px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.14);
      font-size: 0.8rem;
      flex-shrink: 0;
      white-space: nowrap;
      border: 1px solid rgba(20, 89, 91, 0.1);
    }
    .story-nav button {
      background: transparent;
      border: none;
      padding: 5px 12px;
      border-radius: 18px;
      cursor: pointer;
      font-weight: 600;
      color: #435e60;
      transition: all 0.2s;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .story-nav button.active, .story-nav button:hover {
      background: var(--teal);
      color: white;
    }

    /* CONTROLES DE CAPAS COMPACTOS Y RESPONSIVOS */
    .layer-controls {
      pointer-events: auto;
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(8px);
      padding: 4px 10px;
      border-radius: 20px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.14);
      font-size: 0.78rem;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
      white-space: nowrap;
      border: 1px solid rgba(20, 89, 91, 0.1);
    }
    .layer-controls label {
      cursor: pointer;
      font-weight: 600;
      color: var(--ink);
      display: inline-flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
      flex-shrink: 0;
      padding: 3px 6px;
      border-radius: 6px;
      transition: background 0.15s ease;
      user-select: none;
    }
    .layer-controls label:hover {
      background: rgba(20, 89, 91, 0.08);
    }
    .layer-controls input[type="checkbox"] {
      cursor: pointer;
      width: 13px;
      height: 13px;
      margin: 0;
      accent-color: var(--teal);
    }

    /* Manejo de etiquetas Dual: Completa vs Compacta */
    .ctrl-content {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
    }
    .txt-full { display: inline; }
    .txt-compact { display: none; }

    /* Modo Compacto dinámico */
    .top-controls.compact-mode .txt-full {
      display: none !important;
    }
    .top-controls.compact-mode .txt-compact {
      display: inline !important;
    }
    .top-controls.compact-mode .layer-controls {
      padding: 3px 8px;
      gap: 5px;
      font-size: 0.75rem;
    }
    .top-controls.compact-mode .story-nav {
      padding: 4px 6px;
      gap: 4px;
    }
    .top-controls.compact-mode .story-nav button {
      padding: 4px 9px;
      font-size: 0.76rem;
    }

    @media (max-width: 1280px) {
      .txt-full { display: none !important; }
      .txt-compact { display: inline !important; }
      .story-nav button { padding: 4px 9px; font-size: 0.76rem; }
      .layer-controls { padding: 3px 8px; gap: 5px; font-size: 0.75rem; }
    }

    /* En Momento 0 (Globo 3D), deshabilitar interacción directa sobre el mapa plano y ocultar controles */
    body.is-step-0 #map {
      pointer-events: none !important;
    }
    body.is-step-0 .maplibregl-ctrl,
    body.is-step-0 .maplibregl-ctrl-attrib,
    body.is-step-0 .maplibregl-ctrl-bottom-right,
    body.is-step-0 .maplibregl-ctrl-bottom-left,
    body.is-step-0 #layer-controls-box,
    body.is-step-0 #map-legend-box,
    body.is-step-1 #layer-controls-box {
      display: none !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }

    /* Ocultar todos los controles flotantes del mapa al entrar en la sección sólida de Diagnóstico por sectores */
    body.is-in-solid-section #map-legend-box,
    body.is-in-solid-section #layer-controls-box,
    body.is-in-solid-section .map-legend,
    body.is-in-solid-section .layer-controls {
      display: none !important;
      opacity: 0 !important;
      pointer-events: none !important;
      visibility: hidden !important;
    }
    body.is-in-solid-section .top-controls {
      opacity: 0 !important;
      pointer-events: none !important;
      transition: opacity 0.3s ease;
    }

    /* LEYENDA DEL MAPA FLOTANTE DINÁMICA Y COLAPSABLE */
    .map-legend {
      position: fixed;
      bottom: 24px;
      right: 20px;
      z-index: 40;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(8px);
      padding: 10px 14px;
      border-radius: 10px;
      font-size: 0.8rem;
      box-shadow: 0 4px 18px rgba(0,0,0,0.15);
      border: 1px solid var(--card-border);
      pointer-events: auto;
      max-width: 290px;
      transition: all 0.3s ease;
    }
    .legend-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      font-weight: 700;
      font-size: 0.82rem;
      color: var(--teal);
    }
    .legend-toggle-btn {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--teal);
      font-size: 0.8rem;
      padding: 0 4px;
    }
    .legend-content { margin-top: 8px; }
    .legend-content.is-collapsed { display: none; }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 8px;
      margin: 5px 0;
      transition: opacity 0.2s;
    }
    .legend-item.dimmed { opacity: 0.25; }
    .legend-item.highlighted { font-weight: 700; color: var(--ink); }
    .legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
    .legend-polygon {
      width: 15px; height: 10px;
      background: rgba(123, 44, 191, 0.4);
      border: 1.5px solid #7b2cbf;
      border-radius: 2px;
      flex-shrink: 0;
    }
    .legend-circle-outline {
      width: 14px; height: 14px;
      border-radius: 50%;
      border-style: dashed;
      border-width: 2px;
      flex-shrink: 0;
    }

    /* CONTENEDOR DE SCROLL: PERMITE AVANZAR CON LA RUEDA SUAVEMENTE */
    #story-scroll {
      position: relative;
      z-index: 10;
      width: 100%;
      pointer-events: none;
    }

    .step {
      min-height: 85vh;
      display: flex;
      align-items: flex-start;
      padding: 85px 24px 40px;
    }

    /* TARJETAS FLOTANTES NÍTIDAS DESDE EL INICIO */
    .step-card {
      pointer-events: auto;
      width: 100%;
      max-width: 480px;
      margin-left: clamp(20px, 4vw, 56px);
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(12px);
      border: 1px solid var(--card-border);
      border-radius: 14px;
      padding: 24px 22px;
      box-shadow: 0 12px 38px rgba(0,0,0,0.14);
      opacity: 0.88;
      transform: scale(0.98);
      transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
      overflow: visible;
      text-align: justify;
    }

    .step.is-active .step-card {
      opacity: 1;
      transform: scale(1);
      border-left: 6px solid var(--teal);
      box-shadow: 0 16px 45px rgba(20, 89, 91, 0.22);
    }

    /* Solo se atenúa suavemente si el usuario arrastra el mapa con el mouse */
    body.is-dragging-map .step-card {
      opacity: 0.32 !important;
      transform: scale(0.97);
    }

    .step-num {
      display: inline-block;
      font-size: 0.74rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: #a33e19;
      margin-bottom: 4px;
      text-align: left;
    }
    .step-card em {
      color: #334e50;
      font-style: italic;
    }
    .step-card h1,
    .step-card h2,
    .step-card h3 {
      text-align: left;
    }
    .step-card h2 {
      margin: 0 0 10px;
      font-size: 1.55rem;
      line-height: 1.2;
      color: var(--teal);
    }
    .step-card h3 {
      font-size: 1.3rem;
      color: var(--teal);
      margin: 0 0 10px;
      line-height: 1.25;
    }
    .step-card p {
      margin: 0 0 10px;
      font-size: 0.96rem;
      color: #243638;
      line-height: 1.5;
      text-align: justify;
      hyphens: auto;
    }
    .step-card ul {
      text-align: justify;
    }

    /* Etiquetas SEO & Enlaces Internos SXO */
    .seo-tags-block {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 10px 0 8px;
    }
    .tag-pill {
      font-size: 0.72rem;
      font-weight: 600;
      color: #14595b;
      background: #eef6f5;
      border: 1px solid rgba(20, 89, 91, 0.22);
      border-radius: 12px;
      padding: 3px 8px;
      white-space: nowrap;
      text-decoration: none;
      display: inline-block;
      transition: background 0.2s, color 0.2s;
    }
    .tag-pill:hover {
      background: #14595b;
      color: #ffffff;
    }
    .internal-link {
      color: #14595b;
      text-decoration: underline;
      text-underline-offset: 3px;
      font-weight: 600;
      transition: color 0.2s;
    }
    .internal-link:hover {
      color: #bd552e;
    }

    /* Filas de estadísticas */
    .stat-row {
      display: flex;
      gap: 12px;
      margin: 14px 0;
      flex-wrap: wrap;
    }
    .stat-item {
      flex: 1;
      min-width: 120px;
      background: #f0f5f3;
      border-radius: 6px;
      padding: 10px 12px;
      border-left: 3px solid var(--teal-light);
    }
    .stat-val {
      font-size: 1.7rem;
      font-weight: 800;
      color: var(--teal);
      line-height: 1.1;
    }
    .stat-lbl {
      font-size: 0.76rem;
      color: #4e6b6d;
      line-height: 1.25;
    }

    /* Tabla comparativa compacta */
    .compare-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.8rem;
      margin: 12px 0;
      background: white;
      border-radius: 6px;
      overflow: hidden;
      border: 1px solid #dde5e1;
    }
    .compare-table th, .compare-table td {
      padding: 7px 10px;
      text-align: right;
      border-bottom: 1px solid #eef2f0;
    }
    .compare-table th:first-child, .compare-table td:first-child { text-align: left; }
    .compare-table th { background: #e9f1ed; color: var(--teal); font-weight: 700; }
    .compare-table tr:last-child td { font-weight: bold; background: #f7faf8; }

    .chart-container {
      background: white;
      border-radius: 6px;
      padding: 10px;
      margin: 10px 0;
      border: 1px solid #e1e7e4;
      position: relative;
      height: 185px;
    }

    /* Tarjeta transmedia */
    .transmedia-box {
      background: #eef6f4;
      border-radius: 8px;
      padding: 14px;
      margin: 12px 0;
      border: 1px dashed var(--teal-light);
    }
    .media-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      background: var(--teal);
      color: white;
      font-size: 0.72rem;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 700;
      margin-bottom: 6px;
    }
    .btn-preview {
      background: #bd552e;
      color: white;
      border: none;
      border-radius: 6px;
      padding: 7px 14px;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
      transition: background 0.2s;
    }
    .btn-preview:hover { background: #9d3f1c; }

    /* MODAL DEL REEL VERTICAL */
    #reel-modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0,0,0,0.82);
      z-index: 1000;
      justify-content: center;
      align-items: center;
      backdrop-filter: blur(8px);
    }
    .reel-container {
      position: relative;
      width: min(480px, 90vw, calc((90dvh - 64px) * 5 / 9));
      height: auto;
      max-height: 90dvh;
      background: #111;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.6);
      display: flex;
      flex-direction: column;
      border: 2px solid #333;
    }
    .reel-header {
      padding: 14px 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: #172526;
      color: white;
      font-size: 0.85rem;
      position: relative;
      flex: 0 0 auto;
      z-index: 2;
    }
    .close-reel {
      background: rgba(255,255,255,0.25);
      border: none;
      color: white;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      cursor: pointer;
      font-weight: bold;
    }
    .reel-screen {
      width: 100%;
      aspect-ratio: 5 / 9;
      background: #000;
      min-height: 0;
    }
    .reel-screen video {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
    .reel-footer {
      padding: 16px;
      background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      color: white;
      font-size: 0.8rem;
    }

    /* SECCIÓN INFERIOR COMPLETA */
    .section-solid {
      position: relative;
      z-index: 20;
      background: var(--paper);
      padding: 70px 24px 80px;
      box-shadow: 0 -12px 35px rgba(0,0,0,0.12);
      content-visibility: auto;
      contain-intrinsic-size: 2000px;
    }
    .container-boxed {
      max-width: 1050px;
      margin: 0 auto;
    }
    .groups-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 16px;
      margin: 24px 0 40px;
    }
    .group-card {
      background: white;
      border: 1px solid #dae3df;
      border-radius: 10px;
      padding: 16px;
      box-shadow: 0 4px 14px rgba(0,0,0,0.03);
    }
    .group-card strong {
      display: block;
      color: var(--teal);
      font-size: 1rem;
      margin-bottom: 4px;
    }
    .group-stat {
      font-size: 1.55rem;
      font-weight: 800;
      color: var(--accent);
      line-height: 1.1;
      margin-bottom: 4px;
    }

    /* Buscador y lista de Puntos Digitales */
    .search-panel {
      background: white;
      border: 1px solid #d4ded9;
      border-radius: 14px;
      padding: 28px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    }
    .search-input {
      width: 100%;
      max-width: 480px;
      padding: 12px 16px;
      font-size: 1rem;
      border: 1px solid #9fb3b1;
      border-radius: 6px;
      margin: 8px 0 16px;
    }
    .points-list {
      list-style: none;
      padding: 0;
      margin: 0;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
      gap: 14px;
    }
    .point-card {
      background: #fafbfa;
      border: 1px solid #e1e7e4;
      border-radius: 8px;
      padding: 14px 16px;
      cursor: pointer;
      transition: all 0.25s ease;
      position: relative;
    }
    .point-card:hover {
      border-color: var(--teal);
      transform: translateY(-2px);
      box-shadow: 0 6px 18px rgba(20, 89, 91, 0.12);
    }
    .point-card.is-highlighted {
      border-color: var(--accent) !important;
      background: #fff8f5 !important;
      box-shadow: 0 0 0 3px rgba(189, 85, 46, 0.25) !important;
      transition: all 0.3s ease;
    }
    .point-card-btn {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 11px;
      background: #eef6f5;
      color: var(--teal);
      border: 1px solid rgba(20, 89, 91, 0.25);
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .point-card:hover .point-card-btn {
      background: var(--teal);
      color: #ffffff;
    }
    .point-status-tag {
      display: inline-block;
      font-size: 0.72rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 4px;
      margin-bottom: 6px;
    }
    .tag-case { background: #feebe8; color: #a13916; }
    .tag-grantuc { background: rgba(42, 131, 135, 0.14); color: #166468; border: 1px solid rgba(42, 131, 135, 0.28); }
    .tag-historic { background: #fef0d8; color: #8f5807; }

    /* Botón flotante inferior para volver al padrón tras inspeccionar sede */
    .floating-return-btn {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      z-index: 999;
      background: rgba(20, 89, 91, 0.96);
      backdrop-filter: blur(10px);
      color: #ffffff;
      padding: 10px 18px;
      border-radius: 30px;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
      border: 1px solid rgba(255, 255, 255, 0.2);
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 0.86rem;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
      opacity: 0;
      pointer-events: none;
    }
    .floating-return-btn.is-visible {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
      pointer-events: auto;
    }
    .floating-return-btn button {
      background: var(--gold);
      color: #14282a;
      border: none;
      padding: 6px 14px;
      border-radius: 20px;
      font-weight: 700;
      font-size: 0.82rem;
      cursor: pointer;
      transition: background 0.2s, transform 0.15s;
    }
    .floating-return-btn button:hover {
      background: #e5a730;
      transform: scale(1.03);
    }

    /* Epicentro: Marcador pulsante en Banda del Río Salí */
    @keyframes epicentroPulse {
      0% { transform: scale(0.9); opacity: 0.9; }
      50% { transform: scale(1.9); opacity: 0.25; }
      100% { transform: scale(2.6); opacity: 0; }
    }
    .epicentro-marker {
      position: relative;
      width: 26px;
      height: 26px;
      cursor: pointer;
    }
    .epicentro-pulse {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: rgba(189, 85, 46, 0.6);
      animation: epicentroPulse 2.2s infinite ease-out;
      pointer-events: none;
    }
    .epicentro-core {
      position: absolute;
      top: 4px;
      left: 4px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #bd552e;
      border: 2.5px solid #ffffff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    }

    /* ETIQUETAS DE MUNICIPIOS DEL GRAN TUCUMÁN (MOMENTO 3): BOCADILLO + FLECHA + PUNTO DE ANCLAJE ANTISOLAPAMIENTO */
    .localidad-marker {
      display: none;
      position: relative;
      width: 0;
      height: 0;
      pointer-events: auto;
      cursor: pointer;
      user-select: none;
      z-index: 18;
      transition: opacity 0.3s ease;
    }
    .localidad-marker:hover {
      z-index: 60 !important;
    }

    /* CONTENEDOR DEL BOCADILLO */
    .localidad-callout {
      position: absolute;
      display: flex;
      pointer-events: auto;
      transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.25, 1, 0.5, 1);
      white-space: nowrap;
    }

    /* PASTILLA TIPOGRÁFICA */
    .localidad-marker-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 255, 255, 0.97);
      border: 1.5px solid var(--teal);
      border-radius: 18px;
      padding: 3px 9px 3px 7px;
      box-shadow: 0 4px 14px rgba(15, 52, 54, 0.22);
      white-space: nowrap;
      color: #14383a;
      font-weight: 700;
      font-size: 0.78rem;
      letter-spacing: 0.01em;
      line-height: 1.2;
      transition: box-shadow 0.2s ease, transform 0.2s ease;
    }
    .localidad-marker:hover .localidad-marker-pill {
      box-shadow: 0 7px 20px rgba(15, 52, 54, 0.34);
    }
    .localidad-marker.is-capital .localidad-marker-pill {
      background: #14595b;
      color: #ffffff;
      border: 1.5px solid #0a2d2e;
      font-size: 0.85rem;
      padding: 4px 11px 4px 9px;
      box-shadow: 0 5px 18px rgba(20, 89, 91, 0.42);
    }
    .localidad-marker.is-epicentro .localidad-marker-pill {
      background: #fff6e5;
      color: #8c3b1e;
      border: 1.5px solid var(--accent);
      font-weight: 800;
    }
    .localidad-marker-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--teal);
      flex-shrink: 0;
    }
    .localidad-marker.is-capital .localidad-marker-dot {
      background: var(--gold);
      box-shadow: 0 0 6px rgba(217, 155, 38, 0.9);
    }
    .localidad-marker.is-epicentro .localidad-marker-dot {
      background: var(--accent);
    }
    .localidad-marker-badge {
      display: inline-block;
      font-size: 0.64rem;
      font-weight: 800;
      text-transform: uppercase;
      padding: 1px 5px;
      border-radius: 6px;
      background: rgba(20, 89, 91, 0.12);
      color: var(--teal);
      margin-left: 2px;
      letter-spacing: 0.04em;
    }
    .localidad-marker.is-capital .localidad-marker-badge {
      background: rgba(255, 255, 255, 0.25);
      color: #fff;
    }
    .localidad-marker.is-epicentro .localidad-marker-badge {
      background: rgba(189, 85, 46, 0.15);
      color: var(--accent);
    }

    /* FLECHA / AGUJA INDICADORA */
    .localidad-callout-stem {
      width: 0;
      height: 0;
      flex-shrink: 0;
      transition: border-color 0.2s ease;
    }
    .localidad-marker.is-capital .localidad-callout-stem {
      border-top-color: #14595b !important;
      border-bottom-color: #14595b !important;
      border-left-color: #14595b !important;
      border-right-color: #14595b !important;
    }
    .localidad-marker.is-epicentro .localidad-callout-stem {
      border-top-color: var(--accent) !important;
      border-bottom-color: var(--accent) !important;
      border-left-color: var(--accent) !important;
      border-right-color: var(--accent) !important;
    }

    /* DIRECCIONES DE POSICIONAMIENTO ANTISOLAPAMIENTO */
    /* 1. Arriba centrado */
    .localidad-marker.pos-top .localidad-callout {
      flex-direction: column;
      align-items: center;
      bottom: 7px;
      left: 0;
      transform: translateX(-50%);
    }
    .localidad-marker.pos-top .localidad-callout-stem {
      order: 2;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid var(--teal);
      margin-top: -1px;
    }
    .localidad-marker.pos-top:hover .localidad-callout {
      transform: translateX(-50%) translateY(-3px);
    }

    /* 2. Abajo centrado */
    .localidad-marker.pos-bottom .localidad-callout {
      flex-direction: column;
      align-items: center;
      top: 7px;
      left: 0;
      transform: translateX(-50%);
    }
    .localidad-marker.pos-bottom .localidad-callout-stem {
      order: -1;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-bottom: 6px solid var(--teal);
      margin-bottom: -1px;
    }
    .localidad-marker.pos-bottom:hover .localidad-callout {
      transform: translateX(-50%) translateY(3px);
    }

    /* 3. Arriba a la derecha */
    .localidad-marker.pos-top-right .localidad-callout {
      flex-direction: column;
      align-items: flex-start;
      bottom: 7px;
      left: 3px;
      transform: none;
    }
    .localidad-marker.pos-top-right .localidad-callout-stem {
      order: 2;
      margin-left: 7px;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid var(--teal);
      margin-top: -1px;
    }
    .localidad-marker.pos-top-right:hover .localidad-callout {
      transform: translateY(-3px);
    }

    /* 4. Arriba a la izquierda */
    .localidad-marker.pos-top-left .localidad-callout {
      flex-direction: column;
      align-items: flex-end;
      bottom: 7px;
      right: 3px;
      transform: none;
    }
    .localidad-marker.pos-top-left .localidad-callout-stem {
      order: 2;
      margin-right: 7px;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid var(--teal);
      margin-top: -1px;
    }
    .localidad-marker.pos-top-left:hover .localidad-callout {
      transform: translateY(-3px);
    }

    /* 5. Abajo a la derecha */
    .localidad-marker.pos-bottom-right .localidad-callout {
      flex-direction: column;
      align-items: flex-start;
      top: 7px;
      left: 3px;
      transform: none;
    }
    .localidad-marker.pos-bottom-right .localidad-callout-stem {
      order: -1;
      margin-left: 7px;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-bottom: 6px solid var(--teal);
      margin-bottom: -1px;
    }
    .localidad-marker.pos-bottom-right:hover .localidad-callout {
      transform: translateY(3px);
    }

    /* 6. Abajo a la izquierda */
    .localidad-marker.pos-bottom-left .localidad-callout {
      flex-direction: column;
      align-items: flex-end;
      top: 7px;
      right: 3px;
      transform: none;
    }
    .localidad-marker.pos-bottom-left .localidad-callout-stem {
      order: -1;
      margin-right: 7px;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-bottom: 6px solid var(--teal);
      margin-bottom: -1px;
    }
    .localidad-marker.pos-bottom-left:hover .localidad-callout {
      transform: translateY(3px);
    }

    /* 7. Derecha */
    .localidad-marker.pos-right .localidad-callout {
      flex-direction: row;
      align-items: center;
      top: 0;
      left: 7px;
      transform: translateY(-50%);
    }
    .localidad-marker.pos-right .localidad-callout-stem {
      order: -1;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-right: 6px solid var(--teal);
      margin-right: -1px;
    }
    .localidad-marker.pos-right:hover .localidad-callout {
      transform: translateY(-50%) translateX(3px);
    }

    /* 8. Izquierda */
    .localidad-marker.pos-left .localidad-callout {
      flex-direction: row;
      align-items: center;
      top: 0;
      right: 7px;
      transform: translateY(-50%);
    }
    .localidad-marker.pos-left .localidad-callout-stem {
      order: 2;
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
      border-left: 6px solid var(--teal);
      margin-left: -1px;
    }
    .localidad-marker.pos-left:hover .localidad-callout {
      transform: translateY(-50%) translateX(-3px);
    }

    /* MODO COMPACTO CUANDO HAY SOLAPAMIENTO CRÍTICO */
    .localidad-marker.is-compact .localidad-callout {
      opacity: 0;
      transform: scale(0.6) !important;
      pointer-events: none;
    }
    .localidad-marker.is-compact:hover .localidad-callout {
      opacity: 1 !important;
      transform: scale(1) !important;
      pointer-events: auto;
      z-index: 100;
    }
    .localidad-marker.is-compact .localidad-anchor-core {
      transform: translate(-50%, -50%) scale(1.25);
      box-shadow: 0 0 10px rgba(20, 89, 91, 0.85);
    }

    /* PUNTO DE ANCLAJE EXACTO SOBRE LAS COORDENADAS [X] */
    .localidad-anchor-point {
      position: absolute;
      top: 0;
      left: 0;
      width: 0;
      height: 0;
      cursor: pointer;
    }
    .localidad-anchor-hitarea {
      position: absolute;
      top: 0;
      left: 0;
      width: 28px;
      height: 28px;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      cursor: pointer;
      z-index: 12;
    }
    .localidad-anchor-core {
      position: absolute;
      top: 0;
      left: 0;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--teal);
      border: 2px solid #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
      transform: translate(-50%, -50%);
      z-index: 4;
      transition: transform 0.22s ease, box-shadow 0.22s ease;
    }
    .localidad-marker:hover .localidad-anchor-core {
      transform: translate(-50%, -50%) scale(1.35);
      box-shadow: 0 0 10px rgba(20, 89, 91, 0.75);
    }
    .localidad-marker.is-capital .localidad-anchor-core {
      background: var(--gold);
      box-shadow: 0 0 8px rgba(217, 155, 38, 0.8);
    }
    .localidad-marker.is-capital:hover .localidad-anchor-core {
      box-shadow: 0 0 14px rgba(217, 155, 38, 0.95);
    }
    .localidad-marker.is-epicentro .localidad-anchor-core {
      background: var(--accent);
      box-shadow: 0 0 8px rgba(189, 85, 46, 0.8);
    }
    .localidad-marker.is-epicentro:hover .localidad-anchor-core {
      box-shadow: 0 0 14px rgba(189, 85, 46, 0.95);
    }

    /* HALO LUMINOSO DE PULSO SUAVE EN EL PUNTO DE ANCLAJE */
    .localidad-anchor-pulse {
      position: absolute;
      top: 0;
      left: 0;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: rgba(20, 89, 91, 0.38);
      transform: translate(-50%, -50%);
      animation: localidadAnchorPulse 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
      pointer-events: none;
      z-index: 2;
    }
    .localidad-marker.is-capital .localidad-anchor-pulse {
      background: rgba(217, 155, 38, 0.45);
    }
    .localidad-marker.is-epicentro .localidad-anchor-pulse {
      background: rgba(189, 85, 46, 0.45);
    }
    .localidad-marker:hover .localidad-anchor-pulse {
      animation-duration: 1.3s;
    }

    @keyframes localidadAnchorPulse {
      0% {
        transform: translate(-50%, -50%) scale(0.4);
        opacity: 0.9;
      }
      65% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
      }
      100% {
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
      }
    }

    footer {
      margin-top: 50px;
      padding-top: 24px;
      border-top: 1px solid #d8deda;
      font-size: 0.85rem;
      color: #365153;
    }

    @media (max-width: 850px) {
      .top-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
      }
      .story-nav { display: none; }
      .step {
        padding: 30px 16px 40px;
        min-height: auto;
      }
      .step-card {
        margin-left: 0;
        max-width: 100%;
        padding: 20px 18px;
        max-height: none;
      }
      .map-legend {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
      }
    }

    /* MODAL DE RECOMENDACIÓN EDITORIAL PARA DISPOSITIVOS MÓVILES */
    body.has-mobile-modal {
      overflow: hidden !important;
    }
    #mobile-notice-modal {
      position: fixed;
      inset: 0;
      width: 100vw;
      height: 100vh;
      z-index: 99999;
      background: rgba(15, 34, 36, 0.72);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      opacity: 1;
      visibility: visible;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    #mobile-notice-modal.is-dismissed {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    @media (min-width: 851px) {
      #mobile-notice-modal {
        display: none !important;
      }
    }
    .mobile-modal-card {
      background: #ffffff;
      border-radius: 16px;
      padding: 28px 22px;
      max-width: 400px;
      width: 100%;
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
      border: 1px solid rgba(20, 89, 91, 0.15);
      text-align: center;
      transform: scale(1);
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    #mobile-notice-modal.is-dismissed .mobile-modal-card {
      transform: scale(0.94);
    }
    .mobile-modal-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      background: rgba(20, 89, 91, 0.08);
      color: #14595b;
      margin-bottom: 14px;
    }
    .mobile-modal-tag {
      display: block;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #bd552e;
      margin-bottom: 8px;
    }
    .mobile-modal-title {
      font-size: 18.5px;
      font-weight: 800;
      color: #142224;
      line-height: 1.3;
      margin: 0 0 12px;
    }
    .mobile-modal-desc {
      font-size: 14px;
      line-height: 1.55;
      color: #435456;
      margin: 0 0 22px;
      text-align: left;
    }
    .mobile-modal-btn {
      width: 100%;
      min-height: 48px;
      background: #14595b;
      color: #ffffff;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: background 0.2s ease, transform 0.15s ease;
      touch-action: manipulation;
    }
    .mobile-modal-btn:active {
      background: #0e3d3f;
      transform: scale(0.98);
    }
  
body { margin: 0; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; }
#story-scroll { position: relative; pointer-events: none; }
.step-card { pointer-events: auto; }
