:root {
            --ancho-panel-lateral: clamp(320px, 25vw, 360px);
            --desplazamiento-panel: var(--ancho-panel-lateral);
            --fuente-interfaz: "Segoe UI", Arial, sans-serif;
        }

        body,
        button,
        input,
        select,
        textarea,
        .leaflet-container {
            font-family: var(--fuente-interfaz);
        }

        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        body.panel-lateral-oculto {
            --desplazamiento-panel: 0px;
        }
        #map { 
            height: 100vh;
            height: 100dvh;
            width: 100%;
        }

.sismo.ultimo {
    position: relative;
    z-index: 1000;
}

.estrella-sismo {
    display: block;
    overflow: visible;
}

.sismo .estrella-sismo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.leyenda-simbolo {
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.halo-sismo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border: 4px solid #ff3b30;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: haloSismo 1.8s ease-out infinite;
    z-index: 10;
}

.sismo-marker.ultimo {
    z-index: 1000 !important;
}

@keyframes haloSismo {
    0% {
        width: 12px;
        height: 12px;
        opacity: 0.85;
    }
    100% {
        width: 45px;
        height: 45px;
        opacity: 0;
    }
}


@keyframes estrellaSismo {
    0% {
        transform:
            translate(-50%, -50%)
            scale(1);
        filter:
            drop-shadow(
             0 0 2px rgba(255,255,255,.5)
            );
    }

    50% {
        transform:
            translate(-50%, -50%)
            scale(1.15);
        filter:
            drop-shadow(
                0 0 4px var(--color-sismo)
            )
            drop-shadow(
                0 0 8px var(--color-sismo)
            );
    }
    100% {

        transform:
            translate(-50%, -50%)
            scale(1);
        filter:
            drop-shadow(
                0 0 2px rgba(255,255,255,.5)
            );
    }
}
/* =========================================
   PANEL DEL SISMO
   ========================================= */

.panel-sismo {
    position: fixed;
    left: 10px;
    bottom: 20px;
    width: 280px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    overflow: hidden;
    transform: translateY(120%);
    opacity: 0;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease;
}


/* =========================================
   ACENTO SUPERIOR
   ========================================= */

.panel-sismo::before {
    content: "";
    display: block;
    height: 3px;
    background: #17365d;
}


/* =========================================
   PANEL VISIBLE
   ========================================= */

.panel-sismo.visible {
    transform: translateY(0);
    opacity: 1;
}


/* =========================================
   CAMBIO DE SISMO
   ========================================= */

.panel-sismo.cambiando {
    transform: translateY(120%);
    opacity: 0;
}


/* =========================================
   CONTENIDO
   ========================================= */

#panel-sismo-datos {
    padding: 18px 18px 20px 18px;
    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================================
   CABECERA
   ========================================= */

.cabecera-sismo {
    margin-bottom: 16px;
}


.titulo-sismo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #305496;
    text-transform: uppercase;
}


/* =========================================
   MAGNITUD
   ========================================= */

.magnitud-sismo {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* Indicador de color de la magnitud */

.indicador-magnitud {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}


/* Valor de magnitud */

.magnitud-valor {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: #305496;
    letter-spacing: -1px;
}


/* Tipo de magnitud */

.magnitud-tipo {
    font-size: 35px;
    font-weight: 600;
    line-height: 1;
    color: #305496;
}


/* =========================================
   UBICACIÓN
   ========================================= */

.ubicacion-sismo {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #305496;
    margin-top: 4px;
}


/* =========================================
   FECHA
   ========================================= */

.fecha-sismo {
    font-size: 12px;
    color: #315b85;
    font-weight: 500;
}


/* =========================================
   COORDENADAS
   ========================================= */

.coordenadas-sismo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 12px;
    padding-top: 10px;
}


.coordenadas-sismo strong {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #315b85;
}


.coordenadas-sismo span {
    font-size: 12px;
    color: #3f4650;
    font-family: monospace;
}


/* =========================================
   SEPARADOR
   ========================================= */

.separador-sismo {
    height: 1px;
    background: #e8edf2;
    margin: 12px 0;
}


/* =========================================
   DATOS TÉCNICOS
   ========================================= */

.datos-resumen-sismo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}


.datos-resumen-sismo div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.datos-resumen-sismo strong {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #315b85;
}


