.fen__modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Evita scroll en el fondo */
}

.fen__modal-dialog {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90vw;
    max-height: 90vh;
    margin: auto;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    animation: fen__modal-fadein 0.2s;
    display: flex;
    flex-direction: column;
}

@keyframes fen__modal-fadein {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.fen__modal-content {
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: auto;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    word-break: break-word;
}

.fen__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.fen__modal-title { font-size: 1.25rem; font-weight: bold; }
.fen__modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: #888;
    transition: color 0.2s;
}
.fen__modal-close:hover { color: #d00; }
.fen__modal-body { 
    font-size: 1rem; 
    padding: .5rem
}
.fen__modal-section {
    margin-bottom: 1.5rem;
    text-align: justify;
}
.fen__modal-list {
    list-style-type: disc;
    margin-left: 0;
    margin-bottom: 1rem;
}
.fen__modal-note {
    font-size: 0.95rem;
    color: #555;
}

@media (max-width: 480px) {
    .fen__modal-dialog {
        max-width: 98vw;
        width: 98vw;
        padding: 0.5rem;
    }
    .fen__modal-content {
        padding: 0.5rem;
    }
}