.datos-resumen-sismo span {
    font-size: 13px;
    font-weight: 500;
    color: #3f4650;
}

.dato-coordenadas-sismo span {
    font-family: monospace;
    font-size: 12px;
}


/* =========================================
   BOTÓN CERRAR
   ========================================= */

#cerrar-panel-sismo {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #8a949f;
    font-size: 22px;
    line-height: 28px;
    cursor: pointer;
    border-radius: 50%;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

#cerrar-panel-sismo:hover {
    background: #e8edf2;
    color: #26384d;
}
.zona-horaria-sismo {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #315b85;
}

.barra-superior {

    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #123B5D;
    z-index: 2000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-sizing: border-box;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.18);
}


.identidad {
    display: flex;
    align-items: center;
    height: 100%;

}

.logo-gobierno {
    height: 42px;
    width: auto;
    object-fit: contain;
    margin-right: 14px;
}

.logo-ineter {
    height: 42px;
    width: auto;
    object-fit: contain;
    margin-right: 14px;
}


.titulo-visor {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.titulo-visor h1 {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size:1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.titulo-visor p {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size:.85rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #ffffff;
}


.panel-lateral {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: var(--ancho-panel-lateral);
    background: #ffffff;
    border-right: 1px solid #e8edf2;
    z-index: 1000;
    overflow: hidden;
    font-family: var(--fuente-interfaz);
}

body.panel-lateral-oculto .panel-sismo {
    left: 10px;
    bottom: 92px;
}

body.panel-lateral-oculto.timeline-abierto .panel-sismo {
    bottom: 142px;
}

body.panel-lateral-oculto .panel-lateral {
    display: none;
}

.boton-panel-lateral {
    position: fixed;
    top: 210px;
    left: calc(var(--ancho-panel-lateral) - 1px);
    width: 30px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #ffffff;
    color: #305496;
    border: 1px solid #d8e0e8;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    box-shadow: 2px 2px 7px rgba(18, 59, 93, 0.12);
    cursor: pointer;
    z-index: 1300;
}

.boton-panel-lateral:hover {
    background: #f5f7f9;
    color: #17365d;
}

.boton-panel-lateral:active {
    background: #e9edf1;
}

.boton-panel-lateral:focus {
    outline: none;
}

.boton-panel-lateral:focus-visible {
    box-shadow:
        2px 2px 7px rgba(18, 59, 93, 0.12),
        inset 0 0 0 2px rgba(48, 84, 150, 0.22);
}

.boton-panel-lateral svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.panel-lateral-oculto .boton-panel-lateral {
    left: 0;
}


.seccion-leyenda,
.seccion-ultimos {
    width: 100%;
    padding: 0 18px;
    box-sizing: border-box;
}

.seccion-leyenda {
    flex-shrink: 0;
}


.seccion-leyenda h3,
.seccion-ultimos h3 {
    margin: 8px 0 12px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #315b85;
}

.leyenda-sismos {
    margin-top: 10px;
    font-family: "Segoe UI", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 14px;
}


/* Título Magnitud / Profundidad */

.leyenda-titulo {
    margin-bottom: 8px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #687585;
}


/* Fila horizontal */

.leyenda-fila {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}


/* Cada símbolo + texto */

.leyenda-elemento {
    flex: 1;
    font-family: "Segoe UI", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 10px;
    color: #3f4650;
}

.leyenda-fila-profundidad .leyenda-elemento {
    font-size: 9px;
}


/* =========================================================
   PROFUNDIDAD
   ========================================================= */

.leyenda-profundidad {
    display: block;
    font-family: "Segoe UI", Arial, sans-serif;
    width: 15px;
    height: 15px;
    border: 1px solid #315b85;
    border-radius: 2px;
    box-sizing: border-box;
}


.profundidad-1 {
    background: #4f78a8;
}

.profundidad-2 {
    background: #6f98c3;
}

.profundidad-3 {
    background: #94b7d8;
}

.profundidad-4 {
    background: #bdd3e7;
}


.separador-panel {
    height: 1px;
    margin: 16px 18px;
    background: #e8edf2;
    flex-shrink: 0;
}

#lista-ultimos-sismos {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.halo-leyenda {
    width: 18px;
    height: 18px;
    border: 1px solid #ff3b30;
    border-radius: 50%;
    box-sizing: border-box;
    position: relative;
}

.halo-leyenda::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #ff3b30;
    border-radius: 50%;
    box-sizing: border-box;
}


.sismo-reciente-magnitud {
    flex-shrink: 0;
    width: 52px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #17365d;
    letter-spacing: -0.3px;
}

.sismo-reciente-ubicacion {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    color: #26384d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sismo-reciente-fecha {
    font-size: 14px;
    color: #52677d;
    white-space: nowrap;
}

.sismo-reciente {
    width: 100%;
    padding: 11px 0;
    border-bottom: 1px solid #e8edf2;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sismo-reciente-contenido {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sismo-reciente-info {
    flex: 1;
    min-width: 0;
}

.sismo-reciente-detalles {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.sismo-reciente-profundidad {
    font-size: 12px;
    font-weight: 500;
    color: #52677d;
    white-space: nowrap;
}

.seccion-ultimos {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.filtros-sismos {
    flex-shrink: 0;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 0 2px 8px;
    border-bottom: 1px solid #d7dde4;
}

.filtro-sismos-campo {
    position: relative;
    min-width: 0;
    padding: 7px 10px 6px;
    background: #f1f2f3;
    border-bottom: 2px solid #76889a;
    border-radius: 4px 4px 0 0;
}

.filtro-sismos-campo:focus-within {
    border-bottom-color: #315b85;
}

.filtro-sismos-campo label {
    display: block;
    margin-bottom: 3px;
    color: #687585;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.filtro-sismos-campo select {
    width: 100%;
    padding: 0 18px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #243b53;
    font: 13px "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

#lista-ultimos-sismos {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    padding-bottom: 8px;
}

#lista-ultimos-sismos::-webkit-scrollbar {
    width: 4px;
}

#lista-ultimos-sismos::-webkit-scrollbar-thumb {
    background: #cbd4de;
    border-radius: 2px;
}

#lista-ultimos-sismos::-webkit-scrollbar-track {
    background: transparent;
}

.sismo-reciente.seleccionado {
    background: #eef3f8;
    border-left: 3px solid #305496;
    padding-left: 8px;
}

.sismo-reciente:hover {
    background: #f5f8fb;
}

.sismo-reciente.seleccionado:hover {
    background: #e8f0f8;
}

#visor {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

#visor:fullscreen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

#visor:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}

/* =========================================================
   CONTROL DE NAVEGACIÓN
   ========================================================= */

.control-navegacion {
    display: flex;
    flex-direction: column;
    width: 38px !important;
    margin: 0 0 10px 0 !important;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e1e7ed;
    border-radius: 7px;
    overflow: hidden;
    box-shadow:0 4px 14px rgba(0, 0, 0, 0.16);
    box-sizing: border-box;
}


/* =========================================================
   BOTONES
   ========================================================= */

.control-navegacion-boton {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #305496;
    cursor: pointer;
    font-family:"Segoe UI", Arial, sans-serif;
    transition: background-color 0.18s ease, color 0.18s ease;
}

/* =========================================================
   SEPARADORES
   ========================================================= */

.control-navegacion-boton + .control-navegacion-boton {
    border-top: 1px solid #e8edf2;

}


/* =========================================================
   ZOOM
   ========================================================= */

.control-navegacion-boton.zoom-mas,
.control-navegacion-boton.zoom-menos {
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}


/* =========================================================
   PANTALLA COMPLETA
   ========================================================= */

.control-navegacion-boton.pantalla-completa svg {
    width: 17px;
    height: 17px;

}


/* =========================================================
   HOVER
   ========================================================= */

.control-navegacion-boton:hover {
    background: #f3f6f9;
    color: #17365d;
}

/* =========================================================
   ACTIVE
   ========================================================= */
.control-navegacion-boton:active {
    background: #e8eef5;

}


/* =========================================================
   FOCUS
   ========================================================= */
.control-navegacion-boton:focus {
    outline: none;
}


.control-navegacion-boton:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(48, 84, 150, 0.25);
}

/* =========================================================
   BARRA DE HERRAMIENTAS DERECHA
   ========================================================= */

.barra-herramientas {

    display: flex;
    flex-direction: column;

    width: 38px;

    margin: 124px 0 0 !important;

    gap: 8px;

}

.indicador-norte {
    position: absolute;
    left: 52px;
    top: 5px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: none;
}

.indicador-norte img {
    width: 32px;
    height: auto;
    display: block;
}

/* =========================================================
   CONTROL DE HERRAMIENTA
   ========================================================= */

.control-herramienta {

    position: relative;

    width: 38px;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid #e1e7ed;

    border-radius: 7px;

    box-shadow:
        0 2px 8px rgba(18, 59, 93, 0.12);

    box-sizing: border-box;

    overflow: visible;

    transition: none;

}


/* =========================================================
   BOTÓN
   ========================================================= */

.control-herramienta-boton {

    width: 38px;
    height: 38px;

    padding: 0;
    margin: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border: none;

    background: transparent;

    color: #305496;

    cursor: pointer;

    border-radius: 7px;

    transition:
        background-color 0.12s ease,
        color 0.12s ease;

}

.control-herramienta.abierto {
    width: 190px;
    margin-left: -152px;
    border-radius: 7px;
    box-shadow:
        0 2px 8px rgba(18, 59, 93, 0.12);
}

.control-herramienta.abierto
.control-herramienta-boton {
    width: 100%;
    padding: 0 12px;
    justify-content: space-between;
    background: #ffffff;
    color: #305496;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #dfe6ed;
}

.control-herramienta-boton-texto {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    transition: none;
}

.control-herramienta.abierto
.control-herramienta-boton-texto {
    max-width: 130px;
    opacity: 1;
}

.control-herramienta-boton:hover {

    background: #f5f7f9;

    color: #17365d;

}


.control-herramienta-boton:active {

    background: #e8eef5;

}


.control-herramienta-boton:focus {

    outline: none;

}


.control-herramienta-boton:focus-visible {

    box-shadow:
        inset 0 0 0 2px
        rgba(48, 84, 150, 0.25);

}


/* =========================================================
   ICONOS
   ========================================================= */

.control-herramienta-boton img {

    width: 22px;
    height: 22px;

    display: block;

    object-fit: contain;

    filter:
        invert(32%)
        sepia(18%)
        saturate(1180%)
        hue-rotate(177deg)
        brightness(87%)
        contrast(90%);

}

.control-herramienta-boton > svg {
    width: 21px;
    height: 21px;
    display: block;
    flex-shrink: 0;
}


/* =========================================================
   PANEL EXPANDIDO
   ========================================================= */

.control-herramienta-panel {
    position: relative;
    width: 100%;

    max-height: 0;

    margin-left: 0;

    padding: 0 12px;

    background: transparent;

    border: 0;

    border-radius: 0 0 7px 7px;

    box-shadow: none;

    box-sizing: border-box;

    opacity: 0;

    visibility: hidden;

    transition: none;

    pointer-events: none;

    font-family: var(--fuente-interfaz);

}


.control-herramienta.abierto
.control-herramienta-panel {

    max-height: 240px;

    margin-top: 0;

    padding: 12px;

    opacity: 1;

    visibility: visible;

    pointer-events: auto;

}

.control-herramienta.abierto
.control-herramienta-boton:hover {
    background: #f5f7f9;
    color: #17365d;
}



/* =========================================================
   OPCIONES DE MAPA BASE
   ========================================================= */

.mapa-base-opcion {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 6px 4px;

    font-size: 12px;

    color: #3f4650;

    cursor: pointer;

    border-radius: 5px;

}


.mapa-base-opcion:hover {

    background: #f4f7fb;

}


.mapa-base-opcion input {

    margin: 0;

    accent-color: #305496;

    cursor: pointer;

}

.herramientas-lista {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
}

.herramientas-botones {
    display: grid;
    grid-template-columns: repeat(4, 40px);
    grid-template-rows: 40px;
    justify-content: center;
    gap: 5px;
}

.control-herramientas.abierto {
    width: 225px;
    height: 54px;
    margin-left: -187px;
    display: flex;
    align-items: stretch;
}

.control-herramientas
.control-herramienta-boton-texto {
    display: none;
}

.control-herramientas.abierto
.control-herramienta-boton {
    order: 2;
    width: 38px;
    height: 52px;
    padding: 0;
    justify-content: center;
    background: #ffffff;
    color: #305496;
    border-left: 1px solid #d8e0e8;
    border-bottom: 0;
    border-radius: 0 6px 6px 0;
}

.control-herramientas.abierto
.control-herramienta-boton:hover {
    background: #f5f7f9;
    color: #17365d;
}

.control-herramientas.abierto
.control-herramienta-panel {
    order: 1;
    width: 187px;
    max-height: 52px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 6px 0 0 6px;
}

.herramienta-opcion {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background: #ffffff;
    color: #26384d;
    cursor: pointer;
}

.herramienta-opcion svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.herramienta-opcion:hover {
    background: #f5f7f9;
}

.herramienta-opcion.activa {
    background: #eef3f8;
    color: #17365d;
    font-weight: 600;
}

.herramienta-limpiar {
    color: #52677d;
}

body.herramienta-dibujo-activa .sismo {
    pointer-events: none !important;
}

.medicion-etiqueta {
    padding: 3px 6px;
    background: #ffffff;
    border: 1px solid #b9c7d4;
    color: #17365d;
    box-shadow: none;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.medicion-etiqueta::before {
    display: none;
}

.leaflet-top.leaflet-left {
    top: 70px;
    left: calc(var(--desplazamiento-panel) + 10px);
    margin: 0;
}

/* =========================================================
   BARRA DERECHA
   ========================================================= */

.leaflet-top.leaflet-right {
    top: 70px;
    right: 10px;
    margin: 0;
}

.estado-sismos-mapa {
    position: fixed;
    top: 70px;
    right: 10px;
    display: flex;
    align-items: stretch;
    gap: 8px;
    z-index: 1200;
}

.tarjeta-estado-sismo {
    height: 116px;
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #dfe6ed;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(18, 59, 93, 0.12);
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

.tarjeta-conteo-sismos {
    width: 140px;
    text-align: center;
}

.asistencia-herramienta {
    display: none;
}

body.herramienta-medicion-activa #map {
    cursor: crosshair;
}

@media (pointer: fine) {
    .asistencia-herramienta.visible {
        position: fixed;
        left: 50%;
        bottom: 42px;
        padding: 8px 12px;
        display: block;
        background: rgba(255, 255, 255, 0.97);
        color: #26384d;
        border: 1px solid #d8e0e8;
        border-radius: 7px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
        font-family: var(--fuente-interfaz);
        font-size: 12px;
        line-height: 1.3;
        white-space: nowrap;
        transform: translateX(-50%);
        z-index: 2200;
    }

    .asistencia-herramienta-acciones {
        display: none;
    }

    body.timeline-abierto .asistencia-herramienta.visible {
        bottom: 142px;
    }
}

@media (pointer: coarse) {
    .herramienta-opcion {
        width: 48px;
        height: 48px;
    }

    .herramientas-botones {
        grid-template-columns: repeat(4, 48px);
        grid-template-rows: 48px;
    }

    .control-herramientas.abierto {
        width: 257px;
        height: 62px;
        margin-left: -219px;
    }

    .control-herramientas.abierto
    .control-herramienta-panel {
        width: 219px;
        max-height: 60px;
        padding: 6px;
    }

    .control-herramientas.abierto
    .control-herramienta-boton {
        height: 60px;
    }

    .asistencia-herramienta.visible {
        position: fixed;
        left: 50%;
        bottom: calc(148px + env(safe-area-inset-bottom, 0px));
        width: max-content;
        max-width: calc(100vw - 24px);
        padding: 9px 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(255, 255, 255, 0.97);
        color: #26384d;
        border: 1px solid #d8e0e8;
        border-radius: 8px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
        box-sizing: border-box;
        font-family: var(--fuente-interfaz);
        font-size: 12px;
        transform: translateX(-50%);
        z-index: 2200;
    }

    .asistencia-herramienta-texto {
        max-width: 230px;
        line-height: 1.3;
    }

    .asistencia-herramienta-acciones {
        display: flex;
        gap: 6px;
    }

    .asistencia-herramienta button {
        min-height: 40px;
        padding: 0 10px;
        border: 1px solid #bfcbd7;
        border-radius: 5px;
        background: #ffffff;
        color: #305496;
        font-weight: 600;
    }

    .asistencia-herramienta button:disabled {
        opacity: 0.45;
    }

    .asistencia-terminar:not(:disabled) {
        background: #305496;
        color: #ffffff;
    }
}

.conteo-sismos-valor {
    color: #17365d;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.tarjeta-ultimo-sismo {
    width: 205px;
    text-align: center;
}

.ultimo-sismo-magnitud {
    color: #17365d;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.ultimo-sismo-fecha {
    margin-top: 0;
    color: #52677d;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
}


.fecha-ultima-actualizacion {
    display: -webkit-box;
    width: calc(100% - 12px);
    overflow: hidden;
    color: #3f566d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ultimo-sismo-ubicacion {
    display: -webkit-box;
    width: calc(100% - 12px);
    overflow: hidden;
    color: #3f566d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.tarjeta-estado-etiqueta {
    margin-top: 2px;
    color: #315b85;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.35px;
    line-height: 1.15;
    text-transform: uppercase;
    white-space: nowrap;
}

.tarjeta-estado-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   DISEÑO RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
    :root {
        --ancho-panel-lateral: clamp(290px, 31.25vw, 320px);
    }

    .identidad {
        padding-left: 12px;
    }

    .logo-gobierno,
    .logo-ineter {
        height: 36px;
        margin-right: 10px;
    }

    .titulo-visor h1 {
        font-size: 1.1rem;
    }

    .titulo-visor p {
        font-size: 0.76rem;
    }

    .seccion-leyenda,
    .seccion-ultimos {
        padding-right: 14px;
        padding-left: 14px;
    }

    .separador-panel {
        margin-right: 14px;
        margin-left: 14px;
    }

    .timeline-control.abierto .timeline-panel {
        width: min(650px, calc(100vw - var(--desplazamiento-panel) - 68px));
    }

    .timeline-control {
        bottom: 46px;
    }

    .leaflet-container .leaflet-bottom.leaflet-left {
        bottom: 20px;
    }

    .leaflet-container .leaflet-control-attribution {
        max-width: calc(100vw - 8px);
        font-size: 9px;
    }
}

@media (max-width: 700px) {
    :root {
        --ancho-panel-lateral: 100vw;
        --desplazamiento-panel: 0px;
    }

    .barra-superior {
        height: 60px;
    }

    .identidad {
        padding: 0 8px;
    }

    .logo-gobierno,
    .logo-ineter {
        height: 31px;
        margin-right: 7px;
    }

    .titulo-visor h1 {
        font-size: 1rem;
        letter-spacing: 0.25px;
    }

    .titulo-visor p {
        display: none;
    }

    .panel-lateral {
        top: 60px;
        width: var(--ancho-panel-lateral);
        border-right: 0;
        box-shadow: none;
    }

    .boton-panel-lateral {
        top: 188px;
    }

    body.vista-panel-movil #map,
    body.vista-panel-movil .timeline-control,
    body.vista-panel-movil .estado-sismos-mapa,
    body.vista-panel-movil .panel-sismo {
        display: none;
    }

    body.vista-panel-movil .boton-panel-lateral {
        top: 68px;
        right: 8px;
        left: auto;
        width: 34px;
        height: 34px;
        border: 1px solid #d6dfe8;
        border-radius: 5px;
        box-shadow: 0 2px 7px rgba(18, 59, 93, 0.12);
    }

    body.vista-panel-movil .boton-panel-lateral svg {
        transform: rotate(0deg);
    }

    .panel-sismo {
        width: min(280px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
    }

    body.panel-lateral-oculto .panel-sismo {
        bottom: 88px;
    }

    body.panel-lateral-oculto.timeline-abierto .panel-sismo {
        bottom: 144px;
    }

    .leaflet-top.leaflet-left {
        top: 66px;
        left: 8px;
    }

    .leaflet-top.leaflet-right {
        top: 68px;
        right: 8px;
    }

    .estado-sismos-mapa {
        top: 68px;
        right: 8px;
        width: 273px;
        gap: 6px;
    }

    .tarjeta-estado-sismo {
        height: 104px;
        padding: 6px;
    }

    .tarjeta-conteo-sismos {
        width: 82px;
    }

    .tarjeta-ultimo-sismo {
        width: 185px;
    }

    .conteo-sismos-valor,
    .ultimo-sismo-magnitud {
        font-size: 21px;
    }

    .ultimo-sismo-fecha {
        font-size: 10px;
    }

    .ultimo-sismo-ubicacion {
        font-size: 9px;
    }

    .tarjeta-estado-etiqueta {
        font-size: 9px;
    }

    .timeline-control {
        left: 8px;
        bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    }

    .timeline-panel,
    .timeline-control.abierto .timeline-toggle {
        height: 88px;
    }

    .timeline-control.abierto .timeline-panel {
        width: calc(100vw - 56px);
        padding: 7px 8px 6px;
    }

    .timeline-toolbar {
        position: relative;
        display: flex;
        min-height: 30px;
        margin-bottom: 5px;
    }

    .timeline-actions {
        position: static;
    }

    .timeline-speed {
        display: none;
    }

    .timeline-current {
        position: absolute;
        top: auto;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }

    .timeline-speed-btn {
        min-width: 27px;
        padding-right: 5px;
        padding-left: 5px;
    }

    .timeline-tick:nth-child(even) {
        display: none;
    }

    .leaflet-container .leaflet-control-mouseposition {
        margin-left: 8px !important;
        padding-right: 7px;
        padding-left: 7px;
        font-size: 10px;
    }

    .leaflet-container .leaflet-control-scale {
        margin-left: 5px !important;
    }

    .leaflet-container .leaflet-control-scale-line {
        max-width: 82px;
        font-size: 9px;
    }

    .leaflet-container .leaflet-bottom.leaflet-left {
        bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    }

    .leaflet-container .leaflet-control-attribution {
        max-width: calc(100vw - 8px);
        padding: 1px 3px;
        overflow: hidden;
        font-size: 8px;
        line-height: 1.15;
        text-overflow: ellipsis;
    }
}

@media (max-width: 380px) {
    .logo-gobierno {
        height: 27px;
    }

    .logo-ineter {
        height: 29px;
    }

    .titulo-visor h1 {
        font-size: 0.92rem;
    }

    .timeline-speed-btn {
        min-width: 24px;
        padding-right: 3px;
        padding-left: 3px;
        font-size: 10px;
    }

    .leaflet-container .leaflet-control-scale-line {
        max-width: 68px;
    }
}

/* Bandera de Nicaragua en la atribución del mapa */
.nicaragua-flag {
    width: 22px;
    height: auto;
    max-height: 14px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
}



/* =========================================================
   DISEÑO RECUPERADO — DETALLE DEL SISMO
   ========================================================= */

.detalle-sismo {
    min-width: 225px;
    max-width: 275px;
    font-family: inherit;
}

.detalle-sismo-header {
    padding: 2px 0 9px;
    border-bottom: 1px solid #d9dee2;
    margin-bottom: 10px;
}

.detalle-sismo-magnitud {
    font-size: 1.15rem;
    font-weight: 700;
    color: #263238;
}

.detalle-sismo-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detalle-sismo-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.25;
}

.detalle-sismo-icon {
    width: 18px;
    min-width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 1px;
}

.detalle-sismo-icon svg {
    width: 16px;
    height: 16px;

    fill: none;
    stroke: #607d8b;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detalle-sismo-row strong {
    display: inline-block;
    min-width: 78px;
    margin-right: 4px;

    font-weight: 600;
    color: #455a64;
}

.detalle-sismo-row > span:last-child {
    color: #263238;
}

.detalle-sismo-row small {
    color: #78909c;
    font-size: 0.72rem;
}


/* ---------------------------------------------------------
   UBICACIÓN
   --------------------------------------------------------- */

.detalle-sismo-ubicacion {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: 12px;
    padding: 9px 10px;

    background: #f4f7f8;
    border-radius: 5px;

    color: #263238;
    font-weight: 600;
    line-height: 1.35;
}

.detalle-sismo-ubicacion .detalle-sismo-icon svg {
    stroke: #455a64;
}


/* ---------------------------------------------------------
   COORDENADAS
   --------------------------------------------------------- */

.detalle-sismo-coordenadas {
    margin-top: 11px;
    padding-top: 9px;

    border-top: 1px solid #e1e5e8;
}

.detalle-sismo-coord-title {
    margin-bottom: 3px;

    font-size: 0.75rem;
    font-weight: 600;

    color: #607d8b;
}

.detalle-sismo-coord-values {
    font-size: 0.82rem;
    color: #37474f;

    font-variant-numeric: tabular-nums;
}